more games on 1 cart

Discuss hardware-related topics, such as development cartridges, CopyNES, PowerPak, EPROMs, or whatever.

Moderators: B00daW, Moderators

proveaux
Posts: 87
Joined: Wed Feb 15, 2012 10:19 pm

Post by proveaux »

Think I got it. Do everthing like I last posted, but do the below instead of what i previously thought.

copy /b original.chr+edit.chr+8KB.chr+8KB.chr chr.bin

To have it like an easter egg, I would love to be able to hack it to CNROM and have it swap to alternate chr bank due to button press on start up but believe thats out my league for now. :(
User avatar
tokumaru
Posts: 12106
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Post by tokumaru »

Yeah, you got it.
proveaux wrote:I would love to be able to hack it to CNROM and have it swap to alternate chr bank due to button press on start up but believe thats out my league for now. :(
This is not that hard, really. You need to find some free room (if I counted right, you'll need 23 bytes) where you can insert the following code (or similar):

Code: Select all

	lda #$01
	sta $4016
	lsr
	sta $4016
	lda $4016
	and #%0000001
	tax
	sta table, x
	jmp $XXXX
table:
	.db $00, $01
This reads the status of the A button and uses it to activate CHR bank 0 or 1. With this code in place, you have to call it somehow, before the game displays any graphics. The best thing to do is look for a JMP or JSR instruction near the beginning of the program and modify the target address so that this function is called instead, and then you put the address you replaced in the "$XXXX" part of this code. This will briefly hijack the program in order to perform the switch, but it will resume without problems because of the JMP $XXXX instruction.
proveaux
Posts: 87
Joined: Wed Feb 15, 2012 10:19 pm

Post by proveaux »

Yep thats definitely more than I know how to do. I wouldnt even know where to start. I'm just a mediocre hex editor. :oops:

After checking out my hack of the hack I did it looks like I will need to copy the edited prg to the original and use a 27c512 eprom. Since I'm using a DPDT switch I'm guessing I wire the prg side of the switch the same as the chr side but where does the center need to go?
User avatar
tokumaru
Posts: 12106
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Post by tokumaru »

proveaux wrote:I'm just a mediocre hex editor.
But this is basically just hex editing that sequence of instructions into the ROM. =)
Since I'm using a DPDT switch I'm guessing I wire the prg side of the switch the same as the chr side but where does the center need to go?
A15 of the PRG-ROM.
proveaux
Posts: 87
Joined: Wed Feb 15, 2012 10:19 pm

Post by proveaux »

Thanks for all your help! Seems to be working great. :D
Image
Post Reply