Zophar's Message Domain

Go Back   Zophar's Message Domain > Emulation Talk > Rom Hack

Reply
 
Thread Tools Display Modes
Old 02-23-2009, 06:27 AM   #1
joshex
Junior Member
 
Join Date: Feb 2009
Posts: 10
Default linux native GB GBX sprite editor project

I already posted this on some linux forums, but havn't gotten any responses yet.

my introduction; hello I'm joshex an allround artist, I do everything from pixel shading to 3D modelling. I also do a bit a programming (a small bit)

this is a description of a program I would like to write (get help writing) for the suse linux OS, I could use some help getting started..

the program will be a video game emulator/ sprite editor/ translator (I know it's sounds like a lot but it's not) focused on the GB (gameboy), GBC (gameboy color), GBA (gameboy advanced) formats.

the goal; unlike other sprite editors, tile editors ETC. this utility aims to work natively on a linux OS, and support writing to the actual .gb, .gbc, .gba files without the need of attaching a patch. also other sprite editing utilities I've run across have listed the GBC and GBA formats with incorrect color depths (I plan to make a utility that fixes this);

EX (the following color depths are from the windows program YY-CHR):
GB:4 colors (correct)
GBC:4colors (incorrect, correct= 8 colors)
GBA:16colors (incorrect, correct= 32 colors)

functionality; most sprite editors attempt a form of pixel editing in themselves, my program aims to instead to do the following;

load GBX games into emulator mode and extract the game's sprite-sheet, whereby as different sprites are encountered in game-play (character(s) foreground, background, scenery, enemies, bosses and unkown); a sprite location log is written detailing the locations of the individual sprites on said sprite sheet (this log is used to A; extract the sprites individually (line by line) to a .png for external editing in programs such as the GIMP. B; write the edited sprites back into place from the .png replacing the old color values with the new ones.) it will automatically adjust the game's saved format for the amount of different colors you used. for example you might start with a “.GB” file and color it (as they are in gray-scale) and end up with 32 different colors, so when saving it will automatically export it to a “.GBA”.

naturally there some limitations to this; for example:

1: you can't use more than 32 different colors on the .png file other wise it wont be accepted.

2: you can't enlarge the sprites or draw outside the bounds of each sprite, otherwise they will overlap on the game's sprite-sheet (causing either the game to be confused or give a strange appearance)EX: if the sprite sheet is exported to a 300X300 image you cannot lengthen it in any direction.

3: emulator modes that smooth the pixels such as “super eagle” mode (as it's named in most emulators) will not be able to be used during sprite extraction (for the sole reason that it could confuse the log reading script when you go back and try to re-save the new sprites to the game)

4: changing the name or location of the .png will cause the log reading script to “draw a blank”.

5: adding “extra” sprites will be impossible without confusing the log file for the time being.

so how do I start this process?
joshex is offline   Reply With Quote
Old 02-23-2009, 12:54 PM   #2
Lillymon
Senior Member
 
Lillymon's Avatar
 
Join Date: Apr 2002
Location: England
Posts: 2,379
Default

This sounds like a Rom Hack topic to me. Also, if this is going to be designed for Linux, will it be open source too?
__________________
Amelia Explains It All - Eventually. Probably.
Lillymon is offline   Reply With Quote
Old 02-24-2009, 01:14 AM   #3
InVerse
Senior Member
 
Join Date: Jul 2002
Posts: 1,489
Default

Maybe I'm missing something here, but I don't get it.

It sounds like you're intending to extract the sprites from RAM but reinsert them to ROM. I could be wrong, but that would pretty much require specific information for each individual game you wish to be editable, which would defeat the purpose of the logging format you describe.

Also, you do realize that the colors of a particular graphic aren't actually stored within each graphic, right? In order to change the colors of a graphic, you either have to stick to the colors already contained in the particular palette assigned to said graphic or else modify the palette itself, which will also modify the colors of all other graphics assigned to that palette.

I really don't see the benefit of the method you describe over simply using Tile Molester. Tile Molester is written in Java and runs fine in Linux without the need for WINE or the like and it writes directly to the ROM. I'm really not sure what you mean by "without the need of attaching a patch". I've never encountered a graphics editor that created patches instead of directly editing the ROM. As for the color depths, I don't know enough about that to comment on it, but as Tile Molester's "codecs" are user editable, if they are wrong, you could easily correct them by editing the config file.

Again, maybe I'm misunderstanding something. If so, please correct me, but again, I don't see the point in what you're trying to do.
InVerse is offline   Reply With Quote
Old 02-25-2009, 02:06 AM   #4
joshex
Junior Member
 
Join Date: Feb 2009
Posts: 10
Default

Quote:
Originally Posted by InVerse View Post
Maybe I'm missing something here, but I don't get it.

It sounds like you're intending to extract the sprites from RAM but reinsert them to ROM. I could be wrong, but that would pretty much require specific information for each individual game you wish to be editable, which would defeat the purpose of the logging format you describe.

Also, you do realize that the colors of a particular graphic aren't actually stored within each graphic, right? In order to change the colors of a graphic, you either have to stick to the colors already contained in the particular palette assigned to said graphic or else modify the palette itself, which will also modify the colors of all other graphics assigned to that palette.

I really don't see the benefit of the method you describe over simply using Tile Molester. Tile Molester is written in Java and runs fine in Linux without the need for WINE or the like and it writes directly to the ROM. I'm really not sure what you mean by "without the need of attaching a patch". I've never encountered a graphics editor that created patches instead of directly editing the ROM. As for the color depths, I don't know enough about that to comment on it, but as Tile Molester's "codecs" are user editable, if they are wrong, you could easily correct them by editing the config file.

Again, maybe I'm misunderstanding something. If so, please correct me, but again, I don't see the point in what you're trying to do.
ow, sorry I've been off for a while, I got the flu and have been bedridden.. my back is hurting quite alot so I'll make this breif;

tried tilemolester but for some reason it won't run. (I get a picture that pops up saying tile molester with some characters on it, but then after it goes away nothing happens.

I would be looking at making this editor completely opensource.

I got the Idea a patch was needed in most tile editors because after editing a GB into a GBA in yychr I got an error in my emulator's shell saying "Unsupported BIOS function e0 called from 08000088. A BIOS file is needed in order to get correct behaviour."

anyways,

Quote:
It sounds like you're intending to extract the sprites from RAM but reinsert them to ROM. I could be wrong, but that would pretty much require specific information for each individual game you wish to be editable, which would defeat the purpose of the logging format you describe.
yes specific information that is obtained in emulaor mode as the rom is running by ..oh say a trojan. (a program that monitors exactly what and how the RAM and/or ROM is being read then outputs that info to the log file.

Quote:
Also, you do realize that the colors of a particular graphic aren't actually stored within each graphic, right? In order to change the colors of a graphic, you either have to stick to the colors already contained in the particular palette assigned to said graphic or else modify the palette itself, which will also modify the colors of all other graphics assigned to that palette.
the palette will be edited by a script automatically upon submission of your .png back into rom (less hassle by the user)

EX: you start off with a grayscale file from a GB game that has been exported as .png, you take it into an external editor and use for example a total of 23 different colors as you please to color the sprites, you then submitt it to the editor with the rom opened whereby a script will log the colors you used as the new palette (along with in that case 9 blank opaque colors to fill up to 32) then it inserts the edited sprites and the new palette over the old.

the main goal of this is to supply the absolute BEST editing utility by allowing the actual graphic editing to be done in a professional picture editor like the GIMP. thus allowing people to choose colors and place colors on the sprites pixel by pixel if need be.. as well as make partially transparent colors EX: erasing a certain pixel on the sprites at 50% opacity, this would also allow changing sprites (so long as they are in the same bounds or less) EX; you could replace a character with a pixelated skeleton fitting thier form as the "impact/hit/damaged" sprite set. making it look like they got shocked by electricity

but yes I must get offline, still not feeling well
joshex is offline   Reply With Quote
Old 02-25-2009, 02:18 AM   #5
joshex
Junior Member
 
Join Date: Feb 2009
Posts: 10
Default

hmm, the edit post option is refusing to save the edits...

edit to previous post: real quick, I'd like to state just how I know what each GB systems colors are, I litterally took screenshots of games in an emulator (multiple for each game every time I saw a new or what I thought was a new color) and checked the colors on said screens in the gimp, GB games no matter what colors they are there are always the same 4 colors. GBC games use 8 colors (after studying LOZ link's awakening's color rom) and GBA uses 32 different colors (after studying Fire Emblem GBA)

some games don't use the full color potential of the format though.
joshex is offline   Reply With Quote
Old 02-25-2009, 05:03 AM   #6
InVerse
Senior Member
 
Join Date: Jul 2002
Posts: 1,489
Default

Quote:
Originally Posted by joshex View Post
I got the Idea a patch was needed in most tile editors because after editing a GB into a GBA in yychr I got an error in my emulator's shell saying "Unsupported BIOS function e0 called from 08000088. A BIOS file is needed in order to get correct behaviour."
How can you possibly "edit" a GB ROM into a GBA ROM using a tile editor? The Gameboy (Color) uses a custom z80 processor, whereas the Gameboy Advance uses an ARM7 processor. In order to convert a Gameboy game into a Gameboy Advance game, you'd basically have to rewrite the entire thing...
InVerse is offline   Reply With Quote
Old 02-26-2009, 12:56 AM   #7
joshex
Junior Member
 
Join Date: Feb 2009
Posts: 10
Default

Quote:
Originally Posted by InVerse View Post
How can you possibly "edit" a GB ROM into a GBA ROM using a tile editor? The Gameboy (Color) uses a custom z80 processor, whereas the Gameboy Advance uses an ARM7 processor. In order to convert a Gameboy game into a Gameboy Advance game, you'd basically have to rewrite the entire thing...
ah yes, well that would explain why it wasn't working and why it was requesting special bios..

but yeah then that would be a definite point of this Idea for a graphic editor, the first one to be able to convert lower quality .GB's and .GBC's into .GBA's. (EX;as previously stated a GB game's sprites could be colored with 32 colors, this editor would then have to be programmed to automatically convert the file to .gba format using the full 32 color depths before saving..)

so it's more over a sprite exporter/rewriter + GBX game format conversion program.

so any Ideas on what programs I could use to write this thing, and or what scripts are needed to access and or write to GB, GBC, GBA formats?
joshex is offline   Reply With Quote
Old 02-26-2009, 02:45 AM   #8
InVerse
Senior Member
 
Join Date: Jul 2002
Posts: 1,489
Default

As I said, you can't simply convert a GB/GBC game into a GBA game. You would have to disassemble the game and rewrite it for an ARM7 processor. This wouldn't be an automated process, you'd have to do it manually, and you'd have to do each game individually. In other words, it would probably take you a few hundred years to accomplish what you're trying to do.
InVerse is offline   Reply With Quote
Old 02-26-2009, 04:07 AM   #9
InVerse
Senior Member
 
Join Date: Jul 2002
Posts: 1,489
Default

If you can find a quick and effective way to automatically convert GB games to GBA games, I'm willing to guarantee you'll be a multi-millionaire within two weeks time. Have you *ever* seen a GB game converted to a GBA game? No, and I guarantee you that it's not because nobody else has ever thought of the idea. And it's not because the people who have thought of the idea weren't good programmers. The fact of the matter is that what you're proposing is completely unfeasible. If it were even remotely simple to accomplish such a conversion with even a *single* game, you'd have seen it done. Translating assembly code from one processor to another isn't like translating Japanese text into English. It would be more akin to translating the thoughts of an autistic Canadian child into language that a Burmese python could understand.
InVerse is offline   Reply With Quote
Old 02-26-2009, 03:16 PM   #10
The 9th Sage
Senior Member
 
The 9th Sage's Avatar
 
Join Date: Mar 2004
Location: NY State in the US
Posts: 17,439
Default

Quote:
Originally Posted by InVerse View Post
It would be more akin to translating the thoughts of an autistic Canadian child into language that a Burmese python could understand.
Not to break into the conversation here, but this is one of the best comparisons of anything to anything I have ever seen.
__________________
Just can't wait to bomb some Dodongos.
---
http://www.xanga.com/zeldadd

Twitter
The 9th Sage is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:21 AM.

Contact Us - Zophar's Domain - Archive - Top

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.