Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Epsilon

Pages: [1]
1
It's a lot larger than I was hoping/anticipating, but here it is anyway! It is, admittedly, a bit of a pain to setup if you are not on emulator.
Code: [Select]
f3 11 bc da af e0 26 4f 3c e0 d6 21 bb c3 d5 06
0b c5 7a cd 38 db 7b cd 38 db 3e 25 22 1a cd 38
db 13 01 0d 00 09 c1 05 20 e7 21 bf c3 79 a7 28
07 57 af c6 14 15 20 fb 16 00 5f 19 36 ed cd 4d
db d1 f0 a5 47 cb 47 c4 90 db 78 cb 77 28 08 79
a7 28 03 0d 18 01 1b 78 cb 7f 28 09 79 fe 0a 28
03 0c 18 01 13 78 cb 4f 28 05 af 3d e0 26 d9 78
cb 67 28 06 21 10 00 19 54 5d 78 cb 6f 28 06 21
f0 ff 19 54 5d 78 cb 57 28 0d af e0 d6 3d e0 26
fb 62 6b 06 00 09 e9 78 cb 5f c4 5a db c3 a3 da
c5 0e 02 47 cb 37 e6 0f c6 f6 30 02 c6 80 22 78
0d 20 f3 c1 c9 e5 c5 d5 cd bb 14 cd e6 08 d1 c1
e1 c9 c5 e5 3e 0e ea ab ce af e0 da fb 21 c0 7e
3e 38 cf f3 0e 01 21 34 d9 cd 88 db cb 37 47 cd
88 db b0 47 0d 20 03 50 18 ef 58 e1 c1 af 4f c9
2a d6 f6 30 02 d6 80 c9 d5 af 47 c5 3e ec 22 e5
62 6b 09 54 5d e1 1a 4f cd 4d db f0 a5 47 cb 6f
28 01 0d cb 67 28 01 0c cb 7f 28 04 79 d6 10 4f
78 cb 77 28 04 79 c6 10 4f 78 cb 4f 20 08 79 e5
cd 38 db e1 18 d2 79 12 c1 d1 c9

This is meant to be written to $DA98
Controls

A - Enter write mode
Up - Scroll cursor up
Down - Scroll cursor down
Select - Jump to address
Start - Address Lookup (more on that later)
B - Exit memory editor

Write Mode

Up - Increment upper nybble
Down - Decrement upper nybble
Left - Increment lower nybble
Right - Decrement lower nybble
B - Write byte, exit write mode

Address lookup is a feature I added that eliminates the need for scrolling through the memory editor. Simply press start, type in the address you want to go to, and the memory editor will place the cursor on the address.

Disadvantages & Notes:

- Using the Address Lookup feature writes to Box 14's name
- Unlike TheZZAZZglitch's R/B memory editor, this performs writes after the player presses "B" to exit out of write mode. Sorry.

I tried to pack as much power into this as I could (with the time I had), but if you feel you can shrink the byte size for more space, I've attached the RGBDS syntax ASM to this post. Feel free to try to optimize it! (To change where this is written, change "BaseAddress")

Enjoy!

Edit: Princess Torchic checked, and determined that this payload can fit into $DA98 without conflict. I have rebuilt the source with the new base address. Thanks!

Edit2: Shrank the payload by 8 bytes, and also fixed a bug that occurred when pressing "a" and L/R at the same time

ISSOtm shrank the payload by an impressive 32 bytes, however this optimization unfortunately does not work. If I can fix it, it would be a great byte shave though!
2
Note: This only allows for Red -> Red or Blue -> Blue duplications. Attempting an R -> B or vice versa will result in a glitch Pokemon center that you cannot escape from

Hey all! Not sure how useful this might be, but I made a save file (well, "made", meaning I saved the game) that allows you to duplicate and play the save file of the person you are trading with in Pokemon Red/Blue! It uses the RCE method discovered by Vagiular and documented here.

To Use

1. Have a Pokemon Red/Blue cartridge with the save file you wish to duplicate (This file needs no special prerequisites, outside of being able to use Cable club, meaning oak's parcel has been delivered)
2. Have a copy of the same game (Red/Blue wise), with it's respective duplication save file loaded (I have attached both saves to this thread)
2. Connect the two via link cable (If you're on BGB, you can do this with Right Click>Link>Listen on one and Right Click>Link>Connect on the other)
3. Go to the Trade Colosseum
4. Start a trade
5. Wait for save file transfer to complete
Few things to note: This is different from Mr.Cheeze's virus in that this needs to transfer all three banks. As such, this is going to take a minute or two. Be patient.

During this time, you will notice both screens will become glitched. This is the save file data you are duplicating, being represented as tiles.

6. Once they are finished, both Gameboys will restart
7. You should now be able to play the save file you duplicated!

Technical

As i mentioned earlier, this uses the exploit vaguilar discovered and documented.

As you might have guessed, this was inspired by "Mr.Cheeze's virus"

Basically what vaguilar's exploit does is since the subroutine that draws Pokemon names to the screen doesn't end until it reaches the $FF terminator, you can change bytes in your party to force the subroutine to write names to the stack, forcing the game to jump to a certain address upon reaching "ret". In order to force the buffer to go that far, and to not damage any other important parts of RAM, we use glitch Pokemon $E3 (or $E4), as it's name begins with an end terminator $50. Because of this, we can safely move the buffer forward.

Our party looks like this: (note: Referring to the game gameboy you are duplicating the save file from as "victim", the other gameboy with my save file will be referred to as "master")
Code: [Select]
06 ; # of Pokemon, completely irrelevant
00 x6  ; These six pokemon are irrelevant also
e3 x346 ; Advance the buffer to the "victim"'s stack
ce ; Write $CE's name to the victim's stack (EE 21 96 D7 CB 86 21 A3 D7 CB), "A3 D7" is what the game will read from when returning, causing it to jump to $D7A3 (nop slide to master's name)
e3 x7 ; Advance the buffer to the "master"'s stack
f1 ; Write $F1's name to the stack (40 40 40 FF FA 30 D7 CB 47 C0) "30 D7" is what the game reads from when returning, forcing a jump to $D730 (event flags)
ff ; Cause aforementioned buffer to return, forcing the jumps

---
ld a,8 ; a = 8
ldh [rIE],a ; Only allow serial int
ld hl,$0316 ; Garbage to send master in exchange for payload (starts with $FD to allow for transfer)
ld de,$dc00 ; Location to store payload
ld bc,$0110 ; Bytes to send (sends way more than necessary to account for $fd bytes)
call $216f ; Exchange data
ld hl,$dc00
ld b,$fd
.loop: ; Check for FD bytes
ldi a,[hl] ; Grab byte at hl
cp b ; Is it $fd?
jr z,.loop ; If it is, keep looking
dec hl ; Undo the ldi
ld a,$0d ; a = $0D
ldh [rIE],a ; Enable vblank,timer,and serial ints
jp hl ; Jump to payload sent by master

At this point, the victim Gameboy is executing code from the master's name. The code we have written there causes the victim Gameboy to wait for synchronization with the master, and display the "Waiting!" text on the screen. The master gameboy is executing code in a section of RAM that is normally used for event flags. It nop slides to $D743, which there we have written a jump instructon to $DA80, our "PC pokemon" (there we have written another payload). Aforementioned payload causes master to synchronize with the slave gameboy.

Once both gameboys are synchronized (using a subroutine at $226E, or $227F if we do not want to display the "Waiting!" text), we call a subroutine to delay for a few frames, and then we begin the transfer.

The master gameboy first transmits the payload we want the victim to execute. The victim then (after jumping to a payload written at the end of master's party) executes the aforementioned payload, which causes the victim to write 03:A000 - 03:AFFF to the tilemap buffer. Then, both gameboys synchronize once more, and the victim gameboy sends over that portion of the save file (receives garbage in return). The master then copies what it receives into it's own save file in it's respective location. It does this for each 256-byte portion of that SRAM banks before switching banks. Once all 4 banks have been copied (0 - 3), the game locks SRAM and then restarts.

Code executed by master at $DA80:
Code: [Select]
transmitpayload:
call $226e
call $3dd7
ld a,8
ldh [$ff],a
ld hl,$d53a
ld de,$c3a0
ld bc,$110
call $216f
ld a,$0d
ldh [$ff],a
Start:
ld b,4
push bc
ld a,$0a
ld h,a
swap a
push af
ld [hl],h
ld h,$40
dec b
ld [hl],b
ld h,$60
ld l,$01
ld [hl],l
transmit:
call $227f
call $3dd7
ld a,8
ldh [$ff],a
ld hl,$0316
ld bc,$10b
ld de,$c3a0
call $216f
ld a,$0d
ldh [$ff],a
findhl:
ld hl,$c3a0
ld b,$fd
.loop:
ldi a,[hl]
cp b
jr z,.loop
dec hl
Init:
pop af
ld d,a
push af
ld e,0
ld bc,$100
memcpy:
ldi a,[hl]
ld [de],a
inc de
dec bc
ld a,b
or c
jr nz,memcpy
determine:
pop af
inc a
ld b,$c0
cp b
jr z,bankswap
push af
jr transmit
bankswap:
pop bc
dec b
push bc
jr z,end
ld h,$40
dec b
ld [hl],b
ld a,$a0
push af
jr transmit
end:
ld h,$00
ld [hl],h
jp $100

Code executed by victim (near $dc00)
Code: [Select]
Start:
ld b,4
push bc
ld a,$0a
ld h,a
swap a
push af
ld [hl],h
ld h,$40
dec b
ld [hl],b
ld h,$60
ld l,$01
ld [hl],l

Init:
pop af
ld h,a
ld l,$ff
ld de,$c507
ld bc,$100
push af
backwardsmemcpy:
ldd a,[hl]
ld [de],a
dec de
dec bc
ld a,b
or c
jr nz,backwardsmemcpy
ld a,$fd
ld [de],a
transmit:
push de
call $227f
call $3dd7
pop hl
ld a,8
ldh [$ff],a
ld de,$c200
ld bc,$10b
call $216f
ld a,$0d
ldh [$ff],a
determine:
pop af
inc a

Sorry if I over/under explained. Enjoy!
3
General Discussion / Abwayaxmas 01/03/2018
« on: January 02, 2018, 10:31:45 pm »
Though it may be rather early (Current time being 11:31 PM in my timezone), happy birthday, Abwayax!
4
EDIT: Whoops, never mind, just reread the topic
5
Project "Gotta Document 'Em All" / JapDex : Glitch Items
« on: December 20, 2017, 11:43:17 pm »
"JapDex" is a project started by me and coloradohugge in an attempt to document glitch-like aspects of Japanese green.

I am covering glitch items. Here is what I have so far (each item was tested twice for accuracy, and this was done on v1.1):

Hex: $54
Name: ちか2かい (B2F)
Effects: Seemingly nothing
Battle effects: Seemingly nothing
Jumps to WRAM? No.
Can be used for ACE? No.
Other notes: None
-------------------------
Hex: $55
Name: ちか1かい (B1F)
Effects: Regarding the data from $D080 onward, but most likely the game just hangs/crashes
Battle effects: See above
Jumps to WRAM? Not directly, $F080, which is ECHO for $D080
Can be used for ACE? No.
Other notes: None
------------------------------------------------------------------------
Hex: $56
Name: 1かい (1F)
Effects: Same as B1F
Battle effects: See above
Jumps to WRAM? See above
Can be used for ACE? No.
Other notes: None
------------------------------
Hex: $57
Name: 2かい (2F)
Effects: Game hangs for a brief period of time, then resumes normal behavior
Battle behavior: Immediately relinquishes your turn to the opponent, game does not hang
Jumps to WRAM? No.
Can be used for ACE? No.
Other notes: None
-----------------------------
Hex $58
Name: 3かい (3F)
Effects: Same as B1F
Battle behavior: Same as above
Jumps to WRAM? No.
Can be used for ACE? No.
Other notes: None
-----------------------------
Hex $59
Name: 4かい (4F)
Effects: Executes code from $FA67 ($DA67). To my knowledge, this is a mere "nop" slide to OAM
Battle effects: Same
Jumps to WRAM? Not directly, $Fa67, which echos $Da67
Can be used for ACE? I'm uncertain FTTB, but probably not.
Other notes: In the english releases, this was ACE exploitable. See here for details
```````````````````````````````````````````````````
Hex $5A
Name: 5かい (5F)
Effects: This is entirely dependent on your party.
Battle effects: Same behavior
Jumps to WRAM? Yes, $D123
Can be used for ACE? Yes, i'll go into detail tommorow
Other notes: Essentially 8f for the Japanese releases
----------------------------------------
Hex $5B
Name: 6かい  (6F)
Effects: Game crashes/hangs
Battle behavior: Same behavior, though different jump location
Jumps to WRAM? Yes, $C4E1 (tilemap) or $E002 during battle (flag determining whether or not sound is muted)
Can be used for ACE? No.
Other notes: None
-----------------------------
Hex $5C
Name: 7かい (7F)
Effects: Psuedo-random effects. Game can sometimes crash,restart,hang,do nothing, or something else entirely
Battle Behavior: Game crashes/hangs
Jumps to WRAM? Not directly, and only guaranteed during battle. $F080
Can be used for ACE? No.
Other notes: Effects are consistent during battle
------------------------------------------
hex $5D
Name: 8かい (8F)
Effects: Game hangs/Crashes
Battle behavior: Same behavior
Jumps to WRAM? Not directly, $F080
Can be used for ACE? No.
Other notes: None:
-------------------------------------
Hex $5E
Name: 9かい (9F)
Effects: Game crashes/hangs
Battle behavior: Same Behavior
Jumps to WRAM? Not directly, $F080
Can be used for ACE? No.
Other notes: None
-------------------------------------
Hex $5f
Name: 10かい (10F)
Effects: Game simply hangs on the item menu, or executes code from $CA1E
Battle behavior:   Same behavior
Jumps to WRAM? Yes, $CA1E
Can be used for ACE? No.
Other notes: None
-----------------------------
Hex $60
Name: 11かい (11F)
Effects: Brings up the generic "You can't use that here" message
Battle behavior: Same behavior
Jumps to WRAM? No.
Can be used for ACE? No.
other notes: None
------------------------
Hex $61
Name: ちか4かい (B4F)
Effects: Game hangs/Crashes
Battle behavior: Same behavior
Jumps to WRAM? Not directly, $EAAF
Can be used for ACE? No.
Other notes: None
----------------------------------
Hex $62
Name: かみなリハッヂ (w m)
Effects: Dependant on data starting from $D0E1 onward
Battle behavior: Same behavior
Jumps to WRAM? Yes, $D0E1
Can be used for ACE? Sometimes. It's entirely dependent on the data at $D0E1 (wMoveStrings). Should the user be lucky, the data here creates a slide to Pokemon party data. See below for details.
Other notes: Don't try using this for ACE, 5f is an alternative that lands directly on Pokemon data
----------------------------------------------------
Hex: $63
Name: かいがらバッヂ (ws m)
Effects: Game simply hangs on the item menu
Battle behavior: Game crashes/hangs
Jumps to WRAM? Yes, but only during battle, and not directly. $F080
Can be used for ACE? No.
Other notes: None
----------------------------------
Hex: $64
Name: おじ芒つバッヂ (v t m)
Effects: Game hangs/Crashes
Battle behavior: Same behavior
Jumps to WRAM? Not directly, $F080
Can be used for ACE? No.
-----------------------------------------
Hex $65
Name: はやぶさバッヂ ('d m)
Effects: Game simply hangs on the item menu
Battle behavior: Same behavior
Jumps to WRAM? No.
Can be used for ACE? No.
-----------------------------------
Hex $66
Name: ひんやリパッヂ (m)
Effects: Causes the screen to fade out to white, then hangs game
Battle behavior: Very odd. Causes game to force-exit battle, but then forces the player into a completely dark map that doesn't seem to have an exit.
Jumps to WRAM? No.
Can be used for ACE? No.
---------------------------------------
Hex $67
Name: なかよL.ハッチ (w 'l m)
Effects: Execute code based on event flags. Even if all of your event flags are $00, game will still hit an rst vector.
Battle behavior: Same behavior
Jumps to WRAM? Yes, $D983
Can be used for ACE? No
-----------------------------------------
Hex $68
Name: ハラハッヂ (f m)
Effects: Game hangs/Crashes
Battle behavior: Same behavior
Jumps to WRAM? Yes, $CD35
Can be used for ACE? No.
----------------------------------------
Hex $69
Name: ひのたまバッヂ (m)
Effects: Seemingly nothing
Battle behavior: Relinquishes your turn
Jumps to WRAM? No.
Can be used for ACE? No.
------------------------------------------
Hex $6A
Name: コールドバッヂ (-g m)
Effects: Game simply hangs on the item menu. You can escape this by mashing a, but you will still be in a softlock-like state
Battle behavior: Behavior is interesting. Upon mashing a to escape the items menu, the battle will continue as normal, however you will not be able to see the screen. There can sometimes be brief periods in which the screen can be seen, but sprites are severely corrupted. After this, you enter a softlock-like state
Jumps to WRAM? No.
Can be used for ACE? No.
---------------------------------------------
Hex $6B
Name: たまご
Effects: Executes code from tilemap. This will probably crash the game.
Battle behavior: Same behavior
Jumps to WRAM? Not directly, $E3EA
Can be used for ACE? No.
-------------------------------
Hex $6C
Name: ひよこ (é)
Effects: Executes code from a backup of the tilemap. This will probably crash the game
Battle behavior: Same behavior
Jumps to WRAM? Yes, $CDD0
Can be used for ACE? No.
-----------------------------------------
Hex $6D
Name: フロンス (il)
Effects: Seemingly nothing
Battle behavior: Relinquishes turn
Jumps to WRAM? No.
Can be used for ACE? No.
------------------------------------------
Hex $6E
Name: シルハー
Effects: Game hangs/Crashes
Battle behavior: Same behavior
Jumps to WRAM? Not directly, $F080
Can be used for ACE? No.
-------------------------------
Hex $6F
Name: コールド
Effects: Jumps into data such as flag data. This will probably crash the game.
Battle behavior: Same behavior
Jumps to WRAM? Yes, $CD68
Can be used for ACE? No.
------------------------------------
Hex $70
Name: デチキャフテン
Effects: Draws a glitch textbox. Pressing a on this textbox will execute code from $D1F0
Battle Behavior: Same behavior f
Jumps to WRAM? Yes, $D1F0
Can be used for ACE? No.
Other notes: Corrupted screen that appears after returning is rather interesting. I will attach it to this thread.
----------------------------------------------------------------------------------------------------------------

I have more, just allow me to secure some time. Also, the Japanese names are probably a little off. Apologies if they are.

Getting Started With 5f
5かい (known as 5f in the English releases) is a glitch item that executes code from $D123, which controls the number of Pokemon in your party. This essentially makes it a carbon copy of 8f from the English releases. Just like 8f, you will need a bootstrapper to use 5f practically. If you wish to direct traffic to the third bag slot, you may do so with:
Code: [Select]
// Exactly 5 Pokemon
Pidgey // 233 HP
Parasect
Raticate
Tentacool
Nidoran (male)

With this, the state of the registers will probably be:
Code: [Select]
af = 2300
bc = FFB2
de = 0001
hl = D2A6

"So what can I do with this" - You can now use 8f -like scripts. I can assure you almost no script from English R/B will work here due to a shift in data, but most codes can be ported.

Example "Get x255 Master Balls in first slot"
Code: [Select]
ミックスオレ (Lemonade) x1
わきマシン34 (TM34)    x162
わきマシン10 (TM10)   x201

--------------------------------------------

"So why do glitch items tend to jump to $F080" - For whatever reason, there is a jump instruction at $0038 to $F080. Since all rst vectors in Japanese Red/Green go to $0038, the code will end up at $F080 whenever an rst vector is hit.
6
General Discussion / Net Neutrality
« on: December 06, 2017, 07:19:33 am »
For those who are blissfully unaware, Net neutrality is being threatened, greater than it's ever been. Should Net Neutrality be repealed, there will be nothing stopping ISPs from throttling small websites (like GCLF), charging extra fees for services, and bullying small websites into paying ISPs for "Fast Lanes".

If you haven't already, please call congress.
7
Hey all. Recently, I've been developing a program that allows you to enter in codes at your disposal; similar to that of a gameshark.

Conveying the concept into words is difficult, so instead I have provided a video demonstration as well as some attached photos. Nota bene, the youtube video is inaccurate, as it demonstrates that the volume is muted (this has been changed), and it claims that the program must be written at $D8C5 (this has been fixed, it now can fit into $D901)

Basically, it's a GUI that acts as a memory editor, allowing you to change any byte in memory that you desire.

To use, first write these bytes at $D901 (if you're on hardware, this can be done with this RAM writer)

Then, arrange your bag as the following:
8f
Any Item
Carbos   x217
X Accuracy   x1
TM33     xany

After this, arrange your party in the usual 8f bootstrapping format. Once this has been accomplished, you now have a Pseudo-Gameshark program at your disposal :).

Syntax goes as follows:
First 2 characters = Byte to write
Second 2 characters = Low byte of address
Final 2 characters = High byte of address

Here are some codes for use with this (note that if there are more than one lines of code, this means the program is used once for each line):

x255 Master Balls in slot 2
0120D3
FF21D3

Encounter any Pokemon
XX59D0

Replace XX with the SpeciesId

Walk through walls
0138CD

... and many more is possible with this program.

Here are the known drawbacks

-Encountering any trainer overwrites $D901 (unfortuantely there isn't much I can do regarding this :( )
-This program is rather large. If you're planning on writing this on hardware, ensure you have at least an hour to spare
-It's impractical

I understand the impracticality of this, and frankly this was more of "for the lulz" project more than anything. But if you like this idea,feel free to try it out.

Here's the source for anyone who's interested.
8
Pokémon Discussion / Emerald RNG abuse: RNG method for starter Pokemon.
« on: October 31, 2017, 09:35:35 am »
(Apologies for the long title)

I'm looking to RNG abuse my starter Pokemon in Emerald (i'm abusing for favorable IVs).

Would I simply use RNG method 1 (as for Stationary Pokemon), or is another method needed?

Thanks in advance!


Edit: It's worth noting that i'm on emulator.
9
The Dumpster Out Back / Re: Coin Case Glitch in other languages
« on: October 30, 2017, 10:11:16 am »
Anytime
10
EDIT 1: Wow, you can't even read this on mobile! Bear with me here, I'm learning to use the "table" function, hopefully that will clean things up.


As box name codes become increasingly popular, it's become necessary to have the characters and their corresponding hexes documented in location.

Unfortunately, The Big HEX List™ only documented R/B/Y Characters.

So,for the time being, here's an unofficial G/S/C Character hex list! (Apologies for disorganization)


WARNING: INCREDIBLY SLOPPY! What I should've done was make this in Notepad, and copy-paste upon completion, but that idea hit me far too late.
Char:             Hex:            Dec:          Pokemon:        Item:       Op:
(Space)          $7f               127               Pinsir         Card Key     ld a,a
A                   $80              128              Tauros        Machine Part  add a,b
B                   $81              129              Magikarp    Teru-Sama     add a,c
C                   $82              130             Gyrados        Lost Item     add a,d
D                   $83              131             Lapras         Stardust        add a,e
E                   $84              132              Ditto           StarPiece      add a,h
F                   $85              133              Eevee       Basement Key   add a,l
G                  $86              134              Vapeoren       Pass              add a,(hl)
H                  $87              135              Jolteon          Teru-Sama      add a,a
I                   $88              136               Flareon         Teru-Sama      adc a,b
J                   $89              137              Porygon         Teru-Sama      adc a,c
K                  $8a               138             Omanyte          Charcoal       adc a,d
L                  $8b               139              Omastar         Berry Juice     adc a,e
M                 $8c               140                Kabuto         Scope lens      adc a,h
N                 $8d               141              Kabutops         Teru-Sama     adc a,l
O                 $8e               142               Aerodactyl      Teru-Sama     adc a,(hl)
P                  $8f               143               Snorlax           Metal Coat     adc a,a
Q                 $90               144              Articuno         Dragon Fang    sub a,b
R                 $91               145               Zapdos            Teru-Sama     sub a,c
S                 $92               146              Moltres              Leftovers       sub a,d
T                 $93               147              Dratini               Teru-Sama     sub a,e
U                $94               148               Dragonair           Teru-Sama    sub a,h
V                $95               149              Dragonite            Teru-Sama    sub a,l
W               $96               150                 Mewtwo           MystryBerry    sub a,(hl)
X                $97               151               Mew              Dragon Scale       sub a,a
Y                $98               152               Chikorita         Berserk Gene       sbc a,b
Z                $99               153              Bayleef               Teru-Sama         sbc a,c
(                 $9a               154             Meganium            Teru-Sama        sbc a,d
)                $9b                155            Cyndaquil              Teru-Sama       sbc a,e
:                $9c                 156           Quilava                   Sacred Ash        sbc a,h
;                $9d                157            Typhlosion              Heavy Ball          sbc a,l
[                $9e                158             Totodile                 Flower Mail        sbc a,(hl)
]                $9f                 159               Croconow            Level Ball            sbc a,a
a                $a0                160               Feriligator           Lure ball            and b
b               $a1                  161            Sentret                  Fast Ball           and c
c              $a2                  162               Furret                 Teru-Sama          and d
d              $a3                  163               HootHoot             Light Ball            and e
e             $a4                   164              Noctowl                 Friend ball          and h
f              $a5                  165               Lebyda                  Moon ball            and l
g            $a6                   166               Ledian                   Love Ball           and (hl)
h           $a7                    167               Spinark                Normal Box          and a
i            $a8                    168               Ariados              Gorgeous Box        xor b
j            $a9                    169              Crobat                   Sun Stone           xor c
k           $aa                    170               Chinchou             Polkadot Bow         xor d
l            $ab                    171              Lanturn                Teru-Sama            xor e
m          $ac                    172               Pichu                   Up-Grade                xor h
n           $ad                   173              Cleffa                       Berry                  xor l
o           $ae                    174          IgglyBuff                   Gold berry           xor (hl)
p           $af                   175               Togepi                  Squirtbottle            xor a
q           $b0                   176             Togepic                     Teru-Sama         or b
r           $b1                  177                 Natu                     Park ball            or c
s           $b2                  178                Xatu                    Rainbow Wing       or d
t           $b3                  179                Mareep                   Teru-Sama           or e
u          $b4                  180                Flaffy                   Brick Piece              or h
v          $b5                 181                Ampharos               Surf Mail               or l
w         $b6                 182               Bellossom               LiteBlue Mail          or (hl)
x         $b7                 183                Marril                    Portrait Mail          or a
y         $b8                184              Azumarril                    Lovely Mail          cp b
z         $b9                185                Sudowoodo              Eon Mail                cp c
'd        $d0                 208               Steelix                       TM 17                  ret nc
'l         $d1                209                Snubbull                     TM 18                    pop de
'm       $d2               210                Granbull                      TM 19               jp nc,$xxyy
'r        $d3                211                 QwillFish                      TM 20               invalid op
's        $d4               212                  Scizor                          TM 21            call nc,$xxyy
't        $d5               213                   Shuckle                       TM 22              push de
'v       $d6               214                   Heracross                     TM 23             sub $xx
'         $e0              224                      Octillary                      TM 32            ld ($ffxx),a
PK      $e1              225                      Delibird                       TM 33            pop hl
MN     $e2               226                     Mantine                        TM 34           ld ($ff00 + c),a
-        $e3               227                      Skarmory                    TM 35           invalid op
?        $e6              230                       Kingdra                      TM 38             and $xx
!        $e7               231                        Phanpy                     TM 39            rst 20h
.        $e8              232                           Donphan                 TM 40            add sp,$xx
&       $e9               233                           Porygon2               TM 41             jp (hl)
é       $ea               234                      Stantler                       TM 42             ld ($xxyy),a
(male) $ef              239                         Elekid                       TM 47            rst 28h
x(mult) $f1            241                         Miltank                      TM 49           pop af
/        $f3              243                          Raikou                       HM 01        di
,        $f4              244                          Entei                         HM 02         invalid op
(female) $f5          245                        Suicune                        HM 03        push af
0        $f6             246                       Larvitar                         HM 04         or $xx
1        $f7            247                          Pupitar                        HM 05        rst 30h
2        $f8             248                      Tyranitar                        HM 06        ld hl,(sp + $xx)
3        $f9           249                             Lugia                        HM 07         ld sp,hl
4        $fa           250                           Ho-oh                        HM 08        ld a,($xxyy)
5        $fb          251                             Celebi                        HM 09      ei
6        $fc           252                            ?????                       HM 10       invalid op
7        $fd          253                             Egg                         HM 11        invalid op
8        $fe          254                            ?????                        HM 12         cp $xx
9        $ff           255                            ?????                       CANCEL       rst 38h

I know it's sloppy, and i probably made a spelling blunder somewhere, but i hope this useful in some way!

Enjoy!
11
I'm making a small ACE game for Pokemon Red. I want a block to be placed at a random x and y value, and due to screen limitations, the x value must be between $00 and $13 (inclusive) and the y value must be between $00 and $11 (also inclusive)

My question is this: Is there any way to make an RNG that is between two different values?
12
In Pokemon R/B, there is address $D059, which when set to a non-zero value, forces an encounter with the corresponding species index that the address is set to. Is there a similar address for Gold and Silver?

By the way, I keep hearing that you must "fix the stack" when making ACE codes for Gen 2. How does one accomplish this?
13
So last week I made an item script that could grant you any Pokemon you desire by the amount of times you pressed right.

For example, if you wanted Mew, you would press:
RIGHT x21
SELECT - exit

Here's The code, commented to the best of my ability:
Code: [Select]
dec a ;-padding-
ld c,d ; c = $00
start:
 call $3ffa ; calls joypad subroutine
 ldh a,($b2) ; Grab most recently released button
 cp $10 ; If that button is right...
 jr z,righthandler ; ...then go to righthandler
 cp $20 ; If that button is left...
 jr z,lefthandler ;...then go to lefthandler
 ldh a,($f8) ; Get current held button
 cp $04 ; If that button is select...
 jr z,end ; Go to the end
 jr start ; Keep listening for inputs
righthandler:
 inc c ; Every time right is pressed, increment c
 jr start ; Keep listening for inputs
lefthandler:
 dec c ; Every time left is pressed, decrement c
 jr start ; Keep listening for inputs
end:
 ld b,c ; B = C, B is used as the Species Index
 ld c,$32 ;c + $32(50) , C is used as level.
 call $3e48 ; Calls pokemon recieve subroutine
 ret ; "It''s first grade, Spongebob!"

The code works perfectly fine as written, the only problem is I've been attempting to add padding (useless filler to prevent glitch items) to the code, but I can't seem to figure out how I would go about padding this script. Every time I add padding to fix one problem, another arises, and it's frustrating because I want to finish this soon.

Any and all help is appreciated.
Pages: [1]