(Topic ID: 258702)

Nine Ball software rewrite

By slochar

57 days ago

Topic Stats

  • 24 posts
  • 9 Pinsiders participating
  • Latest reply 11 days ago by snyper2099
  • Topic is favorited by 18 Pinsiders


Linked Games

#1 57 days ago

Split off from the 9 ball troubleshooting thread, starting a separate thread to keep track.

What's been done so far:

Complete disassembly of the binary code into an editable, re-compileable format.

Code crunching to make space in the 9 ball rom to improve the ball handling. This is under test right now by a couple beta testers to make sure something isn't woefully broken before moving forward.

This will also free up space to add a playfield multiplier of 2x/3x similar to the Oliver Kaegi mod from several years ago, but without having to use some kind of larger rom and a board mod.... and anything else we can think of. I know people will want the spinner counter as it's been popular in the other games it's been added to so far (meteor and big game).

Documentation of how the game handles the balls right now is starting, this will be the longest phase, and once all variables and routines have been identified, an analysis of what will have to change will take place. Implementation of the changes and testing will commence at that point to ensure the fix is solid before releasing it into the wild, although anyone can grab the beta and try it out.

A conversation with one of the beta testers gave me a radical idea - what if 9 ball was no longer a multiball game and it was just single ball play? I think from preliminary analysis of the code that the game might have been designed initially as a single ball game and they whacked the multiball in there later on - this is COMPLETE wild-ass speculation on my part though, as I do not have any insider info regarding this at all. It might explain why the switch handling is so mangled though.

Because this idea tickles my fancy, in conjunction with whatever fixes for the multiball are come up with, I'll also be producing a version of the game that's just a single ball game. No hardware changes needed to do this - just remove 2 balls (Although I guess I could just write it to also recognize there's 3 balls and react accordingly.) Just a bit of fun, really. People might end up liking it! I've written multiball add-ons for other games in the past so why not do it the other way?

I actually did this with flight 2000 in 2018 in prep for a new operating system I was writing at the time for the weebly board, and it was kind of fun but that exercise was VERY preliminary and never stepped out of the alpha stage - no sound or speech driver existed. I did find out how fast you can move the ball walker though to speed a ball through it.

Anyway, this thread will keep people updated with the progress of the 9 ball fix-up as it occurs as well as any other mods like the single ball play. Any suggestions for updates to gameplay welcomed as well, although I can't promise that any of them will make it into the rom. One I think would be good would be instead of rolling the 173k over back to the beginning, is to leave it there for a little bit and decay it relatively quickly, to 40k, 30k, etc. with each step being lit for 50% longer. Kind of like Stern Star Wars PF multiplier.

#2 57 days ago

Following this for sure! The nineball code needs help for sure. Love the game.

#3 57 days ago

Following! I recently picked up a non working Nine Ball, I’m planning a full restoration. Just got a new CPR backglass and plastics set, both look amazing. I also recently picked up a ROM burner but still need to learn how to use it.

#4 57 days ago

Really interested in this project. It amazes me when someone takes the time to upgrade the code on these classics titles. Where’s the thread with the original 9 ball code discussion?

Now if only someone would create a multiball 2x playfield multiplier code for Embryon

#5 57 days ago

Looking forward to it!

Not trying to be a stickler but you might miss people searching for this thread for years to come not calling it Nine Ball

#6 57 days ago
Quoted from HoakyPoaky:

Now if only someone would create a multiball 2x playfield multiplier code for Embryon


That was done ages ago.

Original 9 ball discussion thread:


#7 55 days ago

Update, error in new code concerning the way continuous solenoids are handled (in 9 ball, some of the momentary solenoids are actually connected to continuous solenoids). Sent the new code to new beta tester - other beta testers if you're still in email me.

#8 54 days ago

Following this. Nine Ball is in my top 3 games of all time. I simply adore it.

1 week later
#9 48 days ago

Still working on this, slow going as there's really 2 projects operating in tandem on this (it was 3 until I said meteor is "almost done") - as all the crunching techniques to save space in the rom are being added into all 3 codebases. Flight 2000's is the most along in this, but also one of the most broken (meteor is the most stable, and I'm no longer adding in crunch changes as there's still a lot of space available).

1 week later
#10 41 days ago

Update, a buddy has a 9 ball about 45 minutes away, I was thinking could borrow the whole game which would be a PITA.... so, instead, I'm going to borrow the playfield and drop it into one of my many stern cabs.... probably whichever one's most accessible (probably seawitch, good access from the right side to swap roms continuously.)

I'm at the point where I'm going to pull out all the multiball code, make it a single ball game, and then add back in the multiball handling using ideas I'm cribbing from flight 2000, catacomb, firepower, pinbot, and f-14. This will go much faster once I have the playfield here, and as a bonus any beta code I send out won't completely crash the game like happened in the past.

As a bonus the playfield I'll be borrowing has issues with the 8 bank drops so I can look into fixing that as well. Probably a timing loop that if it doesn't drop the target within a certain amount of time, it will virtually drop it so the game doesn't hang up (like barakawins1's game did in the original 9 ball troubleshooting thread that spawned this software project)

#11 41 days ago

Fuck, that makes me wanna get back into 9-Ball.

#12 36 days ago

Playfield installed in cab, testing.

Managed to accidentally duplicate the original issue barakawins1 had with the 8 bank trying to drop a target - in this case, the target was already down (the 8 bank on the pf I borrowed has issues with resetting drops, perfect for this testing). The game hung up just try to 'drop' the 6 target even though it was already down. So, I'll have a way to tackle that (the game itself tries to reset the drop switches, but it's clearly failing here.)

I've doubled checked one of the new functions I wrote to check switches easily which had failed in crunchtests before 5, which should help with this issue. Don't trigger the drop if it's already down. As an offshoot of this, draining on a lit outlane which awards the loop value no longer resets the single drop if it's up. I always thought that was odd.

I've also played around with different switch things for ball end, etc. just trying out ideas. Already gotten rid of the shooter lane nonsense where if it doesn't see the switch it launches another ball (i.e. the trust level of the shooter lane switch is greater than the trough switches)

Oh, and the newly-popular spinner counter is in there It's nice because there's already timeout code in the game to remove the spinner lamps which I repurpose to put the ball in play back on the display.

Free play also implemented, dip 19 turns on/off.

#13 36 days ago

Code has been sent to coyote to post here:

Version reports on bootup as "11", should fix the go into the saucer and nothing happens because either the target doesn't drop, or it was down already and didn't reset properly.

Add bug reports on this version to this thread.

#14 36 days ago

I honestly can't remember where I heard this - maybe from Steve Kirk himself, maybe somewhere else - and it's possible I'm completely imagining it - but my recollection is that Nine Ball was originally designed to have 9-ball multiball. It's why the lockup lane was designed the way it was (though they would have put the lockup hole at the bottom in that case.) And obviously that never happened, because they couldn't handle 9 balls in the trough. And I can only imagine what a mess Rob Quinn would have made of handling all those switches! All of which is to say it was not a single ball game that they later added multiball to; just the opposite.

So my vote is to leave it as a multiball game. (And as Corey can attest, my vote is to change *nothing* in terms of game rules, as Steve put a lot of thought in to them and who are we to second guess him at this point? Fixing bugs - of course! Adding something informative like a spinner counter - sure! But no game rule changes.)

#15 36 days ago

There will be 2 versions I never intended to remove the multiball on all the versions.... just one to see how it plays. One of the reasons I got rid of my 9 ball in the first place was that I didn't see any point at all to getting multiball. There's nothing extra to shoot for, there's no points incentive (unless you're using the Oliver variation), and it can be detrimental, in that you might hit the advance 173k loop when you don't want to (or it does it for you, since it's advancing it as you're exiting the lock lane). Or maybe a ball tags the fully lit spinner when it shouldn't.

So I'd like to learn the game instead with a different perspective, removing the carrot of "go get the multiball" to other goals. (I don't know what the tournament set even goes for on 9 ball but I'd suspect it's either the 173k or the spinner.) Maybe it's fun, maybe it isn't. I won't know until I try it. Nothing in most of the code screams it was designed as multiball so maybe Rob Quinn designed it from a single ball perspective and tried to add the multiball back in later because it really appears that way in the code. It's like he kept adding flags to try and fix all the possible scenarios without rolling some things back and starting fresh. Maybe that was the development hell that existed at stern at the time, maybe it was something else. All I know is that balls shouldn't end before they're supposed to, extra balls shouldn't be ejected into the shooter lane, a single drop being down and never resetting should never happen, and a ball in a saucer shouldn't just sit there forever because a drop bank doesn't operate correctly.

It probably was sacrosanct to not change the OS routines at the time since all of the changes I made to it to make space to implement the bug fixes basically came from the OS. No other games seem to monkey with it too much either, again probably for reasons of time.

9 ball multiball would be crazy and clearly a gimmick just like it is on Apollo 13.

The only rules change I'm contemplating is the playfield multiplier during multiball, and that'll be tunable with a dip switch. The original thinking of changing it to one ball was strictly to see if it played better and as a development version, to fix all the bugs with a single ball to worry about, THEN add in whatever the new multiball handling might have been. Not to fix all the bugs by making it a single ball version only - the single ball would be an offshoot for people who wanted to try something different. I didn't plan on putting a lot of effort into it, that's for sure.

Anything anyone doesn't like could be removed later since I plan on releasing all the source code changes.... there's already directives in it to add/remove various things.

#16 36 days ago
Quoted from slochar:

Code has been sent to coyote to post here:
Version reports on bootup as "11", should fix the go into the saucer and nothing happens because either the target doesn't drop, or it was down already and didn't reset properly.
Add bug reports on this version to this thread.

Will have it posted up in a couple hours, once I finish with (paying) work crap.

#17 36 days ago
Quoted from slochar:

The only rules change I'm contemplating is the playfield multiplier during multiball, and that'll be tunable with a dip switch.

I like this idea a lot. 2x for two ball, 3x for 3 ball.

#18 35 days ago

Fixed an issue where the drops were up and wouldn't drop (had fix already for them being down and marked stuck in the switch matrix, which is another hang up)
Doesn't reset the single drop if it's not down
Resets the single drop at ball start (surprisingly the stock code doesn't do this, unless it does it somewhere I didn't trace through)
Balls come out of the lock at game over (all, not just one).
No more of the shooter lane foolishness - if all 3 balls remain in the trough, it WILL eject another one after a short period.

Played with some of the ball handling, it's not "correct" yet, so v12 won't get posted until I at least have that going. Trying the first of many experiments to get it correct.

I guess 9 ball has the ball re-lock during multiball behavior - will probably add an option to flow through instead of relock.

I have the 2x/3x scoring implemented in the backend - it will blit 3_ or 2_ to the ball in play display when active. Nothing in the foreground starts it yet though, but it's all set when that's ready.

#19 35 days ago

(For the record, I didn't post the earlier one because it had issues. Once I get a good version, it will be put up on the webpage.)

3 weeks later
#20 12 days ago

This is still in progress it only looks comatose - I'm just doing 3 mpu200 things in tandem (f2k, 9b, and galaxy). One idea feeds another so I like to keep busy. Then when I'm burned out I look at Williams Pinbol stuff as a break from the routine.

I am trying ideas on the trough stuff, to ensure that the ball/game doesn't end before it should. The switches involved will still all have to work properly, but it should handle the timing better. I need to write a sampling switch function for it to be 100% reliable. I should have plenty of romspace to do this (last time I checked I wrangled 200 bytes or so out of the codebase) but I just need to get down to actually doing it and testing it out. The first several tests were a dismal failure as the ball either never ended, or ended even more prematurely than the stock code did....

I think the 8 bank switch handling is licked, though, as it will survive drops that are down but the game doesn't realize it, drops that didn't drop physically, and the single drop as well shouldn't get stuck down either.

#21 11 days ago
Quoted from slochar:

as it will survive drops that are down but the game doesn't realize it

life changer

#22 11 days ago

I think you mentioned this as things you were going to address but, the ball lock needs to fire twice at the end of each game AND upon game booting to potentially unload two locked balls. The original code only fires it once, sometimes leaving a ball stuck in the lock.

Also, during multiball, the lock shot should be a pass trough and not recapture balls, much like Defender.

#23 11 days ago

Yes, I already have the code clearing the lock completely out at the end of the game. I don't think they actually intended the lock to be cleared at the end of the game, though, I think they did the single eject so the switches would get triggered again to correct any flags that were incorrect. They actually check for this condition after firing the first one out.

It really lends credence to my theory that the software wasn't written with multiball in mind and they whacked it in later - even if Steve Kirk intended it to be multiball from the beginning, the software I think was written as one ball and the multiball code added in, which is why it's buggy.

#24 11 days ago
Quoted from slochar:

I don't think they actually intended the lock to be cleared at the end of the game, though,

Strange. Because if that is true, you could potentially earn a free lock upon completing ball 5, and an instant a two-ball MB once completing ball 9... not having actually "earned" any locked balls at all.

It's an unfair exploit for player 1 if you walk up to the game with a ball already in the lock.

For those boasting "you can't earn a lock shot with skill on Nine Ball, it's only random" I would strongly disagree. On mine, a clean spinner shot diverts consistently to the area of the lock gate, similar (exact reverse) of a bank shot to GEM on Tron.

I realize in a mutiplayer game on NB, you can steal locks. In a perfect world, I would change that to a dip switch setting, (if possible) so the game will always fire the kickout coil, regardless of how many balls are currently in the lock. That way, each player has to actually earn each multiball, with the same amount of earned shots.

Send me a PM if you need a tester, I have my eproms ready to go.

Promoted items from the Pinside Marketplace
From: $ 18.00
Apparel - Men
Pinside Shop
$ 6.00
Cabinet - Other
Siegecraft Electronics
From: $ 22.95
Cabinet - Shooter Rods
Super Skill Shot Shop
$ 7.00
From: $ 155.00
From: $ 20.00
Cabinet - Other
Rock Custom Pinball

Hey there! Got a moment?

Great to see you're enjoying Pinside! Did you know Pinside is able to run thanks to donations from our visitors? Please donate to Pinside, support the site and get anext to your username to show for it! Donate to Pinside