PacManPlus Posted June 30, 2004 Share Posted June 30, 2004 Hello All: With the spirit of Nukey Shay making Hangly Man for the 2600, I followed suit for the 5200... with 2 outstanding issues: 1) Top and bottom side tunnels: Take way too long to get through, and if you meet a monster while in there, you will pass right through him! Also exibits the same 'dot disappearing' bug that the regular side tunnel has 2) Does not have the empty maze (yet - might need a little help with this one) Although I can't see why it can't be put in there - the first 4K of the bin is all 'FF'. The maze was one pain to figure out - it looks like a character set, with each position defined in different ways: for instance the value $03 was the top left of a square wall. The value $1C was the top left corner of the outer maze. There was some shortcuts as well. If you started with $C, the next 3 bytes assumed a zero half-word. (so you would only supply the second byte of the word 3 times). If you started with $8, the next byte told how many times the following word would repeat. All in all, here are all the memory locations I found (using Hack-O-Matic only, by the way - I haven't looked at the disassembly yet): 1622-17ef: Pac Cartoon Graphics 21e1-2385: Maze and Dots layout 3416-34af: Maze Permissions 3af0-3b95: In Game Characters 3c11: Blinky Color 3c12: Pinky Color 3c13: Inky Color 3c14: Clyde Color 3c15: Maze Color 3c18: Pac Color 3c27-3c39: Blue Time (for each board - starts w/ cherry) 3c3e-3c82: Score Characters 3d40-3d67: Pointer to Fruit Score Graphics 3e9c-3e9f: Direction Reversal? 3ec5-3edd: Fruit point value (for each board - starts w/ cherry) With the maze permissions, each byte is '0000RLDU' and the first bit is set if the monsters cannot go up (just above the starting point, and just above the monster pen) You are pretty limited with what mazes you can create, as there are only 10 bytes per line with 10 lines. The fruit points use 2 bytes, and they are divided by 100. (So the cherry value is 0000000000000001) I have not been able to find the fruit characters. I check an old post where Nukey mentioned how they are stored, but the values don't match what he posted. They were also nowhere to be found within the rom. Maybe he has a different dump? Anyway, here is what I think is the first hack here of a 5200 game? If anyone would like to give me pointers on the above two issues, that would be great. Although I think to switch mazes, I just have to look for a $21e1 address in the disassembly? And as far as the side door, I would imagine that there is code to look for a certian horizontal & vertical position and then move the player to the other side. I should just make it ignore the vertical position, no? I will try it out in the real thing very soon - once I get my 5200 boards from Al Enjoy! hang5200.zip Quote Link to comment Share on other sites More sharing options...
PacManPlus Posted June 30, 2004 Author Share Posted June 30, 2004 Correction to above: The fruit points use 4 bytes (Damn lack of edit) Quote Link to comment Share on other sites More sharing options...
PacManPlus Posted June 30, 2004 Author Share Posted June 30, 2004 version .02 - Fixed the maze just above the starting point (oops) hang5200.zip Quote Link to comment Share on other sites More sharing options...
Vic George 2K3 Posted July 1, 2004 Share Posted July 1, 2004 Darn it...doesn't run on VSX and I can't get Atari 5200 emulation running on MESS! Quote Link to comment Share on other sites More sharing options...
PacManPlus Posted July 1, 2004 Author Share Posted July 1, 2004 Hi! I have found that it runs on Dan Boris' 5200 emulator, and jum52... I couldn't get it working with MESS either Quote Link to comment Share on other sites More sharing options...
Nukey Shay Posted July 1, 2004 Share Posted July 1, 2004 I have not been able to find the fruit characters. I check an old post where Nukey mentioned how they are stored, but the values don't match what he posted. They were also nowhere to be found within the rom. Maybe he has a different dump? Correction: I was hacking the Atari 800 version to add in turbo (since it was more complete with the better eating sound and intermissions). So the memory location descriptions in that post applies to that version. The 5200 version should be similar, but the rom/ram locations would be different. Should follow roughly the same method AFAIK. These are not stored as straight bitmaps...but every Nth byte (IIRC, the first line of all the fruits, then the next line of all the fruits, and so on). That way, the level number can be used to transfer the bytes to the redefined character set...just used as an index. But changing them shouldn't really be an issue, since the fruit objects in Hangly Man are identical to original Puck Man's. Quote Link to comment Share on other sites More sharing options...
PacManPlus Posted July 1, 2004 Author Share Posted July 1, 2004 Thanks (as always) Nukey It's very cool how much you instinctively know about this. I used to know assembler quite a bit of time ago (for the Apple IIc) and I'm having trouble following it! I didn't necessarily want to try and change them; I was just trying to be as complete as possible with the graphics locations and how to change them. (Also in case I wanted to attempt 'Plus') I will try and fix those two problems, though - I'm too far along with this to stop now! Quote Link to comment Share on other sites More sharing options...
Nukey Shay Posted July 1, 2004 Share Posted July 1, 2004 Hint: Look for the top line of the fuji symbol. I think that was how I tracked it down (because only 1 color is used for that one). All the fruits are mapped as 16-bit data for the multicolor character mode...so they will appear in the center of the screen. Quote Link to comment Share on other sites More sharing options...
Nukey Shay Posted July 1, 2004 Share Posted July 1, 2004 Try this... debug pacman.bin Then search for the byte pair of the top line of the fuji... s 0000 ffff 33 30 -or- s 0000 ffff 11 10 -or- s 0000 ffff 22 20 Though the high bits might have been used...I can't remember. In that case, you'd: s 0000 ffff 0C CC -or- s 0000 ffff 08 88 -or- s 0000 ffff 04 44 There's only a few combinations either way. Debug will report the offset how far into the rom the byte pair was found (but it will be off by $100...so subtract 1 from the high byte of any numbers that pop up). These won't be Atari addresses, but just an offset from the start of the binary. Quote Link to comment Share on other sites More sharing options...
Nukey Shay Posted July 1, 2004 Share Posted July 1, 2004 Oh...and enter q to exit debug. Dunno if you knew that. Quote Link to comment Share on other sites More sharing options...
PacManPlus Posted July 2, 2004 Author Share Posted July 2, 2004 Thanks! I'll give that a try Quote Link to comment Share on other sites More sharing options...
ATARI TROLL Posted July 2, 2004 Share Posted July 2, 2004 Plain and simple.....this KICKS ass Quote Link to comment Share on other sites More sharing options...
PacManPlus Posted July 2, 2004 Author Share Posted July 2, 2004 Thank you Quote Link to comment Share on other sites More sharing options...
+Allan Posted July 2, 2004 Share Posted July 2, 2004 This hangs in all Mac emulators. I'm waiting to get my PC back so I can try it on the real thing with my Maxicart. Anybody try it on a real 5200? Allan Quote Link to comment Share on other sites More sharing options...
Vic George 2K3 Posted July 2, 2004 Share Posted July 2, 2004 Tried it briefly on Jum52 for Windows. Pac-Man and the monsters seem to take a longer time travelling through the shorter tunnels (meaning the ones added to the maze, rather than the shortened center tunnel). Quote Link to comment Share on other sites More sharing options...
PacManPlus Posted July 2, 2004 Author Share Posted July 2, 2004 Yep - I kind of stated that in issue #1 on the first post... I'll figure that one out (Anyone who knows off the top of their head is welcome to chime in at any point as well) Quote Link to comment Share on other sites More sharing options...
Nukey Shay Posted July 2, 2004 Share Posted July 2, 2004 Some disassembling will probably be in order, to find out if the tunnel routine is coded to check the vertical position of the sprites before executing the tunnel boundries. Like (logic sample): IF height <> center then branch IF hpos < minimum then hpos = maximum IF hpos > maximum then hpos = minimum You'd want to change that so that the boundry is enforced no matter what the vertical location of the sprites (by removing the first IF in this example). In assembly, the first line would be similar to: LDA height CMP #center BNE $aaaa Quote Link to comment Share on other sites More sharing options...
PacManPlus Posted July 2, 2004 Author Share Posted July 2, 2004 Thanks Nukey - although I understand logic (I am a C++ programmer at my job for many years), my issue is *which* LDA is the one I'm looking for. I see many places where it's loading the A register with a value, I'm trying to decypher how to tell which one is the one I want... Quote Link to comment Share on other sites More sharing options...
neotokeo2001 Posted July 2, 2004 Share Posted July 2, 2004 Hi! I have found that it runs on Dan Boris' 5200 emulator, and jum52... I couldn't get it working with MESS either Can Jum52 be played full screen?? Quote Link to comment Share on other sites More sharing options...
Nukey Shay Posted July 2, 2004 Share Posted July 2, 2004 Thanks Nukey - although I understand logic (I am a C++ programmer at my job for many years), my issue is *which* LDA is the one I'm looking for. I see many places where it's loading the A register with a value, I'm trying to decypher how to tell which one is the one I want... Nah...you are reading too much into that. That was just an example to illustrate what I was referring to. The program might be loading and comparing using the X or Y register...or it might not be using that layout at all. Perhaps it's using some kind of generic routine (so that both the player and the monsters can use it). Though the way that the Pac Man program is put together makes it a fair possibility that all of the monsters' and player's routines are coded seperately. Try to discover which ram locations belong to the monster locations...and find the areas where they are changed to immediate values. Quote Link to comment Share on other sites More sharing options...
PacManPlus Posted July 3, 2004 Author Share Posted July 3, 2004 Ok - One thing I did figure out is that the player (PacMan) is made up of the 4 Missile segments (the 5th player). I am doing a search for HPOSM0-HPOSM3 to see what I come up with... Quote Link to comment Share on other sites More sharing options...
PacManPlus Posted July 4, 2004 Author Share Posted July 4, 2004 I GOT IT! I found a partial disassembly of 5200 Pac-Man and was able to add the top and bottom exists to the existing 'Tunnel' routine. I had to move the routine to a larger area, though, so I can hand-assemble the code :-P The Maze will be a bigger deal, though. As Nukey said, it gets copied to RAM at the start and it looks like it references RAM at the beginning of each board. I would have to change it to copy the maze to RAM at the beginning of every board, checking against the level number: 1 & 2 - normal maze, 3 - empty maze, 4 & 5 - normal maze, 6 - Empty maze (and so on). I may have to add another routine to do this instead of modifying the existing one. If you look, I've already placed a copy of the maze in $01e1 ($21e1 is where the normal maze is). BTW I'm using Hack-O-Matic's addresses, not the real ones. I figure I can just flip the High order bit between $01 and $21 depending on the level. I obviously have to make a copy of the maze permissions as well. This one may take a while... hang5200.zip Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.