phaeron Posted June 8, 2012 Share Posted June 8, 2012 Midnight Magic on the Atari 2600 was one of my favorite pinball games when I was growing up, and on a whim I decided to give a shot at porting it to the 800. The results are attached. I've tried to match the original version as exactly as possible. Notes: Most of the code from the original 16K cart is in this version, including all of the physics code. I've relocated it from $9/B/D/F000 to $4000-7FFF. Thankfully, the original programmer used different addresses for the banks, which made it much easier to disassemble. What was a pain was correcting all of the false labels caused by offset indexing (LDA table-10,X) and tracking down the code that was doing LSB address comparisons and broke when the tables were moved. On the 2600, the screen is generated almost entirely using the players, with a few tiny bits done using the playfield and the missiles. The ball, well, is used for the ball. The amount of HMOVE and player repeating in the ~3K display kernel was insane and so I chucked the whole thing and rewrote a new display kernel on top of a mode E playfield, thus the bloating to 20K. It could probably be squished back into 16K for a 400 or 5200, but I was too lazy. Priority between the ball and the rollovers/unders are probably wrong in a few places since I completely redid the sprite usage. The game does not use sprite collisions, which made porting easier. All collisions are done algorithmically using an RLE collision map and a series of per-object collision routines, which take up most of the cartridge. The game runs four physics ticks per VBLANK. The audio is matched as closely as I could, with 1.79MHz 16-bit paired timers to hit the right frequencies. One notable difference is that the drop and catch targets don't quite produce the right sound -- this is because POKEY can't quite emulate the 5-bit div 3 mode. Most of the rest of the sounds just use pure tone, which was easy to map. Game Reset and Game Select have been mapped to Start and Select, and Option flips both the difficulty switches. The BW/Color switch is hardwired to Color; in the original game setting this to B&W causes the second player to run on autopilot, which I thought was useless (and took a while to track down). pinball.zip 13 Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.