Jump to content
phaeron

Midnight Magic for Atari 800

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 12

Share this post


Link to post
Share on other sites

That's looking pretty good - can't say I've really played the 2600 version though.

 

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

Share this post


Link to post
Share on other sites

just downloaded and test drove for a few. Great port! Thanks.

 

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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites

That sounds pretty usual.

 

Colour 4 on Pal is definitely not red. Star Raiders has the exact same thing happen, as well as countless other games.

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

- Phoenix

 

 

It looks like someone is actually working on this one. He doesn't say how far along he is, but he's updating his in-progress Windows tool for the Atari 800 regularly. It's a user here on AtariAge.

 

Phoenix for Atari 800

Share this post


Link to post
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.

Share this post


Link to post
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 ;) ;)

Share this post


Link to post
Share on other sites

Wow - Brilliant work - and it's one of my all time favourite VCS titles - Thankyou!

 

Phaeron, you sir, are a genius. :-D

  • Like 1

Share this post


Link to post
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".

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

I'd put the name change down to marketing.

 

It was one of the most famous pinball games of the time. Chances are everyone just called it "Midnight Magic" by the time the 2600 version was started.

Share this post


Link to post
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.

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...