Quantcast
Channel: EmuTalk.net
Viewing all articles
Browse latest Browse all 2612

Space Invaders Emulator - All the Invaders draw in bottom LH corner

$
0
0
Hi All,

First time post on what looks like a great forum.

I am after some assistance with a Space Invaders Emulator that I have written. Before I start I will say that it is written in Blitz3D as I was just interested to see whether an old skool language like Blitz would have enough grunt to do the job, and when it works, I will then try it on older more obscure platforms (maybe PS2 YaBasic for real old and obscure..).

It turns out that it runs pretty well and at full speed without sweating and I have implemented 8080 processor, Interrupts and 16 bit shift register.

The emulator runs well until it gets to the attract screen, where all of the invaders draw themselves in the same screen location at the bottom LH side of the screen, and then the gun shows up and starts blasting away at empty space.

From what I can see, the Space Invaders pixels are taken from the shift register and then placed into the correct video memory location a column at a time. As the Space Invaders display in on its side, this means that the invaders are drawn from the bottom left of the screen to top right in Columns(rows) a byte of pixels at a time. The actual memory location that the pixels from the shift register are put is I think derived from the memory location stored in HL, and each column is counted off in BC, something like 24 lots of 8 bytes of pixels per column.

Has anyone had an issue like this and if so how was it resolved?

Many thanks for any information that anyone can give.

Edit 1 - Having spent an hour trawling through the debug log, I can see that HL is around 16 bytes off where it should be when it starts to draw invaders. This may be because at least part of the emulator thinks that there is no space invaders left to draw... and the other part thinks there is and starts drawing them! Back to ComputerArcheology's space invaders code page...
Attached Thumbnails
Click image for larger version. 

Name:	SI1.jpg 
Views:	N/A 
Size:	83.1 KB 
ID:	40321   Click image for larger version. 

Name:	SI2.jpg 
Views:	N/A 
Size:	73.7 KB 
ID:	40322  

Viewing all articles
Browse latest Browse all 2612

Trending Articles