Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2015-02-06 17:45:29

sajuuk
New member
Registered: 2015-02-04
Post 1/5

Quick Questions

Well, here I am after all these years of never joining IIMarckus' first/second generation Pokemon game forum. I've played Super Mario World hacks for a little less than five years now. Why it's called a "hack", I have no clue, more like a modification like all other games. I've made my own graphics for my own modifications as well as about a week of 65816 ASM (if I recall correctly; it might have been 6502, I might be wrong). I have not yet done any modifications for custom music, block, and a load of other things. I've compiled a list of questions for y'all. See below:
1. Would I be able to use CheatEngine to modify VBA-M RAM data in real time? I've only used it four or five times in 2008 to modify RAM data in a few games: Insaniquarim, Halo CE, Homeworld 2... until I found out I could modify resource units by modifying the Lua script for each mission start, etc. I don't know if it would be too much of a hassle to use it when attempting to modify data in RAM, but I guess it's worth a shot.
2. The knowledge about how to do it would be nice, so how would I link two open VBA-M windows with Pokemon RBYGSC loaded? I've attempted to link with localhost, but the connection fails when I go upstairs in a Pokemon Center with the same Gold ROM and two different gamesaves (since loading the same gamesave loaded into both loaded ROMs freezes the second VBA-M window for some reason).
3. Are IPS patches the most common binary patch format? I've considered, but never tested, the following concept (not that this is a programming-based forum): I've released BETA stages of my own command-line interpreter written in C++ with the help of SFML. I figured that if I release the original Win32 binary format to a select few people, sure it could make its way around the internet, but I place trust in the people I give it to (not that I'm trying so hard to protect the source), and create an IPS patch with Lunar IPS (is this one of FuSoYa's tools the most popular IPS patching/patch creation tool?), then send it to the recipients of the original Win32 binary, then they patch it with Lunar IPS with the IPS patch I made. Will it work? I'll see if I can find time to test it within the next week, but has anyone ever tried this?
4. Are there any other table-supporting hexadecimal editors other than the old, trustworthy Translhextion? I used to use HxD until I discovered tables.
5. Apparently there are different cartridge types. On my Gold ROM, in VBA-M, "File/ROM Information", the cartridge type ID is 10 and the (apparent) components are "ROM + MBC3 + TIMER + RAM + BATT". These are the actual ROM image, in-cartridge clock, RAM, and battery (which I know is interchangeable). What does MBC3 represent in GameBoy Color cartridges?
6. Doesn't Lunar Expand just add blank bytes to the end of a ROM? Apparently my Gold ROM is a 2MB. I expanded it with Lunar Expand to 4MB. It doubled in size and the latter half of the file is all 00, blank bytes. I read somewhere a couple of months ago that you can only use what's there. Doesn't a ROM expansion, scripting (PKSV), and Z80 ASM allow you to utilize the full potential of the ROM?
7. PKSV is just a tool that allows the user to type in actual words, "compiles" the script (which I assume just translates the script into the appropriate byte codes) and inserts it into the ROM, right? Instead of tedious typing of bytes into the ROM itself, it just does as stated above, correct?

Offline

#2 2015-02-06 18:27:14

693/700

Re: Quick Questions

sajuuk wrote:

1. Would I be able to use CheatEngine to modify VBA-M RAM data in real time?

Yes, but there are better tools for that (specifically, BGB’s debugger).

sajuuk wrote:

3. Are IPS patches the most common binary patch format?

In the context of ROM hacking, yes, even though the format sucks. However…

sajuuk wrote:

I've considered, but never tested, the following concept (not that this is a programming-based forum): I've released BETA stages of my own command-line interpreter written in C++ with the help of SFML. I figured that if I release the original Win32 binary format to a select few people, sure it could make its way around the internet, but I place trust in the people I give it to (not that I'm trying so hard to protect the source), and create an IPS patch with Lunar IPS (is this one of FuSoYa's tools the most popular IPS patching/patch creation tool?), then send it to the recipients of the original Win32 binary, then they patch it with Lunar IPS with the IPS patch I made. Will it work? I'll see if I can find time to test it within the next week, but has anyone ever tried this?

IPS would not be the right tool for this. Actually I think you should just not bother with that kind of policing (who cares if it gets spread around?). xdelta is a better choice for non‐ROM files.

sajuuk wrote:

4. Are there any other table-supporting hexadecimal editors other than the old, trustworthy Translhextion? I used to use HxD until I discovered tables.

Windhex and a couple others. But I would really recommend using the disassembly instead so you can just edit things in a plain old text editor.

sajuuk wrote:

5. Apparently there are different cartridge types. On my Gold ROM, in VBA-M, "File/ROM Information", the cartridge type ID is 10 and the (apparent) components are "ROM + MBC3 + TIMER + RAM + BATT". These are the actual ROM image, in-cartridge clock, RAM, and battery (which I know is interchangeable). What does MBC3 represent in GameBoy Color cartridges?

The Z80 only has 16 bits of address space, and only 15 of them are mapped to ROM. That limits you to a 32 KiB ROM. A Memory Bank Controller is a separate chip in the cartridge that essentially gives you another 8–9 bits of address space, so you can actually address the whole ROM.

sajuuk wrote:

6. Doesn't Lunar Expand just add blank bytes to the end of a ROM? Apparently my Gold ROM is a 2MB. I expanded it with Lunar Expand to 4MB. It doubled in size and the latter half of the file is all 00, blank bytes. I read somewhere a couple of months ago that you can only use what's there. Doesn't a ROM expansion, scripting (PKSV), and Z80 ASM allow you to utilize the full potential of the ROM?

Different MBCs only support particular ROM sizes. MBC3 supports up to a maximum of 2 MiB. Expanding the ROM beyond that entails physically expanding the filesize of your ROM image and telling the emulator that you’re using MBC5 (which supports up to 8 MiB) by changing the byte in the header.

sajuuk wrote:

7. PKSV is just a tool that allows the user to type in actual words, "compiles" the script (which I assume just translates the script into the appropriate byte codes) and inserts it into the ROM, right? Instead of tedious typing of bytes into the ROM itself, it just does as stated above, correct?

Basically. But PKSV is a little out of date these days. The disassemblies do the same thing and are much more capable.

#3 2015-02-06 19:02:52

sajuuk
New member
Registered: 2015-02-04
Post 2/5

Re: Quick Questions

Thanks for clearing everything up. I'm assuming PokeCrystal is the one everyone uses since it's number one on GitHub and Google, correct? And is there a specific "most popular" Z80 assembler? I know FASM has ARM (FASMARM), x86, and x86-64 branches, but I don't believe it has a Z80 branch.

Miksy91 used Gameboy Assembler Plus in his hacking tutorial videos, but would it be better to use an up-to-date assembler (possibly not because it wasn't meant for GameBoy development)?

Last edited by sajuuk (2015-02-06 19:16:40)

Offline

#5 2015-02-09 13:51:06

sajuuk
New member
Registered: 2015-02-04
Post 3/5

Re: Quick Questions

Alright. Next:
1. Would it be better to use xdelta for SNES/GB/GBC ROM patches? I understand SNES patches on SMWCentral are all in IPS format, but is the IPS format best for SNES ROM patches? the 2014 version of Pokemon Brown comes stock in xdelta format. If I were to make my own GB/GBC ROM patch, would it be best to use xdelta? If so, why?
2. If I wanted to create my own SNES console tile for use in Pokecrystal with its own event (say the character stands in front of it, the player presses A, and it displays "It's a SNES console. It has Super Mario World loaded in it."), wouldn't it be best if I programmed it into the code from Pokecrystal and assembled the entire game? What would really be nice is if I could import the tile from RBY. Plus, I don't think PKSV would be logical since this would be, how to put this, a "big" job. (Not really big, but bigger than simply editing text.)
3. Is/Are there specific editor(s) that I need to use to edit game graphics? Upon reviewing the graphics folder, the bitmap (I assume it's some type of bitmap image) files are of a various BPP extension. I doubt there are any G.I.M.P. plugins for this, but I'll check. (G.I.M.P. is my most used graphics and image editor and seems superior to PhotoShop to me.) I figured the graphics would be a script in plain text format (since the music is scripted) that assigns certain colored pixels to points on a graph, but it seems to be in (some sort of?) binary format.
4. Is Cygwin still the most obvious choice to this day when assembling Pokecrystal with RGBDS? I guess I might as well just use Cygwin since it's probably the quickest and easiest and, as listed, the installer contains a variety of externals like GCC (which I already have and have had since 2011 when I began learning C and C++) and make.
5. When I read over New Bark Town's script, the fat guy says "Yo, PLAYER! I hear PROF. ELM...". Pokecrystal's disassembly is of Pokemon Crystal v1.0. I'd expect minor changes in v1.1 (the version of the ROM I have on my computer), so does that explain why that string of text in my ROM begins at 0x1A8275 where as in Pokecrystal's code it's supposed to begin at 0x1A8274 ? I guess since it's a disassembly of v1.0 just one byte had been added before that string of text occurs in the bytecode. Or is the string stored one byte-position after the one listed in the code?
6. Can I use the blank space at the end of the ROM for new locations of text strings/graphics/etc? As you stated earlier: the ROM size has a limit, right? I doubt I'll go over that limit anytime soon.
7. I assume I'll learn assembly for the Z80 microprocessor like I've always learned a programming language: reading over existing code from the internet (or in this case, Pokecrystal), but in any case, documents or books are always helpful. Any recommendations specifically for GameBoy Color development?

I'll download the needed programs and attempt to assemble Pokecrystal.

EDIT: Hang on, do I have to use make and Cygwin? I'd rather just create a batch script that assembles the code and links it accordingly.

Last edited by sajuuk (2015-02-09 15:28:00)

Offline

#6 2015-02-09 18:20:28

695/700

Re: Quick Questions

sajuuk wrote:

1. Would it be better to use xdelta for SNES/GB/GBC ROM patches? I understand SNES patches on SMWCentral are all in IPS format, but is the IPS format best for SNES ROM patches? the 2014 version of Pokemon Brown comes stock in xdelta format. If I were to make my own GB/GBC ROM patch, would it be best to use xdelta? If so, why?

Aesthetically, sure. But in reality, nobody uses xdelta for ROM hacks. You can use xdelta for your patch but most people will have no idea how to apply it.

sajuuk wrote:

2. If I wanted to create my own SNES console tile for use in Pokecrystal with its own event (say the character stands in front of it, the player presses A, and it displays "It's a SNES console. It has Super Mario World loaded in it."), wouldn't it be best if I programmed it into the code from Pokecrystal and assembled the entire game?

Yes.

sajuuk wrote:

3. Is/Are there specific editor(s) that I need to use to edit game graphics? Upon reviewing the graphics folder, the bitmap (I assume it's some type of bitmap image) files are of a various BPP extension. I doubt there are any G.I.M.P. plugins for this, but I'll check. (G.I.M.P. is my most used graphics and image editor and seems superior to PhotoShop to me.) I figured the graphics would be a script in plain text format (since the music is scripted) that assigns certain colored pixels to points on a graph, but it seems to be in (some sort of?) binary format.

.2bpp is the native Game Boy graphics format. There are some editors for it (Tile Molester?). pokered stores all the graphics as PNG, and converts to 2bpp during the build process—pokecrystal isn’t yet to that point.

sajuuk wrote:

4. Is Cygwin still the most obvious choice to this day when assembling Pokecrystal with RGBDS?

Probably? I don’t really know. Honestly I just use Unix.

sajuuk wrote:

5. When I read over New Bark Town's script, the fat guy says "Yo, PLAYER! I hear PROF. ELM...". Pokecrystal's disassembly is of Pokemon Crystal v1.0. I'd expect minor changes in v1.1 (the version of the ROM I have on my computer), so does that explain why that string of text in my ROM begins at 0x1A8275 where as in Pokecrystal's code it's supposed to begin at 0x1A8274 ?

The 0 byte preceding the text is a command to the text engine that means “print the following string.”

sajuuk wrote:

6. Can I use the blank space at the end of the ROM for new locations of text strings/graphics/etc? As you stated earlier: the ROM size has a limit, right? I doubt I'll go over that limit anytime soon.

Correct and correct.

sajuuk wrote:

7. I assume I'll learn assembly for the Z80 microprocessor like I've always learned a programming language: reading over existing code from the internet (or in this case, Pokecrystal), but in any case, documents or books are always helpful. Any recommendations specifically for GameBoy Color development?

Not really. There’s Pandocs but it’s sort of more for low‐level hardware stuff.

#7 2015-02-09 19:03:25

sajuuk
New member
Registered: 2015-02-04
Post 4/5

Re: Quick Questions

IIMarckus wrote:

.2bpp is the native Game Boy graphics format. There are some editors for it (Tile Molester?). pokered stores all the graphics as PNG, and converts to 2bpp during the build process—pokecrystal isn’t yet to that point.

In the pokecrystal README document, it states that one must have pypng installed with Cygwin. You claim that pokecrystal isn't to the point of where graphics are converted to 2BPP format from PNG, but what does one need pypng for, then?

IIMarckus wrote:

Probably? I don’t really know. Honestly I just use Unix.

Would it be best if I just used a VM to assemble pokecrystal?

Also, how did these (you?) folks figure out how to disassemble Pokemon Red and Crystal? Are there actual disassemblers in existence? Or did they have to figure out what bytes match what functions/opcodes? The latter method seems like it would be hell to take out.

And what about this? Does this "restored" version of pokecrystal/Pokemon Crystal provide any major changes when compared to the regular pokecrystal?

Last edited by sajuuk (2015-02-09 19:11:28)

Offline

#8 2015-02-09 21:11:23

comet
Member
Registered: 2012-04-09
Post 524/672

Re: Quick Questions

sajuuk wrote:
IIMarckus wrote:

.2bpp is the native Game Boy graphics format. There are some editors for it (Tile Molester?). pokered stores all the graphics as PNG, and converts to 2bpp during the build process—pokecrystal isn’t yet to that point.

In the pokecrystal README document, it states that one must have pypng installed with Cygwin. You claim that pokecrystal isn't to the point of where graphics are converted to 2BPP format from PNG, but what does one need pypng for, then?

pokecrystal will convert pngs just like pokered. If you include "gfx/some_picture.2bpp" in your code, you only need to have "gfx/some_picture.png" and make handles the rest.

You can run "make pngs" to make pngs out of all the graphics files as well, so there's little difference in usability.

There are two reasons they're not png to begin with like pokered:

  • Compressed data (.lz) can't be recreated 1:1 yet. One of the goals for pokecrystal is to reproduce the same rom image. pokered uses a different compression scheme which has been solved, so this is not an issue.

  • Uncompressed graphics need to be converted to png with the appropriate dimensions, since Game Boy graphics don't contain that information. This is easily done, but no one has gotten to it.

Last edited by comet (2015-02-10 05:08:35)

Offline

#9 2015-02-11 18:01:54

sajuuk
New member
Registered: 2015-02-04
Post 5/5

Re: Quick Questions

Thanks for the clarification, comet. Alright, so did the developers of VisualBoyAdvance-M integrate GameBoy color connections? I'll try again, but it seems that I cannot trade between two crystal ROMs. I've tried using localhost as the IP address in the custom connection, but neither the single computer option nor the direct connection options work. I remember having this issue with VBA-Link as well (which I assume the developers of VBA-M took the connection code, possibly snippets of it, and implemented it into VBA-M). IIMarckus, you use Linux and I don't believe VBA or VBA-M have a Linux port, but would you know? comet, what OS do you use? Am I on a forum full of UNIX guys?

Last edited by sajuuk (2015-02-11 18:59:02)

Offline

Board footer

Powered by FluxBB