Main Menu
Main Page
Forums
New pages
Recent changes
Random page
Help

Glitches
Arbitrary code execution
Pokémon cloning
Pomeg glitch
Tweaking
Glitches by generation
Glitch categories

References/Resources
Databases
Disassembly projects
The Big HEX List
Pokémon cheat codes
Pokémon glitch terminology
Useful tools
More

Affiliates
Legendary Star Blob 2 (Hakuda)
Pokémon Speedruns wiki
PRAMA Initiative
Become an affiliate!

Technical
Site source code

Search Wiki

 

Search Forums

 

Author Topic: Player Coordinates RAM Writer question  (Read 268 times)

0 Members and 1 Guest are viewing this topic.

metalmario32

  • The ENG Pokémon Fan
  • GCLF Member
  • Offline Offline
  • Gender: Male
  • The English Pokémon RBY Nerd 🤓
    • View Profile
Player Coordinates RAM Writer question
« on: August 07, 2018, 03:19:19 pm »
On the Player coordinates RAM writer page (https://glitchcity.info/wiki/Player_coordinates_RAM_writer) items are detailed in which you can write to memory. However, I have no idea where the memory write starts from, and I want the memory writer to start from DA80 so I can write offgao's memory editor to execute with glitch item -g m (hex:6A). If the memory writer doesn't start from DA80, is there a way to change that so it does start from DA80?

Edit: The first byte wrote is to D901, I looked harder on the page. I still want to change this to DA80, so is there a way?
« Last Edit: August 07, 2018, 03:20:22 pm by metalmario32 »
I've been a fan of Pokémon since my first game. That was Platinum, though. Ever since then, I've played every single generation of Pokémon at least once and got into glitching them when I got RBY. Oh boy, the fun times that I had as a kid... I <3 GLITCH CITY LABORATORIES for bringing back my childhood!

Quirky Flower Chicken ❤✿

  • Administrator
  • *****
  • Offline Offline
  • Gender: Female
  • (Image thanks Sanrio + Pexels)
    • View Profile
Re: Player Coordinates RAM Writer question
« Reply #1 on: August 07, 2018, 04:51:47 pm »
On the Player coordinates RAM writer page (https://glitchcity.info/wiki/Player_coordinates_RAM_writer) items are detailed in which you can write to memory. However, I have no idea where the memory write starts from, and I want the memory writer to start from DA80 so I can write offgao's memory editor to execute with glitch item -g m (hex:6A). If the memory writer doesn't start from DA80, is there a way to change that so it does start from DA80?

Edit: The first byte wrote is to D901, I looked harder on the page. I still want to change this to DA80, so is there a way?

I think there's definitely a way as I believe I changed the starting point before. I'm afraid I don't know from memory how to do it though, sorry. The best way may be to set up the items in BGB emulator and then view the code or convert the items into ASM by hand and analyse where it gets the D9 and 01 from. The TM17 in slot 10 looks suspicious because TM17 has the ID D9, so that may be where it gets D9 from, but as for the 01 I'm less sure.

Worst case scenario though you can possibly use CopyData (call 00B5 for Blue/(Red?) according to my notes) to move the data to DA80, where bc is the bytes to copy, hl is the source and de is the destination.

Hope this helps, and hope you're able to find the answer!

(Image © Sanrio, Nintendo, HAL Laboratory)

✿ Hi! I'm Evie. I'm a transgender woman, but any pronouns are fine. She/her preferred. ✿ 🦋

Forgiveness is timeless, and moments we look back on humble the soul. Jesus said it best. You must be blind to see and must see to be blind metaphorically is said. I don't think there is one Messiah nor a definitive truth, because we find truths in relative moments. However, there may be unknowable truths and sometimes it feels we have got to embrace the mystery and what we don't know.

Thank you for this lovely artwork Nyapon! :3

metalmario32

  • The ENG Pokémon Fan
  • GCLF Member
  • Offline Offline
  • Gender: Male
  • The English Pokémon RBY Nerd 🤓
    • View Profile
Re: Player Coordinates RAM Writer question
« Reply #2 on: August 12, 2018, 01:48:50 pm »
I'll just use CopyData, thanks! Also what is CopyData in Yellow?

Edit: On my "Alternate Catch 'em All" question, I found that CopyData is 00:00B1 in Yellow. But what is CopyData.copybytes (at 00:00C1) and FarCopyData (at 00:009D)?
« Last Edit: August 12, 2018, 01:54:33 pm by metalmario32 »
I've been a fan of Pokémon since my first game. That was Platinum, though. Ever since then, I've played every single generation of Pokémon at least once and got into glitching them when I got RBY. Oh boy, the fun times that I had as a kid... I <3 GLITCH CITY LABORATORIES for bringing back my childhood!

Quirky Flower Chicken ❤✿

  • Administrator
  • *****
  • Offline Offline
  • Gender: Female
  • (Image thanks Sanrio + Pexels)
    • View Profile
Re: Player Coordinates RAM Writer question
« Reply #3 on: August 12, 2018, 01:57:08 pm »
I'll just use CopyData, thanks! Also what is CopyData in Yellow?

All right then!

It's 00B1.

Template:

ld bc,(number of bytes)
ld hl,(source)
ld de,(destination)
call 00b1
ret

Edit: On my "Alternate Catch 'em All" question, I found that CopyData is 00:00B1 in Yellow. But what is CopyData.copybytes (at 00:00C1) and FarCopyData (at 00:009D)?

Good question. CopyData.copybytes confused me too. I'm unsure but it seems like it's in the middle somewhere of the CopyData routine. I think FarCopyData might be used if copying the data requires a bank switch (i.e. if it's in region 4000-7FFF).
« Last Edit: August 12, 2018, 02:00:10 pm by Evie Torchic the Glitch Scientist »

(Image © Sanrio, Nintendo, HAL Laboratory)

✿ Hi! I'm Evie. I'm a transgender woman, but any pronouns are fine. She/her preferred. ✿ 🦋

Forgiveness is timeless, and moments we look back on humble the soul. Jesus said it best. You must be blind to see and must see to be blind metaphorically is said. I don't think there is one Messiah nor a definitive truth, because we find truths in relative moments. However, there may be unknowable truths and sometimes it feels we have got to embrace the mystery and what we don't know.

Thank you for this lovely artwork Nyapon! :3

metalmario32

  • The ENG Pokémon Fan
  • GCLF Member
  • Offline Offline
  • Gender: Male
  • The English Pokémon RBY Nerd 🤓
    • View Profile
Re: Player Coordinates RAM Writer question
« Reply #4 on: August 12, 2018, 02:30:24 pm »
Hmm. Perhaps copybytes is what actually copies the data.
I've been a fan of Pokémon since my first game. That was Platinum, though. Ever since then, I've played every single generation of Pokémon at least once and got into glitching them when I got RBY. Oh boy, the fun times that I had as a kid... I <3 GLITCH CITY LABORATORIES for bringing back my childhood!

ISSOtm

  • The French Lord of Laziness (and a huge The Legend Of Zelda fan)
  • Staff
  • *****
  • Offline Offline
  • Gender: Male
  • Pewter City (B)rocks !
    • View Profile
    • My Little Website
Re: Player Coordinates RAM Writer question
« Reply #5 on: August 30, 2018, 02:48:29 pm »
https://github.com/pret/pokeyellow/blob/67229ff7571f7216d899f81b5cacd55d476cd6f6/home/copy.asm#L13-L34
CopyData copies a 16-bit amount of bytes, CopyData.copybytes only copies an 8-bit amount of bytes.

FarCopyData is used to copy data across ROM banks.
"THOU SHALL NOT PASS !!"  RIVAL's effect, Gandalf.

Proudly glitching Pokémon Red and Yellow on a Black & White GB, Pocket GB, GB Color, GBA SP and new 3DS.

My Twitter (beware, I'm French)
My YouTube (same warning)

Here is an online tool to build 8F setups : GBz80 to Items !

They see me layzin', they ha-tin'...
Heavy contributor of the global augmentation of entropy (my room's is too damn high !)