Jump to content

Photo

Adventure 2600 to 8bit ?


46 replies to this topic

#26 Rybags ONLINE  

Rybags

    Quadrunner

  • 15,883 posts
  • Location:Australia

Posted Tue Sep 1, 2015 8:43 AM

Nicely done.  Had a quick go on Level 1.

 

Sometimes the object you're carrying (most noticably the bridge) doesn't appear right away when you move onto the next screen.  I'm guessing maybe some sort of positioning conversion issue?

 

I'll have to pull the finger out and do my sound engine.  I've had the idea for a while to do an engine that allows realistic creation of the LFSR types by using Timer IRQs + forced volume.

Allow 2 or 3 levels of emulation depending on what resources a game leaves, e.g. basic freq/poly conversion, Timer IRQ for low/med frequencies only with high freq by conversion, true emulation with Timer IRQ for everything.

 

I'll have to pull the other finger out and do the conversion I started 3 years ago.



#27 tep392 OFFLINE  

tep392

    River Patroller

  • 3,096 posts
  • Location:Peoria, IL

Posted Tue Sep 1, 2015 9:19 AM

Anyone find the cheat?



#28 accousticguitar OFFLINE  

accousticguitar

    Quadrunner

  • 6,999 posts
  • Sherlock made it to 15 before he left us.
  • Location:Idaho

Posted Tue Sep 1, 2015 11:46 AM

 

 

Sometimes the object you're carrying (most noticably the bridge) doesn't appear right away when you move onto the next screen.  I'm guessing maybe some sort of positioning conversion issue?

 

 

That's normal on the 2600 version.



#29 phaeron OFFLINE  

phaeron

    River Patroller

  • 2,627 posts
  • Location:Bay Area, CA, USA

Posted Tue Sep 1, 2015 10:14 PM

Whan was it done? How much it took? Tools used?

 

According to the local filesystem, started Friday, 3:15pm PDT, finished Friday 7:41pm PDT. :D

 

Of course, having the disassembly already done helps out a lot. There is one issue with the original disassembly to be aware of -- there are a bunch of bogus references to VSYNC,X, RSYNC,X, etc. These don't actually refer to hardware registers and are just offset indexing at 0,X, 1,X, etc. used to index into object data arrays in page zero.

 

Tools used: Visual Studio 2015 for text editor, MADS for assembler, Altirra for testing, 800XL on living room floor for cert.

 

The approach was the same as the previous ports: find the VSYNC access to identify the VBLANK routine and use it to lock to ANTIC's frame, drop in the sound and input drivers, and then move over the writes to color and sprite data registers from TIA to GTIA locations to get something on screen. After that, it's the game-specific laborious work of dissecting the display kernel and converting the sprite usage to what ANTIC/GTIA can do. The 2600 can actually display more sprite images and move more sprites per scanline than the 800, so this can get hairy fast if the game pushes the hardware. GTIA also doesn't have the ability to reflect sprites.

 

As noted earlier, Adventure's TIA usage is really basic, probably simpler than Combat. It simply uses the two players directly as object sprites, the ball as the avatar sprite, and the two missiles as side barriers, with no mid-screen use or changes to position/size/color. The one trick is that it uses the VDELAY latches to sync the sprite updates, which doesn't work on GTIA. I went a bit farther this time and removed the entire display kernel, so the game is running entirely on playfield and P/M graphics DMA. Instead, there's a small routine that translates the 7-row TIA playfield to an ANTIC IR mode 8 playfield and two DLIs to vertically clip the sprites. Pre-translating the levels would free up a few dozen scanlines per frame and leave plenty of time for IRQ sound emulation.

 

That having been said, Adventure runs quite slowly with a 3-frame / 20Hz main loop; that's why the sprite multiplexing flickering is so bad compared to even other 2600 games. On a PAL ANTIC, the port skips one out of every 6 frames to equalize the speed with the original NTSC rate.



#30 Stephen OFFLINE  

Stephen

    Quadrunner

  • 7,261 posts
  • A8 Gear Head
  • Location:No longer in Crakron, Ohio

Posted Tue Sep 1, 2015 11:09 PM

 

 The 2600 can actually display more sprite images and move more sprites per scanline than the 800, so this can get hairy fast if the game pushes the hardware. GTIA also doesn't have the ability to reflect sprites.

Can you please elaborate further?  I know the TIA can double or triple sprites as well as reflect them.  But I was not aware the 2600 could move more sprites per scanline.  How is this possible given the TIA only has two players and a ball?



#31 phaeron OFFLINE  

phaeron

    River Patroller

  • 2,627 posts
  • Location:Bay Area, CA, USA

Posted Tue Sep 1, 2015 11:23 PM

Can you please elaborate further?  I know the TIA can double or triple sprites as well as reflect them.  But I was not aware the 2600 could move more sprites per scanline.  How is this possible given the TIA only has two players and a ball?

 

TIA allows horizontal position deltas to be preconfigured for each of the five sprites, all of which are triggered by one write to HMOVE. GTIA requires the 6502 to move them one at a time, which costs more cycles than are available in horizontal blank. Add in replication and it's effectively nine sprite images moved per scan line.



#32 Stephen OFFLINE  

Stephen

    Quadrunner

  • 7,261 posts
  • A8 Gear Head
  • Location:No longer in Crakron, Ohio

Posted Wed Sep 2, 2015 8:06 AM

 

TIA allows horizontal position deltas to be preconfigured for each of the five sprites, all of which are triggered by one write to HMOVE. GTIA requires the 6502 to move them one at a time, which costs more cycles than are available in horizontal blank. Add in replication and it's effectively nine sprite images moved per scan line.

Thanks for the explanation.  I wonder why certain cool features were removed from the TIA such as replication and reflection?  Guess it came down to the transistor count.



#33 Rybags ONLINE  

Rybags

    Quadrunner

  • 15,883 posts
  • Location:Australia

Posted Wed Sep 2, 2015 9:35 AM

Yep, they would have been very handy, especially the replicate.

 

Maybe it comes down to display method - doesn't TIA rely on the LFSR sequencing where GTIA has actual counters and comparitors?  Though I should think redisplay methods would need some extra trickery regardless of the other methods in use.



#34 vitoco OFFLINE  

vitoco

    Moonsweeper

  • 311 posts

Posted Wed Sep 2, 2015 11:30 AM

 

According to the local filesystem, started Friday, 3:15pm PDT, finished Friday 7:41pm PDT. :D

 

That's less than 5 hours!!! :-o

 

Probably it'd take more than 5 weeks to me...

 

Thanks for the explanation... I'll take that and try another game from the ones that have sources available.

 

 

Of course, having the disassembly already done helps out a lot. There is one issue with the original disassembly to be aware of -- there are a bunch of bogus references to VSYNC,X, RSYNC,X, etc. These don't actually refer to hardware registers and are just offset indexing at 0,X, 1,X, etc. used to index into object data arrays in page zero.

 

I noticed that your 800 version uses page 0 indexing on low addresses replacing VCS's VSYNC, VBLANK... I guess that's the reason why Altirra locks and crashes when reset key (F5) is pressed.



#35 phaeron OFFLINE  

phaeron

    River Patroller

  • 2,627 posts
  • Location:Bay Area, CA, USA

Posted Wed Sep 2, 2015 9:26 PM

Thanks for the explanation.  I wonder why certain cool features were removed from the TIA such as replication and reflection?  Guess it came down to the transistor count.

 

TIA does sprite positioning and shifting completely differently than GTIA.

 

GTIA runs a single position counter and compares it against each sprite position, whereas TIA runs a position counter per sprite. From what I've heard, HMOVE works by just running a few more or less clocks into the counter for each sprite. GTIA would need an incrementer/decrementer to do the same. However, the TIA's design is also responsible the PITA positioning method where you can't just write the position that you want the sprite to appear at, but instead have to time a strobe write horizontally for coarse positioning and follow it up with a fine adjustment with HMOVE. 2600 games frequently take a whole scanline per sprite to do this, so it's a big waste of time. TIA also can't clip sprites horizontally -- they wrap from one scanline to the next.

 

Shifting is also different. TIA appears to treat each player graphics register as a tiny RAM addressed by a counter, whereas the GTIA copies the player graphics register into a shift register. TIA can just invert the position while GTIA would need to be able to run the shift register backwards or have a crossover in the load logic.

 

Overall, my guess is that the GTIA player logic is simpler than the TIA logic and that was partly what allowed the increase from 2 players + 3 1-bit missiles to 4 players + 4 2-bit missiles. Also, HMOVE is not that useful without a display kernel, which is against the philosophy of having ANTIC mostly handle the per-scanline spoonfeeding.

 

 

I noticed that your 800 version uses page 0 indexing on low addresses replacing VCS's VSYNC, VBLANK... I guess that's the reason why Altirra locks and crashes when reset key (F5) is pressed.

 

Yeah, I forgot to stomp PUPBT1-3 + COLDST this time, so it tries to warm start and blows up.



#36 Goochman OFFLINE  

Goochman

    Quadrunner

  • 6,962 posts
  • Moongates to the Past

Posted Thu Sep 3, 2015 2:08 PM

Anyone find the cheat?

 

Yes it is there - this is great and thanks Phaeron for the conversion!



#37 TwiliteZoner OFFLINE  

TwiliteZoner

    Dragonstomper

  • 689 posts
  • Location:Atlanta, GA

Posted Sun Sep 6, 2015 6:58 PM

Try this -- quick port attached. Start -> Game Start, Select -> Game Select, B -> Toggle B&W, 1/2 -> toggle difficulty 1/2. PAL frame rate compensated.

 

Adventure's TIA usage is very straightforward, so this is a good one to try if you want to give a shot at conversion.

 

Phenomenal. Thank you. 



#38 El Destructo OFFLINE  

El Destructo

    Chopper Commander

  • 201 posts
  • Location:Portland, OR

Posted Tue Sep 8, 2015 11:44 PM

Hi! I'm the author of the incomplete BASIC version. I began writing it as a tribute when I was just starting college. No source code or disassembly was available to me at the time, of course; I just created it from observation of the original game, much as authors of arcade ports did in those days. I also made a room layout and linking editor to aid in creating the original levels which I planned to release along with the game so that others could make their own Adventures from the original building blocks.

 

I always intended to eventually convert some or all of it to assembly language, but college studies and other projects soon took priority. Looks like Phaeron has made short work of it now. Well done!


Edited by El Destructo, Tue Sep 8, 2015 11:47 PM.


#39 Mclaneinc OFFLINE  

Mclaneinc

    Quadrunner

  • 6,114 posts
  • Location:Northolt, UK

Posted Wed Sep 9, 2015 5:53 AM

5 hours to port a game..Simply amazing..

 

As a knuckle dragging Neanderthal I'd be 5 weeks just thinking about it..



#40 PacManPlus OFFLINE  

PacManPlus

    River Patroller

  • 4,788 posts
  • Atari 7800 & NES Developer
  • Location:Florida

Posted Wed Sep 9, 2015 5:55 AM

I hate to ask, but...

 

any chance of porting this to the 5200?  :(



#41 peteym5 OFFLINE  

peteym5

    River Patroller

  • 2,319 posts
  • Location:Buffalo NY USA

Posted Wed Sep 9, 2015 7:48 AM

Maybe we can have Albert or Video61 put Adventure onto cartridges if there is enough people interested. I know either of them will do it if they get enough interested buyers. I did some quick looks at the source code and probably can be further optimized/converted for Atari 8-bit  I would personally rewrite the player/missile sections to use all 4 players for the screen objects and missiles for the thin walls. Reduce flickering. Can do some interesting hacks with it also.



#42 Agent570 OFFLINE  

Agent570

    Space Invader

  • 13 posts

Posted Thu Sep 17, 2015 8:57 AM

Try this -- quick port attached. Start -> Game Start, Select -> Game Select, B -> Toggle B&W, 1/2 -> toggle difficulty 1/2. PAL frame rate compensated.

 

Adventure's TIA usage is very straightforward, so this is a good one to try if you want to give a shot at conversion.

 

I joined the site (been lurking here practically since Day One) just to thank you for doing this.  I have been waiting for an A8 version of the game since forever and you got a version up and running in 5 hours - great work! 

 

I also agree with whoever said upthread that if someone's going to port Adventure, it has to be Warren's original code, glitches and all - I personally wouldn't want it any other way.

 

The one issue I'm noticing now involves the dragons - it's quite hard to escape them after they bite and you tend to get stuck on them instead of being able to escape.  I do realize that it's the first version, just wanted to mention that.

 

Thanks again for the port, I'm looking forward to seeing where this goes...



#43 Lynxpro OFFLINE  

Lynxpro

    River Patroller

  • 3,656 posts
  • Location:Sacramento, CA

Posted Sat Nov 28, 2015 12:09 AM

I hate to ask, but...

 

any chance of porting this to the 5200?  :(

 

Team 52! Team 52!  :)

 

Probably not a good candidate to add Trak-Ball support to though.



#44 dragos OFFLINE  

dragos

    Moonsweeper

  • 281 posts
  • Location:Indianapolis, IN

Posted Sat Nov 28, 2015 1:41 PM

I'd love to have a cart of this.  or a rom file for my flash cart :)



#45 eegad OFFLINE  

eegad

    Moonsweeper

  • 353 posts
  • Location:New Jersey

Posted Tue Mar 29, 2016 2:23 PM

Just stumbled on this Adventure 2600 port today. Truly awesome.  Blows my mind how you could do it in such a short period of time. I can see how the bulk of the game logic is fairly straightforward, and mapping locations of control inputs, etc.  But I can't even imagine how to convert a 2600 display kernel (I know you gave some explanation, but since I haven't done any 800/xl/xe assembly programming since the late 80's, it just went over my head)

 

Anyway, thanks for the port of my favorite 2600 game!  And if you're ever bored one day and would like to port Phoenix 2600......   :-)



#46 +Adam+ OFFLINE  

+Adam+

    Moonsweeper

  • 479 posts

Posted Mon Oct 31, 2016 4:05 PM

I think many people here on AtariAge didn't notice that in this thread in 2015 Phaeron presented an Atari 8-bit port of the famous Adventure game (in the post #24) :)

And in some parts of the world, where Atari 2600 was not sold, this game is almost unknown. So I've published an article on AtariOnline.pl about Adventure and its importance in games history: link



#47 tjlazer OFFLINE  

tjlazer

    River Patroller

  • 2,108 posts
  • Retro Atari Addict
  • Location:Historic South Tacoma, WA USA

Posted Wed Nov 2, 2016 6:54 PM

We now need Phaeron to port Frost bite!

3b5cc1b3ab2ec493096c7b58edaee976.jpg

Edited by tjlazer, Wed Nov 2, 2016 6:55 PM.





0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users