MySpace

Dunny's Blog of shite Possibly the biggest waste of time since...

Paul



Last Updated: 1/19/2007

Send Message
Instant Message
Email to a Friend
Subscribe

Blog Archive
[Older      Newer]
 /  / 
Friday, April 06, 2007 
Not much to add today - just that the bootloader is pretty much finished, and work on the actual OS has begun. As it turns out, SVGA is a bitch to add in. I could settle for bog-standard mode 13h, which would be pretty much comparable to the original speccy resolution, but isn't the direction I want this to go.

So, given that my test-bed doesn't really support much in the way of VESA modes, I can't have a flat linear frame buffer like I'd hoped. SVGA access has to be through 16kb "banks" which have to be switched in depending on where on the screen you want to write. Bah. That's gonna make stuff real fun.

There turns out to be a solution though. Through the miracle of memory paging under protected mode, I can set up a region of memory which acts like a linear frame buffer, and overlay virtual memory pages onto it. When the user accesses one of these pages (by writing to the virtual frame buffer), it gets a flag set by the MMU. If I then set up an ISR to examine these pages every frame, I can just switch the appropriate bank in and blit it to the video memory. This may turn out to be quite slow (especially on my old 486) but if there's no changes going on in the screen area, it shouldn't slow down the BASIC too much.

And you'll be able to turn it off (or manually call the update routine) if you like.

Time will tell as to whether or not this works - a good friend of mine is trying out some code and ideas to see how well it will do.

Oh, and while I was messing around last night, I changed the boot message:

Looky here

It's linked rather than embedded because it's a large image.

Wednesday, April 04, 2007 
    Well, decided to start on SpecOS. It's not as easy as I had hoped it would be - writing an OS is a very different kettle of fish compared to coding for Windows. Still and all, the first steps have been made.

I've managed to get protected mode working, with a valid GDT which exposes the whole memory as one huge chunk, and also started messing with VGA BIOS calls. It just boots up at the moment, displays the starting message, does a little housekeeping and finally just hangs - intentionally, I hasten to add...

But the good thing is that my code worked first time on my real 486 lappy. Here's a pic of it in action:



This is just the best thing ever - it's been real fun getting it set up. Now I have to start researching how to set up the screen mode, and get a default character set created, along with a simple PRINT routine. When that's done, I can tackle interrupts...

Anyhoo, that's all - just wanted to share my joy.

Friday, December 22, 2006 
Crikey, could this be another blog entry? Why yes, I believe it is.

I made a new ZXSpin release this morning, and it appears to have gone down well. Either nobody has downloaded it, or there really are no bugs worth speaking of!

I suppose that things will pick up soon.

The new Pentagon/TRDOS emulation is quite nice, with the gigascreen filtering working very well indeed. There were a few hiccups with the auto-frameskip, but I've got those ironed out now. There's loads of new features and bug fixes too. You can get it Here

BASin has taken a back seat lately with all the new developments in ZXSpin, but rest assured I'll be back to it soon.
Sunday, December 03, 2006 
Must come to an end.

My nursing course is nearly over (barring two essays), after which I shall be employed as a registered nurse. I'm not sure I want to be a nurse now, but what the hell - it's done.

On the SPIN front, things have been progressing quite nicely. We've added 16bit IDE support and DivIDE to go with it. I'm looking at ZXATASP support so that we can run ResiDOS too. I might emulate Piters' Simple 8Bit IDE too, but the guy's such a total prick that he doesn't deserve to be emulated.

SPIN's divIDE handles everything we throw at it, barring one small bug that's affecting a hacked ESXDOS firmware that loads TRDOS disks from the hardfile. Never fear though, for it will be fixed before the next release.

I need to get going on the POKEs database too, as it's been sitting doing nothing for months.

As for BASin, there's a new version in the works once the new binary import system is completed, and the first of the BASIC tutorials is done. There's a few bugs fixed in the this release, and it should be available before (or around) christmas.

And that just leaves news of my latest project, on which work will begin in January (when the Uni course is finished).

SpecOS (working title) is an operating system for any x86 PC with a minimum of a 486 CPU. It is a port and enhancement of the Sinclair 48k ROM, with a VGA 640x480x8 display. There are several enhancements to the language planned, so watch this space for updates commencing January.
Friday, September 22, 2006 
Might as well post *something*, eh?

Been very busy with Uni stuff these last few weeks, and Real-Life(tm) has been getting in the way of the important things like SPIN and BASin.

Not done very much at all to SPIN, but BASin is coming along nicely. I've worked very hard on SPIN lately, so I'm taking a break and jumping back into BASin for a while. There's some bugs to fix (although I'm still waiting for an adequate bug-report from Arda on WOS about "disappearing lines" that I assumed was fixed a while ago).

I'm currently working on a new unified Binary Import system, which will handle all the binaries produced by BASin. The UDG editor, Assembler, etc will send their data to it, and the user can then decide how the binary should be handled - a straight dump to memory, to the current program as DATA statements (with Marko's requested Hex DATA statements) or to the clipboard as an ASM db stub.

Not terribly exciting, but what the hell, eh? I got bored of sprites and the 48k editor, I'll get back to those later on.

I'm also typing up the next tutorial, based on the Spectrum+ manual, with the DK "Screenshot" series also making an appearance. That manual has to be my greatest effort so far.

Or so I thought...

I'm also working on a new project that will consume up to three years of my life, if not more. More details on that one later, after the release of ZX Shed issue 3.
Tuesday, July 25, 2006 
Hot, hot, hot. Again.

Went to Uni for a "Manual Handling Update" but as it turns out, there was problems with the room. The whole building, as a matter of fact... No air conditioning, so we couldn't do what tends to be a very physical sort of lesson. Air conditioners wheeled in and started up - nice. However, they were so noisy that we couldn't hear what the lecturers were saying.

So we went home instead. Nice. Where it was still *fucking hot*.

Dave is writing a brainfuck interpreter in Sinclair BASIC and not having much luck. So I decided I'd have a bash.

Brainfuck is a Turing-Complete language with only 8 "commands" based around a single pointer in a memory space of roughly 30kb. It has simple move/increment/decrement and jump commands.

And it's a right PITA to write in a language that has no local variables. Done it though, check it out:

10 REM Brainfuck Interpreter
20 CLEAR PEEK 23675+256*PEEK 23676-30020
30 LET e=0
40 LET c$="++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>."
50 LET p=20+PEEK 23730+256*PEEK 23731: GO SUB 500
100 LET e=e+1: IF e>LEN c$ THEN STOP
110 IF c$(e)="+" THEN POKE p,PEEK p+1-(255*(PEEK p=255)): GO TO 100
120 IF c$(e)=">" THEN LET p=p+1: GO TO 100
130 IF c$(e)="<" THEN LET p=p-1: GO TO 100
140 IF c$(e)="-" THEN POKE p,PEEK p-1+(255*(PEEK p=0)): GO TO 100
150 IF c$(e)="." THEN PRINT CHR$ PEEK p;: GO TO 100
160 IF c$(e)="," THEN INPUT b$: POKE p,CODE b$: GO TO 100
170 IF c$(e)="[" THEN IF PEEK p=0 THEN GO SUB 200: GO TO 100
180 IF c$(e)="]" THEN IF PEEK p<>0 THEN GO SUB 300: GO TO 110
190 GO TO 100
200 LET b=1
210 LET e=e+1: IF c$(e)="[" THEN LET b=b+1
220 IF c$(e)="]" THEN LET b=b-1: IF b=0 THEN RETURN
230 GO TO 220
300 LET b=1
310 LET e=e-1: IF c$(e)="]" THEN LET b=b+1
320 IF c$(e)="[" THEN LET b=b-1: IF b=0 THEN RETURN
330 GO TO 310
500 RESTORE 510: FOR b=p-20 TO p-2: READ e: POKE b,e: NEXT b: RANDOMIZE USR (p-20): LET e=0: RETURN
510 DATA 237,91,178,92,33,20,0,25,1,48,117,84,93,54,0,19,237,176,201

The program there produces the output "Hello World!?". The final question mark is because the Sinclair character set denotes a linefeed as #13, not #10. You can change the program by inputting a new BrainFuck program into c$ in line 40.

And that's that! In the process I noticed a few small buggettes in BASin, along with a few annoyances that the editor wouldn't quite do what I wanted it to. So I'll be having a look at that tonight, and maybe get a new version out soon.

Monday, July 24, 2006 
    Well, I've decided to start posting blog entries more regularly. I suppose this will be some sort of "online diary", if you will. Won't that be original?

SPIN (the most accurate Spectrum emulator in existence for windows, in my own unbiased opinion) has been updated. It saves animated GIF files, it emulates old tape players... and has had a bunch of bugs fixed.

A friend of mine has been messing around with an old 48k Spectrum, testing various areas of timings and other undocumented effects such as ULA snow. As it turns out, there's a whole shitload of stuff that isn't emulated at all well by any of the current crop of "accurate" emulators.

Spectaculator fails in, well, spectacular style. RealSpectrum ditto - though there is a nice side to their emulator. Their documentation on ULA snow states that there is no contention applied to IR during snow periods. We know that there is, and so a test program was written to find out what it is and how it works. We ran the test in other emulators, and sure enough none of them passed except one - RealSpectrum. So RamSoft, having stated categorically that there is no contention then go ahead and emulate it anyway.

Hmm. It's not like they've not been a tad reticent about the information in their possession, but it's never been this blatantly withheld and moderated. I guess they don't want their status as "100% accurate" impugned. Not that they ever had that status in the first place - they've never been very accurate at all.

Spectaculator does some very weird things, and the only conclusion that I can draw is that the contention is skewed in favour of getting demos to work - and when a reasonable test suite comes along, it fails miserably.

Still, we can't really complain - our microdrive emulation is bodged somewhat to get the format command to work... :-)

Animated GIF support was "fun", but works like a charm. SPIN optimises the GIFs down to a size that is pretty much as low as you can get. It is still very capable of churning out 90mb of GIF image for a complex image, but for the most part an entire walkthrough is around 9mb. That's not bad for 20,000 images upwards. Adventure games do spectacularly well, as they are for the most part static.

Finally, there were the bugs... Message boxes had to be reworked, as asking the emulation thread to pause itself is not a good idea. The order of the int-retriggering system in the RZX recorder had to be swapped, which also caused a few headaches. There's a few problems with buttons running off the bottom of the windows in some XPs themes, which I shall get to in due course.

For now, I'm working on the POKEs database. SPIN will have access to a database of POKEs for over 3,000 games. Woooo, eh?

BASin is also getting an update. A 48k "bottom of the screen" style editor is optional now, and I'm working on sprite masking.

As you can see, I'm a very busy person :-)
Sunday, May 07, 2006 
This is my blog. It's the place where you can, like any good myspace user, read my disorganised thoughts, poor spelling and generally crap "wannabe" lifestyle.

So, it's sunday. It's pissing down with rain and I'm bored. The missus wants to get on here (actually, "wants" is too strong a word - "desperately avoiding" would be more accurate) to work on her essays, so I'm finding things to do so she doesn't have to. I'm nice like that.

Anyone who knows me will be aware of my current project, BASin. You can find the current version here but beware that unless you have a love of the Sinclair Spectrum and in particular the BASIC that was built in, you'll be bewildered. I'm currently writing a BASIC tutorial to go with the fantastically well-written help file - basically by pulling bits out of the Speccy+ manual and the "Screen Shot" programming guides from the 80s.

It'll be *fab*.

As for work, I've been on Ward 28 today (female surgical). It's a fun place, with lots of women in excrucating agony having had various "essentials" removed in theatre. The place is growing on me and I'd like to work there full time, if not for the stigma that one inherits being a male on what amounts to a "gynaecological ward".

More later. If I don't get bored of this crap, that is.