Jump to content
IGNORED

Miniature Golf course editor


tremoloman2006

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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:

Link to comment
Share on other sites

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)

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

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