Jump to content
Sign in to follow this  
GoldenWheels

Would a regular here like to make a Joust hack for me? ($)

Recommended Posts

Are there any 7800 emulators out there with interactive debuggers? That would probably be beneficial. I need to try and reassemble the code to make sure that my disassembled image still runs. :P

 

 

Share this post


Link to post
Share on other sites
Posted (edited)

I still use 7800 basic because it's easy to jump in and program games(I use asm) and you can learn a lot about the system by digging in,this helped me tremendously when using debugger to learn how commercial games handled things.

Edited by CloakeD

Share this post


Link to post
Share on other sites

I have not heard back but having laid out no money...I can hardly complain!

 

I know it is every non programmers mistake...thinking "this is kinda easy I bet". But I did think this would be kind of easy! XD

Share this post


Link to post
Share on other sites

FYI the reference image you posted in the first message seems to be broken.

  • Thanks 1

Share this post


Link to post
Share on other sites
3 hours ago, Karl G said:

FYI the reference image you posted in the first message seems to be broken.

 

Fixed it!

 

BTW if someone really wants to get into details on a Joust TE with that versus mode...I gots da moneys.

Share this post


Link to post
Share on other sites

Should any of this ever come to fruition,   I'd like to pitch in $4.69 to help.  :)

 

Sorry I've got way too many bills to pay right now to meaningfully contribute...But then again,  weird odd numbers are more fun and get people talking...And if Everybody pitched in $4.69...

Share this post


Link to post
Share on other sites

I'm still ready with a paypal payment for a rom. I don't like to be pushy because programmers work hard, and programming can be hard work. But I's is good for it!

Share this post


Link to post
Share on other sites

I should start by saying that I am not interested in the bounty since it's best not to mix hobby and money plus the VS mode would be too much work. For that I think you'd pretty much need to understand all of the existing code and I've only done that once from a disassembly with 2600 Miniature Golf, which is a 2K ROM and took me a year.

 

The first thing I noticed with the Joust ROM image is that the last 8K at $E000 is identical to the preceding 8K at $C000. It could be a 24K cart with the last 8K mirrored. This might be useful as it would provide free space for any hacks without having to increase the cart size (although that doesn't really matter as it could become a 48K cart).

 

It's always good to have an expert player test to make sure nothing is broken. Maybe you can test the attached which is simply the Joust ROM with the last 8K blanked out (other than the 6502 vectors). Hopefully this will play exactly as the original and will mean that the last 8K is available for hacks.

 

joust_hack_test_1.a78

  • Like 2
  • Thanks 1

Share this post


Link to post
Share on other sites

The second thing I did was to see where the code reads the trigger and follow the path from there. I got to this routine which seems to be applying the flap acceleration to the velocity. I've added comments for what I think is going on:

LBCBD:
BCBD	B5 D0		LDA $D0,X
BCBF	C9 08		CMP #$08
BCC1	F0 34		BEQ LBCF7

BCC3	BC 59 22	LDY $2259,X ; get flap index

BCC6	38		SEC
BCC7	BD 8B 22	LDA $228B,X ; velocity (low) = velocity (low) - flap acceleration (low)
BCCA	F9 2C DE	SBC LDE2C,Y
BCCD	9D 8B 22	STA $228B,X

BCD0	BD A4 22	LDA $22A4,X ; velocity (high) = velocity (high) - flap acceleration (high)
BCD3	F9 31 DE	SBC LDE31,Y
BCD6	9D A4 22	STA $22A4,X

BCD9	BD 72 22	LDA $2272,X
BCDC	D0 03		BNE LBCE1
BCDE	DE 6D 01	DEC $016D,X

LBCE1:
BCE1	A9 01		LDA #$01
BCE3	9D 60 23	STA $2360,X
BCE6	9D 72 22	STA $2272,X
BCE9	A9 00		LDA #$00
BCEB	9D 4A 01	STA $014A,X
BCEE	E0 02		CPX #$02    ; x < 2 indicates player
BCF0	B0 05		BCS LBCF7
BCF2	A9 12		LDA #$12    ; flap sfx
BCF4	4C 85 D4	JMP LD485

LBCF7:
BCF7	60		RTS

So it's using 2 tables for the flap acceleration:

LDE2C: .BYTE $80,$00,$5A,$DC,$00 ; flap acceleration (low)
LDE31: .BYTE $00,$01,$01,$01,$01 ; flap acceleration (high)

It seems that the first 3 columns are for the enemies, the fourth is the player but don't know what the last column is used for.

 

So it would seem possible to hack the code to adjust the flap power. In the attached I set the first 3 columns to a really small value which stops the enemies from flying. One interesting thing here is that during an egg level, if you just sit on a high platform and don't do much you often end up stuck on that level; everything is cleared but nothing happens other than the occasional pterry attack. This could well be a bug in the original game which doesn't normally manifest itself because things aren't dropping into the lava so much.

joust_hack_test_2.a78

  • Like 1

Share this post


Link to post
Share on other sites

Having found the code above I then looked for other updates to the velocity variables, hoping to find something that was applying gravity. I found this:

 

8186	B9 27 DE	LDA $DE27,Y
8189	85 64		STA $64
818B	B9 36 DE	LDA $DE36,Y
818E	85 62		STA $62
8190	B9 3B DE	LDA $DE3B,Y
8193	85 63		STA $63

L81F8:
81F8	BD 8B 22	LDA $228B,X ; velocity (low) = velocity (low) + gravity (low)
81FB	18		CLC
81FC	65 64		ADC $64
81FE	9D 8B 22	STA $228B,X

8201	A9 00		LDA #$00
8203	7D A4 22	ADC $22A4,X ; velocity (high)
8206	30 10		BMI L8218
8208	C5 62		CMP $62     ; compare with max velocity
820A	F0 17		BEQ L8223
820C	90 15		BCC L8223
820E	A9 00		LDA #$00    ; reset velocity (low)
8210	9D 8B 22	STA $228B,X
8213	A5 62		LDA $62     ; set max velocity
8215	4C 23 82	JMP L8223

L8218:
8218	C5 63		CMP $63     ; compare with min velocity
821A	B0 07		BCS L8223
821C	A9 00		LDA #$00    ; reset velocity (low)
821E	9D 8B 22	STA $228B,X
8221	A5 63		LDA $63     ; set min velocity

L8223:
8223	9D A4 22	STA $22A4,X ; set velocity (high)

L8226:
8226	BD 8B 22	LDA $228B,X
8229	18		CLC
822A	7D 40 22	ADC $2240,X
822D	9D 40 22	STA $2240,X

L8230:
8230	BD 6D 01	LDA $016D,X
8233	7D A4 22	ADC $22A4,X
8236	9D 6D 01	STA $016D,X
8239	4C 70 82	JMP L8270

Which is using the following tables:

LDE27: .BYTE $0C,$14,$1E,$26,$00 ; gravity (low)
LDE36: .BYTE $04,$04,$04,$04,$02 ; max velocity (high)
LDE3B: .BYTE $FC,$FC,$FC,$FC,$FD ; min velocity (high)

So it should also be possible to hack gravity.

  • Like 1

Share this post


Link to post
Share on other sites

I am pretty sure that the first release of Joust was on two ROM chips. A 16k chip and an 8k chip. Later, when ROM prices dropped for larger chips, they went with a single 32k chip.

 

CO24930.jpg

 

Mitch

  • Thanks 1

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

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...