Post Reply 
Thread Rating:
  • 2 Votes - 4.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
F-14 divide by 10 roms
05-22-2012, 04:33 PM
Post: #1
F-14 divide by 10 roms
org $ae00

;/10 scoring change $cca2 to jsr $ae00 [correct checksum]

tab ;a is holding score byte to add as well as possibly a modifier in the top nibble
andb #$f0
anda #$0f
deca ;make it one less (effectively /10)
ldx $aa ;original replaced code, $aa is currently up player score location pointer
ldx 0,x

Seems to work in pinmame and might handle people that turn F14 over as it can be rather easy.
Find all posts by this user
Quote this message in a reply
05-23-2012, 03:08 PM
Post: #2
RE: F-14 divide by 10 roms
Also, to mod the score thresholds to 'match' the /10 scoring (i.e. you can still set any amount from 100,000-9.9 million for the "real" score, change $cd1e from bsr $cd6c (a routine that formats B correctly from the 1m+100k digit to "ldb $1,x" which is the /10's 1m/100k digits directly.

Still working on the match sequence correction - it works right now but for the 100s digit and displays the incorrect information at the match screen for each player's digits.
Find all posts by this user
Quote this message in a reply
05-24-2012, 09:40 PM
Post: #3
RE: F-14 divide by 10 roms
Hi Ralph,
Could you send me a copy of the divide by 10 ROM for Pinmame? I can give it some testing time in an actual F14 machine. Not sure if you've heard of the P-ROC, but I have modified Pinmame to work with physical System 11 machines via the P-ROC.

I did that so that I can play "proper" F14 Tomcat (emulating alpha numeric on the DMD) whilst developing my new F14 2.0 software. I have a launcher, so when powering on I choose which Pinmame ROM to run. Having a divide by 10 would be cool, as you say if it's not set too hard, rolling it can be quite easy.

Find all posts by this user
Quote this message in a reply
05-25-2012, 10:31 AM
Post: #4
RE: F-14 divide by 10 roms
Final beta candidate for changes. Broken up into sections, [a] checksum [b] /10 routines [c] match routines

;checksum skip (testing purposes only - should adjust checksums once code finalized)
C4ED: C1 80 cmpb #$80
C4EF: 20 E9 bra $C4DA ;checksum skip, for test
;purposes, always report correct
;original instruction was beq $c4da

;/10 scoring
CCA2: BD AE 00 jsr $AE00 ;original instruction was ldx $aa, ldx 0,x
CCA5: 01 nop ;filler byte

AE00: 16 tab ;a is holding score byte, high nibble cannot change, low nybble is score column to add
AE01: C4 F0 andb #$F0 ;strip score column
AE03: 84 0F anda #$0F ;strip control nibble
AE05: 4A deca ;reduce score column one place
AE06: 1B aba ;restore control nibble
AE07: DE AA ldx $AA ;currently up player score location
AE09: EE 00 ldx (x+$00) ;get currently up player score location for addition purpose
AE0B: 39 rts ;return

;check for replay threshold pass
CD1C: DE AA ldx $AA ;original instruction was ldx $aa, bsr $cd6c
;combined player's 1m+100k digits into B
CD1E: E6 01 ldb (x+$01) ;do it directly as we are /10 so that byte arrangement already exists

;end of game sequence, match corrections

7C9E: 96 A8 lda $A8 ;# of players in game
7CA0: 81 03 cmpa #$03 ;4 players?
7CA2: 26 15 bne $7CB9 ;no
7CA4: 7E 79 60 jmp $7960 ;yes, correct p4 score display from /10 to tens/ones

7960: CE 02 79 ldx #$0279 ;original code relocated from $7ca4, with mods after $7974
7963: BD 7F 54 jsr $7F54
7966: 96 F8 lda $F8
7968: 81 02 cmpa #$02
796A: 27 05 beq $7971
796C: 86 90 lda #$90
796E: BD 84 0F jsr $840F
7971: BD C8 D5 jsr $C8D5
7974: 20 ;operand for script operation
7975: B6 02 7F lda $027F ;p4 ones display digit
7978: B7 02 7E sta $027E ;p4 tens display digit
797B: B7 02 BE sta $02BE ;p4 tens display digit
797E: 86 3F lda #$3F ;character in set: '0'
7980: B7 02 7F sta $027F ;p4 ones display digit
7983: B7 02 BF sta $02BF ;p4 ones display digit
7986: 7E 7C B9 jmp $7CB9 ;continue

7CB9: 96 A8 lda $A8
;p1 match
7E12: 96 38 lda $38 ;match #
7E14: 7E 79 89 jmp $7989 ;check p1 match

7989: F6 02 03 ldb $0203 ;p1 100/10 digits
798C: 58 aslb
798D: 58 aslb
798E: 58 aslb
798F: 58 aslb
7990: 11 cba ;b is now holding 10s/1s
7991: 7E 7E 17 jmp $7E17

7E17: 26 0A bne $7E23
;p2 match
7E29: 96 38 lda $38 ;match #
7E2B: 7E 79 94 jmp $7994 ;check p2 match

7994: F6 02 07 ldb $0207 ;p2 100/10 digits
7997: 58 aslb
7998: 58 aslb
7999: 58 aslb
799A: 58 aslb
799B: 11 cba ;b is now holding 10s/1s
799C: 7E 7E 2E jmp $7E2E

7E2E: 26 0A bne $7E3A
;p3 match
7E40: 96 38 lda $38 ;match #
7E42: 7E 79 9F jmp $799F ;check p3 match

799F: F6 02 0B ldb $020B ;p3 100/10 digits
79A2: 58 aslb
79A3: 58 aslb
79A4: 58 aslb
79A5: 58 aslb
79A6: 11 cba ;b is now holding 10s/1s
79A7: 7E 7E 45 jmp $7E45

7E45: 26 0A bne $7E51
;p4 match
7E57: 96 38 lda $38 ;match #
7E59: 7E 79 AA jmp $79AA ;check p4 match

79AA: F6 02 0F ldb $020F ;p4 100/10 digits
79AD: 58 aslb
79AE: 58 aslb
79AF: 58 aslb
79B0: 58 aslb
79B1: 11 cba ;b is now holding 10s/1s
79B2: 7E 7E 5C jmp $7E5C

7E5C: 26 0A bne $7E68

;puts match # formatted correctly on display
;routine only runs for p1, p2, p3 since p4 digits are already where they need to be
7FAE: A6 01 lda (x+$01) ;orginal instruction lda 0,x

;game has decided that at least one player will match
E41B: CE 02 00 ldx #$0200
E41E: BD D2 D3 jsr $D2D3
E421: 7E 79 B5 jmp $79B5 ;replaced instructions lda 3,x, rts
;this will set the match # to one of the players' scores, fouling the
;guaranteed match # when there are ones units involved.

79B5: A6 03 lda (x+$03) ;replaced instruction from $e421
79B7: 48 asla ;shift it over to make it "normal"
79B8: 48 asla
79B9: 48 asla
79BA: 48 asla
79BB: 39 rts ;return after reformatting match #
Find all posts by this user
Quote this message in a reply
05-26-2012, 07:59 AM
Post: #5
RE: F-14 divide by 10 roms
small bug - score was rolling into 10 millions at the end of a ball because of WMS sending 00 to be added to the score queue.

Shift the AE00 routine forward 3 bytes and add:

beq $ae0a (ldx $aa line)

to the beginning to test for this condition.
Find all posts by this user
Quote this message in a reply
06-12-2012, 05:12 PM
Post: #6
RE: F-14 divide by 10 roms
Lots of progress made on this - trying to piece together everything into one document. Managed to find out that WMS 2x16 displays are triggered the opposite of the earlier 4x7 displays but rather than redo the code, since I needed a new display anyway, found out that data east 2x16 displays trigger on the same strobe transition that wms 4x7's do. Pinscore has a jumper to switch triggering.... set to DE, works great. (It will actually work as a 4x7 display fine, as well, although the p1 and p3 1's digits shift over into the opaque area in the center.....)

I was able to sand out the opaque area on the display plastic; I plan on making a new panel with some new graphics for the final product. Right now, 8 digit displays are working, the match works, the replay levels work, a modification for the jackpot works (fixed, but you can increase it for that ball by hitting the Yagov kickbig), the self-test for display works, probably some other stuff I'm forgetting. The hacks are starting to look like spaghetti code though, reasonably sure I'm doing something stupid by modifying the display for the match to show the correct digit, which then causes the score to shift over one, so I'm moving it back. Probably should just format it once, but until I get everything documented I won't be able to see the big picture.

The important thing is that the display is working and that it'll be a long time before 99 million is surpassed.....
Find all posts by this user
Quote this message in a reply
03-21-2013, 04:08 AM
Post: #7
RE: F-14 divide by 10 roms
Is it a Bot or something?
Find all posts by this user
Quote this message in a reply
Post Reply 

Forum Jump:

User(s) browsing this thread: 1 Guest(s)