Jump to content

Photo

Midnight Magic for Atari 800

pinball 2600 800 port

82 replies to this topic

#1 phaeron OFFLINE  

phaeron

    River Patroller

  • 2,292 posts
  • Location:USA

Posted Thu Jun 7, 2012 11:02 PM

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

Attached Files



#2 Rybags OFFLINE  

Rybags

    Quadrunner

  • 15,263 posts
  • Location:Australia

Posted Thu Jun 7, 2012 11:35 PM

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?

#3 suspicious_milk OFFLINE  

suspicious_milk

    Chopper Commander

  • 203 posts
  • Location:Muncie, IN USA

Posted Thu Jun 7, 2012 11:43 PM

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!

#4 ProWizard OFFLINE  

ProWizard

    River Patroller

  • 4,540 posts
  • Into Stampede
  • Location:In the cattle!

Posted Thu Jun 7, 2012 11:47 PM

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

#5 phaeron OFFLINE  

phaeron

    River Patroller

  • Topic Starter
  • 2,292 posts
  • Location:USA

Posted Fri Jun 8, 2012 12:07 AM

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

#6 doomguy OFFLINE  

doomguy

    Space Invader

  • 37 posts

Posted Fri Jun 8, 2012 12:26 AM

Fantastic work! Thanks!

#7 Rybags OFFLINE  

Rybags

    Quadrunner

  • 15,263 posts
  • Location:Australia

Posted Fri Jun 8, 2012 12:31 AM

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, Fri Jun 8, 2012 12:32 AM.


#8 ProWizard OFFLINE  

ProWizard

    River Patroller

  • 4,540 posts
  • Into Stampede
  • Location:In the cattle!

Posted Fri Jun 8, 2012 1:18 AM

Are you crazy?


Absolutely :D :D :D

#9 ProWizard OFFLINE  

ProWizard

    River Patroller

  • 4,540 posts
  • Into Stampede
  • Location:In the cattle!

Posted Fri Jun 8, 2012 1:27 AM

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?

#10 Rybags OFFLINE  

Rybags

    Quadrunner

  • 15,263 posts
  • Location:Australia

Posted Fri Jun 8, 2012 1:42 AM

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.

#11 Heaven/TQA ONLINE  

Heaven/TQA

    Quadrunner

  • 10,383 posts
  • Location:Baden-Württemberg, Germany

Posted Fri Jun 8, 2012 1:46 AM

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

#12 Rybags OFFLINE  

Rybags

    Quadrunner

  • 15,263 posts
  • Location:Australia

Posted Fri Jun 8, 2012 1:50 AM

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, Fri Jun 8, 2012 1:54 AM.


#13 MrFish OFFLINE  

MrFish

    River Patroller

  • 4,262 posts
  • Location:1010-1010

Posted Fri Jun 8, 2012 2:06 AM

- 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

#14 ProWizard OFFLINE  

ProWizard

    River Patroller

  • 4,540 posts
  • Into Stampede
  • Location:In the cattle!

Posted Fri Jun 8, 2012 2:17 AM

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.

#15 ProWizard OFFLINE  

ProWizard

    River Patroller

  • 4,540 posts
  • Into Stampede
  • Location:In the cattle!

Posted Fri Jun 8, 2012 3:13 AM

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 ;) ;)

#16 xzerix OFFLINE  

xzerix

    Star Raider

  • 52 posts

Posted Fri Jun 8, 2012 3:23 AM

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

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

#17 wesmond OFFLINE  

wesmond

    Star Raider

  • 79 posts
  • Location:London, UK

Posted Fri Jun 8, 2012 4:16 AM

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

#18 Mclaneinc ONLINE  

Mclaneinc

    Quadrunner

  • 5,036 posts
  • Location:Northolt, UK

Posted Fri Jun 8, 2012 5:12 AM

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

#19 CrazyChris OFFLINE  

CrazyChris

    Dragonstomper

  • 820 posts
  • Location:OH

Posted Fri Jun 8, 2012 5:31 AM

Can you port this to the 5200?

#20 Heaven/TQA ONLINE  

Heaven/TQA

    Quadrunner

  • 10,383 posts
  • Location:Baden-Württemberg, Germany

Posted Fri Jun 8, 2012 6:01 AM

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

#21 ProWizard OFFLINE  

ProWizard

    River Patroller

  • 4,540 posts
  • Into Stampede
  • Location:In the cattle!

Posted Fri Jun 8, 2012 7:35 AM

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.

#22 Rybags OFFLINE  

Rybags

    Quadrunner

  • 15,263 posts
  • Location:Australia

Posted Fri Jun 8, 2012 7:44 AM

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

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

#23 Stephen OFFLINE  

Stephen

    Quadrunner

  • 6,549 posts
  • A8 Gear Head
  • Location:No longer in Crakron, Ohio

Posted Fri Jun 8, 2012 7:55 AM

Awesome work!

#24 ProWizard OFFLINE  

ProWizard

    River Patroller

  • 4,540 posts
  • Into Stampede
  • Location:In the cattle!

Posted Fri Jun 8, 2012 8:17 AM

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.

#25 Rybags OFFLINE  

Rybags

    Quadrunner

  • 15,263 posts
  • Location:Australia

Posted Fri Jun 8, 2012 8:30 AM

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.





Also tagged with one or more of these keywords: pinball, 2600, 800, port

0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users