Thursday, March 4, 2010

BBC Micro?

So, I couldn't sleep a couple of nights ago and was (for some reason I can't remember) watching a video of a BBC Micro game called Ghouls. I remember always quite liking it but that it was too hard and from watching people's progress (or lack thereof) on youtube I think my memory served me correctly :)

Anyway, I began to ponder how I would go about porting a BBC (beeb) game to the Atari 800. I know some games have their source code available and people have hacked at that, rewritten parts, added bits and pieces and got a working Atari game as they are after all the same CPU. I decided to try (for a laugh) just loading in the file for Arcadians (Acornsoft's Galaxian clone) straight into the A8's RAM at it's beeb load address and run it, see what happened...

Of course not much happened because it was expecting a different computer to be there with ROM functions it was trying to call etc. So, I got some beeb docs and manuals/websites and worked out where these ROM functions vectored through and wrote a couple of the more important ones (basically ones Arcadians was calling and expect a reply from). I knew from the docs I'd found the normal text screen was at address $7C00 in RAM so I pointed an A8 display list at it and loaded in a font for it to use and PRESTO there was the title/instruction screen for Arcadians :)

A few more hours work and I had the game running although with messed up graphics and no proper screen display in the bitmap mode it was using. By the next night (last night) I'd realised why the sprites weren't drawing correctly and had written a routine to alter the sprite data in the beeb file to an A9 friendly version.

Today I'll be writing a proper OSWRCH routine. OSWRCH handles all text printing (printing as in to the screen) and it's used for stuff like the score, rank etc in Arcadians. That shouldn't take long (although needs a few other ROM functions writing as well) so after that (or maybe before, so I can see what's happening a bit better) I'll do up a proper display list with DLIs every 3 lines to change the character base to give a close approximation to the beeb bitmap screen mode (something more akin to the C64 bitmap mode). To get the screen displaying totally correctly though I'll need to hack the beeb sprite code to alter the way it calculates a new line. I know where all the code for the sprite drawing is so hopefully that won't be too hard.

Hopefully with not much more work I'll have a fully working beeb conversion done :)

Pete

No comments:

Post a Comment