Jump to content
IGNORED

Disassembly of Astrocade Bally Pin Pinball


ballyalley

Recommended Posts

Last week I began to disassemble the 4KB, 1979 pinball game for the Astrocade called Bally Pin. The game looks like this:

 

post-4925-0-99147400-1529532175.gifpost-4925-0-79202400-1529532176.gif

 

Today I've reached a point where it's worth sharing. You can download it here:

 

http://www.ballyalley.com/ml/ml_source/ml_source.html#BallyPinDisassembly

 

Most of the ROM can be seen in Z80 mnemonics now. Sure, it's hard to follow, but it beats reading hexadecimal!

 

This code can be assembled using the Zmac assembler and the Home Video Game Library (HVGLIB.H), which are both available here:

 

http://www.ballyalley.com/ml/ml_tools/ml_tools.html

 

I became interested in disassembling this game in May of 2016 when we played Bally Pin in the Astrocade High Score Club, here:

 

http://atariage.com/forums/topic/252219-hsc01-round-7-bally-pin-pinball/

 

The game's manual looks like this:

 

post-4925-0-84956200-1529532174_thumb.jpg

 

The game cartridge looks like this:

 

post-4925-0-69696500-1529532172_thumb.jpg

 

I'm learning to use the MAME debugger a little better, which makes disassembling the game go a bit faster. Most of the ROM has been disassembled, but I have not started to follow the game's logic yet. Although, to a certain extent that isn't true, for it's impossible to disassemble a game without following the logic a little bit.

 

Today I disassembled the music "scores" used by the on-board ROM's music routines. By "score" and music, we're actually talking about sound effects. I hope that tomorrow I can start looking into the graphics of the game. I'd also like to see if I can follow how the game gets laid out.

 

If possible, I'd like to add a few well-placed pixels so that the ball doesn't drain. It would be cheating, sure, but it would make disassembling the game go faster, as I have been playing the game without mixed results. If I can't prevent the ball from draining, then maybe I can at least add more default balls when the game begins.

 

As progress continues, I'll post the disassembled source code to BallyAlley.com and mention it here.

 

Adam

Link to comment
Share on other sites

Bally Pin - Changing Initial Number of Balls

 

I have found where in the cartridge the initial number of balls is set in RAM for Bally Pin. Normally, you start off with 5 balls. As far as I can tell, you can't earn any extra balls. For those who understand Z80 machine language, here is the disassembled and commented code for where the number of "lives" (balls) is set:

$2236 3E05 LD A,$05 ; Set Initial # of balls
$2238 32CC4F LD ($4FCC),A ; Holds Initial # of balls


If you change the $05 to $09, then you'll get 9 balls to start with at the beginning of the game. Swell, right? Not quite. It turns out that if you only change the starting number of balls then your score is scrambled. Hey, Bob Ogdon (who programmed the game), that's a nice nod to the cheaters among us! The score is scrambled because elsewhere in the program, Bob checks if the initial number of balls is 5. If not, then he screws-up the score; it becomes scrambled (I haven't looked into how he does this yet). So, you also have to change the check for the initial number of balls:

$2BCD 3ACC4F LD A,($4FCC)
$2BD0 FE05 CP $05 ; Must match initial # of balls
$2BD2 2002 JR NZ,$2BD6 ; else the score is messed up!


Here is an example of changing this to nine balls to start with:

$2236 3E09 LD A,$09 ; Set Initial # of balls
$2238 32CC4F LD ($4FCC),A ; Holds Initial # of balls

$2BCD 3ACC4F LD A,($4FCC)
$2BD0 FE09 CP $09 ; Must match initial # of balls
$2BD2 2002 JR NZ,$2BD6 ; else the score is messed up!


This works okay. If you set the initial number of balls to higher than nine, then the displayed number of balls left on the screen is scrambled for two reasons:

  1. The screen space is only meant to hold one digit.
  2. I think that the number of lives is held as a BCD number. If you put a number in above 99, then the display looks weird on the screen. I've tried $FF, and it DOES work, but then the number of balls displays looks REALLY weird.

So, what this boils down to is this: in order to change the number of lives, use a hex editor to change memory locations in the ROM file to:

Astrocade ROM Cart ROM Space ($2237) is $0237 = Number of Balls
Astrocade ROM Cart ROM Space ($2BD1) is $0BD1 = Number of Balls


To change it to 99 balls, use this:

Astrocade ROM Cart ROM Space ($2237) is $0237 = $99
Astrocade ROM Cart ROM Space ($2BD1) is $0BD1 = $99


Does this make sense?

Go ahead and try it and then try running your game in the MAME Astrocade emulator. Let me know if this works for you.

I'm glad that I found this area of RAM so easily, as I am terrible at this game. I want to get further into the game to check certain parts of the code.

Adam

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