Showing posts with label oldschool. Show all posts
Showing posts with label oldschool. Show all posts

Wednesday, 29 June 2011

Sometimes rebuilding can take a while...

so I started playing with the previous code and knocked out a chunky scroller whilst I'm at it.



The WIP version I have also has a chessboard zoomer in the background, but it's a bit dodgy (I think my interrupts are overrunning a bit), so I've disabled it for this video. If I can't fix up the interrupts I'll seperate them out into seperate parts, fix the scroll position or find some other workaround.

Oddly enough the chessboard is less dependent on lookup tables than the one I did on the ST (It's generated from scratch) and uses a hell of a lot less rastertime to run. I think for a lot of what I want to do the SMS is more powerful than the ST :)

or it could just be my shoddy 68K assembler abilities...

Friday, 11 September 2009

First steps in 68000

During the late 80s/early 90s all the cool kids had an Amiga. Some pressed on with an ST but still they had their games. Then there was me. I rolled the dice once again and tried the time-tested 'It'll help me with my homework, dad!' line to get myself an Amiga.

He looked around the school computing room and came home with an Archimedes. Not the worst machine, but not exactly overflowing with games released on a weekly basis. Nevertheless it was a good machine for a coder - the ARM 2 wasn't bad, the 12mhz ARM250 was quite nice, the 256 colour palette was naff but it was a friendly machine to code for. And these days ARM is a pretty good skill to have all things considered - they're everywhere, just not that visible.

But coming from a commodore 64 with hardware sprites, rastersplits and videochip trickery I always longed for something with interesting hardware and a few tricks. So to occupy myself a little recently I decided to right the wrongs of the 1990s and jump in to starting out with 68000 assembler... More specifically the ST.

I started with the Atari because of the simpler architecture - A screenbuffer and... yup. That's about it really. It has a few things in common with the Amiga (planar graphics), the palette is only 16 colours and you don't have such fine control (unless you target the STe), no blitter (STe again) but I figured the less custom hardware to setup the less I could get wrong whilst learning the instruction set.

And here we have the generic 1980s logo and scroller. Bit rough codewise because although it runs at 50hz there's 86 out of 200 lines taken up with static logos and the remaining chessboar area takes about 60% of the CPU time.

The 1-bitplane scroller has to be manually rotated and is then copied into the screen buffer, using another 15-ish percent of the frametime. Not a problem though because the screen is controlled by 2 interrupts - one just below the first logo to set the palette for the 'effect area', and a second below it which swops the video pointers (this doesn't take effect until the next frame), calls the music player (which basically streams out YM soundlog format data) and sets the logo palettes. Not exactly awe-inspiring but not bad for a first attempt and kinda smooth.

There's a youtube video of it in all it's 'glory' stashed away here.

Now let's try the Amiga...