User:Evie (Torchickens)/Sandbox: Difference between revisions
(→Timing) |
|||
(10 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
Evie's list of things she wants to do, or has recently come across but doesn't know much about. Feel free to add details if you like. |
Evie's list of things she wants to do, or has recently come across but doesn't know much about. Feel free to add details if you like. |
||
==Timing== |
|||
*[https://rgbds.gbdev.io/docs/v0.3.5/gbz80.7 Cycles] |
|||
*[https://gbdev.gg8.se/wiki/articles/OAM_DMA_tutorial DMA transfer]: ~160 microseconds |
|||
*~FF46 write - began OAM DMA transfer (one byte RAM specified for h (high byte) in RAM pointer that mirrors rDMA/FEXX-9F (you know this)) |
|||
*"[https://gbdev.io/pandocs/STAT.html LY indicates the current horizontal line, which might be about to be drawn, being drawn, or just been drawn. LY can hold any value from 0 to 153, with values from 144 to 153 indicating the VBlank period]." |
|||
*You can only access HRAM while a DMA transfer is taking place. |
|||
*"[[RNG correlation (Generation I)|the rDIV register, which itself is incremented at a rate of 16384Hz (~16779Hz on SGB)]]" |
|||
*From that RNG correlation article "516 cycles (2.015625 rDIV periods)" - so just say 2/516 (1/258 rDIV) for one cycle. |
|||
*[https://gbdev.io/pandocs/OAM_Corruption_Bug.html OAM corruption bug] |
|||
*[https://gbdev.gg8.se/wiki/articles/Video_Display Video Display]/VBlank |
|||
*[https://www.3bscientific.com/gb/microsecond-counter-230-v-5060-hz-1017333-u8498285-230-3b-scientific,p_813_25740.html Microsecond counter] |
|||
*It's more complex than this, but just leave these notes for now. |
|||
To-do: Defaults and relationship with Game Boy, GBC, SGB boot ROMs. |
|||
==Hexadecimal byte representation of Cryo's real-time RAM writer for writing code using button sequences== |
==Hexadecimal byte representation of Cryo's real-time RAM writer for writing code using button sequences== |
Latest revision as of 21:18, 1 May 2024
Evie's list of things she wants to do, or has recently come across but doesn't know much about. Feel free to add details if you like.
Timing
- Cycles
- DMA transfer: ~160 microseconds
- ~FF46 write - began OAM DMA transfer (one byte RAM specified for h (high byte) in RAM pointer that mirrors rDMA/FEXX-9F (you know this))
- "LY indicates the current horizontal line, which might be about to be drawn, being drawn, or just been drawn. LY can hold any value from 0 to 153, with values from 144 to 153 indicating the VBlank period."
- You can only access HRAM while a DMA transfer is taking place.
- "the rDIV register, which itself is incremented at a rate of 16384Hz (~16779Hz on SGB)"
- From that RNG correlation article "516 cycles (2.015625 rDIV periods)" - so just say 2/516 (1/258 rDIV) for one cycle.
- OAM corruption bug
- Video Display/VBlank
- Microsecond counter
- It's more complex than this, but just leave these notes for now.
To-do: Defaults and relationship with Game Boy, GBC, SGB boot ROMs.
Hexadecimal byte representation of Cryo's real-time RAM writer for writing code using button sequences
https://archives.glitchcity.info/forums/board-115/thread-7744/page-0.html
Red/Blue EN:
2EFE1D5414D523CD FA3F3DF0F8FE0CC8 F0B237B728F143B9 4228EB4F41865077 4418E4
Catch rate correspondence table (Generation I)
Red/Blue
ID Pokemon Catch rate Held item in Gen 2 00 'M (00) 1D Carbos 01 Rhydon 3C Silver Leaf
Exceptions:
Changes to catch rate in games (Thx Bulbapedia):
- In Yellow, starter Pikachu hold Light Ball
- In Yellow, wild Kadabra hold TwistedSpoon
- In Yellow, wild Dragonair hold Protein
- In Yellow, wild Dragonite hold Antidote
- Stadium gift Pokémon hold Normal Box (Round 1) or Gorgeous Box (Round 2)
Converted catch rates (TimeCapsule_CatchRateItems):
- Catch rate 0x19 becomes Leftovers
- 0x2D becomes Bitter Berry
- 0x32 becomes Gold Berry
- 0x5A, 0x64, 0x78, 0x87, 0xBE, 0xC3, 0xDC, 0xFA, 0xFF all become Berry
How to acquire a Pokémon with any catch rate:
(Tested on Yellow probably works the same on Red/Blue)
- Have in party only special MissingNo. (Kabutops Fossi, Aerodactyl, Ghost), then save/reset
- Manipulate D0C0-1 (W_MONHCATCHRATE). (Probably can do this with LWA)
- Encounter/acquire special MissingNo. (Kabutops Fossi, Aerodactyl, Ghost) and catch it
- The acquired Pokémon will have the catch rate from D0C0-1.
IR trade pet project
Theory
Use $FF56 to turn infrared on in two games with arbitrary code execution. Synchronise the PPU(?) cycles. Use a modified version of the Cable Club code.
In it, have a prompt to keep the Game Boy Colors next to each other for each interaction (press A to start read/write) and have some kind of error prevention if communication fails.
I wonder how practical this is because for Gold/Silver they used IR for different purposes (obtaining decorations, items, Trainer House Trainers).