March 28, 2017, 02:15:31 am
0 Members and 1 Guest are viewing this topic.
(V Warning, these panels scroll V)8F / ws mAny item x[any qty]Ice Heal x243Protein x99Antidote x106Awakening x240Escape Rope x27Poké Ball x122Great Ball x179TM06 x255Super Repel x247Fresh Water x4Burn Heal x177Fire Stone x241Lemonade x1TM33 x[whatever][the rest of the item pack doesn't matter]
dec c ; paddingdiinc h ; paddingld h, e ; $0122dec bc ; paddingld l, d ; hl = $0100ld c, $F0 ; adjust this for delay : the more there are, the less you'll wait. 240 give ~12 seconds of delay.dec e ; de = $0000.delayCartRebootdec deinc b ; paddingld a, dinc bc ; padding ; won't affect C since this is run 256 timesor e ; a = $00 if and only if de = $0000. Also resets the C flag, so the next op will really be an "add".adc a, $FF ; will overflow unless a = $00, ie de = $0000jr c, delayCartRebootinc a ; a becomes $00 (it was $FF)inc b ; paddinginc c ; we need C to be zeroor c ; A = $00 at this point, so essentially this is "ld a, c" but this updates the Z flagjr nz, delayCartRebootld a, $01jp (hl)
8FItem x[qty]TM43 x4Escape Rope x29Repel x15Lemonade x16Hyper Potion x118[More stuff]Registers on startup :af = 6300 [a=63, f=00]bc = 22B8 [b=22, c=B8]de= 0001 [d=00, e=01]hl= D322 [h=D3, l=22]All flags resetdi ; prevent bad code from being executed. Interrupts will stack requests in FFFF, but meh.inc b ; fillerdec e ; de = $0000dec de ; de = $FFFFld e, $0F ; de = $FF0Fld a, $10ld (de), ahalt; return to game code, perform ACE, write something to VRAM ?
8FItem x[qty]TM43 x99Antidote x106 (= 1 + 128 - 23)Escape Rope x26Soda Pop x60Fire Stone x251 (= 1 + 128 - 6 + 128)Poké Ball x26Fresh Water x61Rare Candy x251Lemonade x17TM33 x[any qty] / Great Ball x233 (= 1 + 128 - 24 + 128); Nope, this is not TM33 ACE, guys.
@MelonStorm @vxbinaca Yes, there's a blocking bar on DMG (the first Gameboy.) But not only that. You will almost always crash the DMG when you remove the cartridge. I believe the reason for this is CMOS latchup. How they fixed this on GBC, if you open up the unit and look inside, is by moving the ground ping closer to the cartridge so it makes first and breaks last when you insert/remove the cartridge.
@Gameboygenius I'll have to get a DMG for testing then, I plan on using this for a game. Works fine on the GB Pocket and I don't see any difference in the placement of the contacts on the GBC slot.
; We NEED to disable interrupts because they run from ROM.; Servicing an interrupt before the cartridge is pulled will result in ROM being executed (and that's exactly what we're trying to avoid); Servicing an interrupt after the cartridge is pulled will result in execution NOP-sliding into VRAM. And we [i]definitely[/i] don't want that.di; It is a pain to execute any "jp $xxxx" because of the three consecutive bytes and uncooperative item translations, so we will do a "jp (hl)" instead.; As such, we need to set hl up.; This one setup is smaller than one padding instruction, then loading a value into H and another into L, then modifying DE,; *probably* saving one item slot.ld h, e ; hl = $0122dec bc ; Padding byte (harmless)ld l, d ; hl = $0100, where the GB leaves execution after startup (usually a NOP followed by a JP to the game's bootstrap)dec e ; de = $0000, which will be our "reference byte" address, which we will constantly poll to ; Now, we need to wait until a new cartridge is inserted.; To do so, we first read the byte at ($0000), which is $FF in Pokémon Red/Blue.; We will simply wait until it's not the case anymore..waitCartRemovedld a,(de)dec ainc a ; don't modify A, but update the Z flagjr nz, waitCartRemoved (@-4, @+$FC)inc b ; Padding byte; Assuming all reads from ROM.waitCartInsertedld a,(de)inc adec ajr z, waitCardInsertedld a, $11 ; games use this value to identify GBC (see G/S/C Glitch Dimension)( dec bc ) ; if Great Balljp (hl) ; We jump to the memory location the GB gives control to at startup
NEVER deviate from any instruction given here, otherwise you could corrupt your save data from either cartridge, corrupt the program from either cartridge, or damage your Game Boy.
Read-Only Memory. But plugging cartridges in and out may damage components such as the MBC (the component responsible for switching ROM banks) or the ROM chip. I grouped that under "corrupt cartridge program" for simplicity.
Quote from: ISSOtm on December 03, 2016, 02:00:39 pmRead-Only Memory. But plugging cartridges in and out may damage components such as the MBC (the component responsible for switching ROM banks) or the ROM chip. I grouped that under "corrupt cartridge program" for simplicity.If anything the MBC and the pins are the only vulnerable parts of the cart (although a surge to ROM might be possible...)
8FDoes not x[matter at all]Ice Heal x243Protein x99Antidote x106Awakening x240Escape Rope x27Poké Ball x122Great Ball x179TM06 x255Super Repel x247Fresh Water x4Burn Heal x177Fire Stone x241Lemonade x1TM33 x[nobody cares]
If you don't know about "Luigi wins by doing absolutely nothing", then check this out.
I think some god hates me.
Page created in 0.094 seconds with 17 queries.