Jump to content
Sign in to follow this  
neotokeo2001

Mario Brothers Help

Recommended Posts

Does anyone know how the pipes are displayed in Mario Brothers? I want to change them to stairs but I can't seem to find them anywhere.

 

s_MarioBros_2.png

Share this post


Link to post
Share on other sites

The pipe gfx is "hard-coded" right in the display kernal...

 

 

;2nd bank...
Lfae4:
lda	#$74			; 2
sta	COLUP0		  ; 3
sta	COLUP1		  ; 3
lda	#$c4			; 2 color of top pipes $FAEB

 

 

 

 

 

;1st bank...
;drawing top pipe area:
Lb045:
dex					; 2
bpl	Lb045		   ; 2³
sta	RESP1		   ; 3
sta	WSYNC		   ; 3
sta	HMOVE		   ; 3
ldx	#$e0			; 2 top lines gfx $B04F
sta	WSYNC		   ; 3
stx	PF0			 ; 3
ldx	#$0c			; 2
jsr	Lb3dc		   ; 6
sta	HMCLR		   ; 3
lda	($b0),y		 ; 5
and	($b4),y		 ; 5
ldx	#$60			; 2 middle lines gfx $B060
sta	WSYNC		   ; 3
sta	GRP0			; 3
stx	PF0			 ; 3
lda	($c5),y		 ; 5
and	($cd),y		 ; 5
sta	GRP1			; 3
lda	($a1),y		 ; 5
sta	ENAM0		   ; 3
lda	($a3),y		 ; 5
sta	ENAM1		   ; 3
iny					; 2
ldx	#$06			; 2
jsr	Lb3f3		   ; 6
lda	($b0),y		 ; 5
and	($b4),y		 ; 5
ldx	#$70			; 2 bottom lines gfx $B080

 

 

 

 

;drawing bottom pipe area:
Lb330:
sta	HMCLR		   ; 3
lda	$f9			 ; 3
sta	COLUPF		  ; 3
lda	($b2),y		 ; 5
and	($b6),y		 ; 5
ldx	#$c0			; 2
sta	WSYNC		   ; 3
sta	GRP0			; 3
stx	PF2			 ; 3
lda	($cb),y		 ; 5
and	($d3),y		 ; 5
sta	GRP1			; 3
lda	($ba),y		 ; 5
sta	COLUP0		  ; 3
iny					; 2
ldx	#$06			; 2
jsr	Lb469		   ; 6
lda	($b2),y		 ; 5
and	($b6),y		 ; 5
ldx	#$00			; 2
sta	WSYNC		   ; 3
sta	GRP0			; 3
stx	PF2			 ; 3
lda	($cb),y		 ; 5
and	($d3),y		 ; 5
sta	GRP1			; 3
lda	($a1),y		 ; 5
sta	ENAM0		   ; 3
lda	($a3),y		 ; 5
sta	ENAM1		   ; 3
iny					; 2
lda	#$c4			; 2 Color bottom pipes $B36E
sta	COLUPF		  ; 3
ldx	#$0e			; 2
jsr	Lb480		   ; 6
lda	($b2),y		 ; 5
and	($b6),y		 ; 5
ldx	#$70			; 2 bottom pipes gfx $B37B

 

 

 

I can't remember who made this disassembly...but it looks like it was being converted to 16k. The addresses shown above should coincide with the 8k game.

mariobros.zip

Share this post


Link to post
Share on other sites

I have no idea what I am looking at. :)

 

Is there any way to make the top pipes look like stairs without too much trouble? Maybe just flip them.

Share this post


Link to post
Share on other sites

Have at it. I'm retired.

*at least as far as looking at this one goes :P

The addresses listed are correct.

 

HOM = 004f ; enter the value you want to use for the top lines of the upper pipes.

Original value = #$E0

GFX = 11100000

What you see onscreen for PF0 = "-xxx"

 

HOM = 0060 ; "" middle lines of the upper pipes.

Original value = #$60

GFX = 011000000

What you see onscreen for PF0 = "-xx-"

 

HOM = 0080 ; "" bottom lines of the upper pipes.

Original value = #$70

GFX = 11100000

What you see onscreen for PF0 = "xxx-"

 

HOM = 037b ; value used for the lower pipes.

Original value = #$70

GFX = 11100000

What you see onscreen for PF0 = "xxx-"

 

HOM = 1aeb ; value used for the upper pipes color.

Original value = #$C4

Color = Green

 

HOM = 036e ; value used for the lower pipes color.

Original value = #$C4

Color = Green

 

I dunno how to explain it any clearer if you don't want to at least look at the disassembly.

Share this post


Link to post
Share on other sites
Have at it. I'm retired.

*at least as far as looking at this one goes :P

The addresses listed are correct.

 

 

I wasn't sure what I was looking at but your second post made it plain.

 

What you see onscreen for PF0 = "-xxx"

 

I have tried to work with the disassembly for various games and I can make the changes but then I can't get it converted back to a BIN. I think I am allergic to DOS.

Share this post


Link to post
Share on other sites

Hm... with the stairs it looks really ankward when the enemys drop in, i guess you'll also have to fix the enemy's position to align with the stairs...

post-12950-1202336366_thumb.png

Share this post


Link to post
Share on other sites

Now that I have my brain-dead moment past me. The enemies don't quite line up with the stairs but you can only really tell in screen shots.

 

StairsL.gif

 

Thanks Nukey and Impaler.

Share this post


Link to post
Share on other sites

I also want to change the lives for Player 1 and 2 to zero with no extra lives awarded. Am I looking in the right area?

 

Lfdb8:
lda	$9d			 ; 3
beq	Lfddd		   ; 2³
lda	#<Space		 ; 2 blank space gfx...low byte
sta	$97			 ; 3 reset all 6 pointers to be blank
sta	$95			 ; 3
sta	$93			 ; 3
sta	$91			 ; 3
sta	$8f			 ; 3
sta	$8d			 ; 3
ldy	$87,x		   ; 4 get # of lives left for this player...bit 0 doesn't apply
ldx	#$0c			; 2 set pointer counter to 6 (characters) x2 (bytes each)
lda	#<Reserve	   ; 2 Mario head gfx...low byte
bne	Lfdd5		   ; 2³ always branch (to the starting position)

Lfdd2:
sta	$8d,x		   ; 4 reset pointer to the head gfx
dey					; 2 reduce temp value (# of lives remaining)
Lfdd5:;Start here
;NOTE: bit 0 isn't used to store the value of # of lives left...
;	  so each pass through the loop checks for a minimum value of 2 (instead of 1)
cpy	#$02			; 2  Is Y a value of 2?
bcc	Lfddd		   ; 2³ branch if less (i.e. ran out of lives to display)
dex					; 2  ...otherwise, reduce to the next position & branch back up
dex					; 2
bpl	Lfdd2		   ; 2³
Lfddd:
rts					; 6

Share this post


Link to post
Share on other sites

No, that area is only printing what the life counter already holds...you want to edit where the life counter itself is set/adjusted.

 

 

The starting number of lives is set here:

	ldx	#$03			; 2
lda	$80			 ; 3
and	#$04			; 2
bne	Lf22e		   ; 2³
ldx	#$05			; 2
Lf22e:
stx	$87			 ; 3

$80 holds the game variations (numbered 0 to 7). The 1st 4 use 5 lives, the next 4 use only 3.

X is given a value of 3 (lives) at the top, and a bit test is done to the game variations to check if it should use 5 instead. So in both cases, you'd want to load X with a value of 1.

These 2 spots are at $1225 and $122D in HOM. Edit them to hold only the rightmost bit instead of 2 bits.

 

 

 

You also want to skip bumping up the number of lives...

	inc	$87,x		   ; 6
lda	#$0f			; 2
bne	Lfe28		   ; 2³
Lfe23:

 

Change $1E1D and $1E1E to value $EA (replacing INC $87,x with 2 NOP's)...by using bitpattern XXX-X-X- in HOM.

Share this post


Link to post
Share on other sites

BTW the reason that the printing routine checks for a minimum value of 2 is because the current life is not shown in reserve. When playing the last life, no reserves are shown...when the life counter is zero, the game is over.

Share this post


Link to post
Share on other sites
The pipe gfx is "hard-coded" right in the display kernal...

 

 

I can't remember who made this disassembly...but it looks like it was being converted to 16k. The addresses shown above should coincide with the 8k game.

 

I paid supercat to convert it to F6 last year so I had enough space to add my end screen on Smurfs Arcade Action. When I wanted to change the pipes, I just removed them all together. Hope this helps.

Edited by Shawn Sr.

Share this post


Link to post
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.

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...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...