Nukey Shay Posted March 25, 2009 Share Posted March 25, 2009 There was a bad bug in the last one that kept the tens digit from displaying correctly. This is fixed. Also, because PF data is not stored mid-scanline (to keep borders on the edges when using Mirrored control), I switched the ball to Missile0...and assigned the ball sprite to the playfield (so it is used to draw the borders on both sides ala Berzerk). This should keep the playfields a little more flexible NTSC/PAL60 is selectable with the B&W switch (7800-compatable). Only the first 8 bytes of table LF6AD are used...the rest has been removed. The moving obstacle's direction also sets reflect. I altered the first one to illustrate this. The joystick routine no longer uses the bit table, so you can move diagonally now. The bit test table is mostly eliminated - I only kept bit 3 and 5. I still havent figured out what it's supposed to be doing with them, but they no longer need to be at a specific place in ROM When starting a hole, "H" will be displayed next to the hole number, and "P" will be displayed next to the par value. After starting a hole, a player's score will flash indicating whose turn it is (single-player games do not flash). If you are hacking in games that feature more than 9 holes or par values greater than 9, you can remove these ORA's that add the letters (they are commented right near the end of the program area). To use these changes, copy/paste the entire upper portion (all equates and program instructions), add the 2 bitmaps for H and P after the blank space character, and replace table LF6AD on upward. When entering PF0 data, it's not necessary to set bit4 (because the ball sprite takes over this)...but you should keep it set on the upper and lower border data since the ball is not drawn immediately. 4kMnGolf.zip Quote Link to comment Share on other sites More sharing options...
accousticguitar Posted March 25, 2009 Share Posted March 25, 2009 The joystick routine no longer uses the bit table, so you can move diagonally now. The bit test table is mostly eliminated - I only kept bit 3 and 5. I still havent figured out what it's supposed to be doing with them, but they no longer need to be at a specific place in ROM This is going to be nice! The non-diagonal movement was irritating. Quote Link to comment Share on other sites More sharing options...
Nukey Shay Posted March 25, 2009 Share Posted March 25, 2009 Any interest on custom color sets for the screens? Colors have been transferred to ram already, so it's easy to update per round. Quote Link to comment Share on other sites More sharing options...
accousticguitar Posted March 25, 2009 Share Posted March 25, 2009 Come to think of it that would be a nice addition. Quote Link to comment Share on other sites More sharing options...
Nukey Shay Posted March 25, 2009 Share Posted March 25, 2009 Here's a quick hack that shows a running total of par for single-player games (rather than just leave it displaying zero all the time). Insert these lines directly above label LF690. lda $8F ;3 check number of players for this game lsr ;2 bcc LF690 ;2 branch if two-player lda $88 ;3 and #$0F ;2 keep only par value sed ;2 clc ;2 adc $B2 ;3 add to running total (player 2 score) sta $B2 ;3 cld ;2 LF690: Quote Link to comment Share on other sites More sharing options...
Nukey Shay Posted March 25, 2009 Share Posted March 25, 2009 Custom color sets: ;---------------existing lines--------------- LF032: lda #$02 ;2 sta WSYNC ;3 sta VBLANK ;3 sta VSYNC ;3 sta WSYNC ;3 sta RESBL ;3 ;---------------altered routine--------------- lda hole_number ;3 asl ;2 asl ;2 asl ;2 8 bytes per color set clc ;2 adc #$03 ;2 begin at last color bit console ;3 bvc LF04B ;2 branch if NTSC adc #$04 ;2 or add 4 to get PAL colors LF04B: tay ;2 ldx #$F7 ;2 set AND value ;---------------existing lines etc...--------------- lda $82 ;3 bmi LF051 ;2 branch if attract mode ldx #$FF ;2 keep all bits of color LF051: Note that this would increase color table LF6AD to 72 bytes (4 bytes NTSC for hole 1, 4 bytes for PAL for hole 1, etc) Quote Link to comment Share on other sites More sharing options...
Nukey Shay Posted March 25, 2009 Share Posted March 25, 2009 Diagonal movement can be used now for the obstacle and cup. You can create circlular motion by using unequal differences between the X and Y values too. Y direction no longer interferes with horizontal reflect All known ram locations have been grouped together (and all unused ram locations). The assembly will report how much is unused. Corruptable variables are still at the end of ram, so they can be shared with any stack use. I also cleaned up the kernel, saving a scanline (given to overscan time). Data tables remain unchanged (aside from the color table expansion listed above), so you can copy/paste the equates and program lines to transfer to the earlier assembly file. 4kMnGolf.zip Quote Link to comment Share on other sites More sharing options...
accousticguitar Posted March 26, 2009 Share Posted March 26, 2009 I have my 9 screens designed, but I still have to set the tee, cup, and moving object values. I also have to do some work on where I want the different parts of the screen designs to start. Maybe it won't be too long before I have it done. The good news is that they all fit. I managed to keep most of the screens down to 124 bytes. The largest one is 164 bytes. I'm using the latest assembly. Quote Link to comment Share on other sites More sharing options...
Nukey Shay Posted March 26, 2009 Share Posted March 26, 2009 A little more ram decyphered (some more saved, too). This version lets you practice holes. The game hole selection will appear on the left and # of players on the right when using game select. If you are playing any hole other than the first one, it doesn't increase (so 1 or 2 players can try them all individually). Kernel change: The 3 unused bits in PF0 data is used to set NUSIZ for the obstacle. So you can have multiple/wider obstacles (that share the same motion). Because any value is used as a delimiter, you can even create differently-shaped obstacles that use their own NUSIZ on a single screen...the vertical seperation is already there. Data tables unchanged. 4kMnGolf.zip Quote Link to comment Share on other sites More sharing options...
accousticguitar Posted March 27, 2009 Share Posted March 27, 2009 How do the graphics work? For some reason when I move the cup it splits into 2 pieces. I would like to have the cup like it was in the original, so I tried changing the graphics but I can't get it to work. I tried: .byte %00001110 ; .byte %00000000 ; Quote Link to comment Share on other sites More sharing options...
Nukey Shay Posted March 27, 2009 Share Posted March 27, 2009 The cup must be 4 lines of data long (because the scanline test assumes 4 lines of difference). And it must begin with zero, because the first value is used on most non-cup scanlines (except where PF changes occur). The original game only uses 2 scanlines, so do this: CupGFX: .byte %00000000; | | .byte %00001110; | XXX | .byte %00001110; | XXX | .byte %00000000; | | Quote Link to comment Share on other sites More sharing options...
Nukey Shay Posted March 27, 2009 Share Posted March 27, 2009 Last version's game selections messed up. Add a BCC below tag LF358, and label LF362. LF351: lda gameVariation ;3 lsr ;2 beq LF358 ;2 branch if full game...do not reset scores bcc LF35E ;2 branch if 1-player practice (reset scores) LF358: ;added line... bcc LF362 ;2 branch if 1-player full game ldx player_Number ;3 beq LF370 ;2 branch if player 2's shot cmp #$00 ;2 bne LF35E ;2 branch if 2-player practice (reset scores) ldx #$00 ;2 beq LF360 ;2 always branch LF35E: ldx #$00 ;2 stx digitsToPrint ;3 stx digitsToPrint+1 ;3 LF360: stx player_Number ;3 ;added tag... LF362: lda gameVariation ;3 ;etc... Quote Link to comment Share on other sites More sharing options...
accousticguitar Posted March 27, 2009 Share Posted March 27, 2009 (edited) Thanks for the cup graphics. I needed to get that fixed so I could continue working on the rest of the hack. I think I am close to done. I will post the binary in a new thread. Edited March 27, 2009 by accousticguitar 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.