Jump to content
IGNORED

Midnight Magic for Atari 800


phaeron

Recommended Posts

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

  • Like 14
Link to comment
Share on other sites

OH MY!!!!!

 

This is my LUCKY DAY!!!!

 

I have been begging for a port of this game for years. I am so addicted to this game. Unfortunately I did not have any space left for another Atari setup, so there was no 2600 in my room... only a few moments a year to play this game. Now I can play this on my Atari XL/XE. You are too good to be true! Thanks thanks thanks!

 

I'm going to play this game a lot today, to check how it is the same. First try was very promising.

 

I would like to make a donation for this. Is that possible? Do you have paypal or something?

 

Greetz

Marius

 

p.s. There are two other fabulous Atari 2600 titles btw that need a port hehe: Private Eye (Activision) and Barnstorming (also Activision IIRC)... is there any chance you could look at those too one day? I'd be very thankful AGAIN :D

Link to comment
Share on other sites

Are you using an emulation algorithm to do the TIA sounds or did you just convert the AUDF etc values at the source level?

 

I just tacked on a routine onto VBLANK that reads the TIA zero page locations and translates them to POKEY values. TIA only has 5-bit counters, so the frequency lookup tables are pretty small. It wasn't until much later that I found out where the sound routines and tables were. Also, the TIA audio counters run at 30KHz, so they don't map nicely -- that's why I ran paired 16-bit channels instead.

 

It might be possible to emulate the missing mode with a high speed IRQ, but it'd be tough to interleave with the display kernel. Since this was originally a 2600 game, it uses a lot of mid-screen color and sprite changes to make up for the otherwise lack of detailed graphics. It might be a little easier to interleave a 15KHz IRQ, if the error is low enough not to be noticeable.

 

You plan on any tweaking or mods - - or just leaving a straight up port? Either way, great stuff!

 

Just a straight up port. I don't think it'd be easy to add to this game without ruining it, somehow. A VBXE enhanced version is left as an exercise for the reader. :)

 

I would like to make a donation for this. Is that possible? Do you have paypal or something?

 

Nah, I can't take money for just porting someone else's game.

 

p.s. There are two other fabulous Atari 2600 titles btw that need a port hehe: Private Eye (Activision) and Barnstorming (also Activision IIRC)... is there any chance you could look at those too one day? I'd be very thankful AGAIN :D

 

Are you crazy? Do you have any idea how much of a pain just this one was? I had nothing to go on but a vertically moving ball on screen for days! :-D

 

If I had to pick another one to do, it'd probably be Vanguard. The 5200/800 version was a lot closer to the arcade, but for some reason it just felt more sterile to me than the 2600 version. Raiders of the Lost Ark and Riddle of the Sphinx also come to mind, but the spirit of the former is already carried in Sir Galahad and the Holy Grail, and the latter looks like an utter nightmare of sprite abuse (although I believe it has already been disassembled).

  • Like 1
Link to comment
Share on other sites

A double speed mode IMO would be cool if it's not already available. That is assuming the game doesn't rely on hardware collision detection.

 

Re TIA stuff - the Moon Cresta conversion I'm doing, the frequency conversion can be done algorithmically for some AUDC types.

But yes, the frequency*AUDCn possibilities are so small, it's practically viable to translate every single possible sound into tables to run at whatever base rate you choose.

 

Re other games, I've always wanted to see a 2600 Space Invaders conversion. Despite the different look/feel I still reckon it's one of the best home versions.

Edited by Rybags
Link to comment
Share on other sites

I notice one difference with real hardware.

 

When I play midnite magic on my real 2600 on my CRT Television the first screen is deep red. On the Atari 800XL it is purple. I'm playing this on PAL equipment.

 

I noticed a long time ago that on Emulator Midnite Magic is always Purple on the first screen.

 

What is causing this 'problem' ? Where is the color palette located in the binary?

 

On the top of the screen there are these five 'planks' ... they represent the colors of the 5 pinball bonus screens. The first plank is too dark, compared too my Atari 2600, but this can be the same issue... (I think it is).

 

Anyone have same experience on PAL?

Link to comment
Share on other sites

btw. just discovere this thread. Any ideas how this "process of 2600 ports" can be generalised? I mean in terms of basic knowledge like I have in porting VIC-20 games f.e.?

 

there are still some 2600 gems missing and I always thought they should be ported. Activision did a lot (River Raid, Pitfall, Decathlon, Keystone Kapers et al) but what I am missing:

 

- Star Master

- Tank Command

- Sea Quest

- Solaris

- Phoenix

- Raiders of the Lost Arc

- California Games

- Chopper Command

- Smurfs

Link to comment
Share on other sites

I've put a little thought into it.

 

Doing a kernal in many cases just isn't practical. You can't "emulate" Playfield anywhere quickly enough. Repeated player mode isn't possible. Any cycle-exact code will fail.

 

Probably the best bet is to use the general game code and totally redo the display aspect. One possible way of doing 2600 playfield generation could be to use Graphics 3 + VScrol tricks to give a 40 x 192 area. The playfield data could be generated by running a modified kernal in a loop with table-lookup to perform translation which can then be inserted into the bitmap.

 

The method used for tranlations would be on a per-case basis. What works for one won't necessarily be good for another.

 

 

Another thought I had is that VBXE might help. Have a quickrun display kernal which puts all the data into an array structure, then have VBXE transform it all into displayable data.

Edited by Rybags
Link to comment
Share on other sites

Hi there!

 

I made 2 pics.

 

Unfortunately it is hard to picture a CRT due to the lights of the tube, so I had to picture this from the side, but it shows rather well the difference.

 

Note: the ported Midnight Magic looks on my PAL 800XL the same way as it looks in emulator.

 

Ported Midnite Magic on Atari 800XL (PAL)

 

 

Original Atari 2600 PAL on my setup (same TV settings)

 

 

I'll take a look in the source to see where to change to color pallette...

 

greetz

M.

Link to comment
Share on other sites

I would like to make a donation for this. Is that possible? Do you have paypal or something?

Nah, I can't take money for just porting someone else's game.

 

I really do respect this point of view, but hey... you did put a lot of time in this, and I appreciate a lot what you did. I'd say, this efforts should be rewarded with a little donation,... but I'm not going to force you to accept my gift ;) ;)

Link to comment
Share on other sites

I'd just like to underline a phrase Phaeron wrote, that I reckon you won't see very often these days...

 

"thus the bloating to 20K".

 

LOL...Very true....

 

Its 20K just for the filename now :)

 

 

@Phaeron, so this is what you have been up to, really nice and thank you for the time..

 

Off to have a play

Link to comment
Share on other sites

why is the 2600 version better than the already existing 800 port?

 

Who are you talking to now? As far as I know wasn't there any port of the 2600 version of Midnight Magic so far. The port in this thread is the only existing port of Atari 2600 Midnight Magic for Atari 8bit platform.

Link to comment
Share on other sites

The "existing" one is "David's Midnight Magic".

 

It was originally done on the Apple 2, then later released on other platforms.

 

Yeah, but except for the name these two games (David... and atari 2600 version) do not have a lot in common.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...