Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2013-04-25 18:45:12

ShaneM
Member
From: United States (USA)
Registered: 2013-03-11
Post 6/287
Website

Basic Z80 Question to Assist my PKMN GREEN Hack

I am working on my upcoming Green hack, which may get a reproduction cartridge release. This is what has been done so far:

Changed all 151 pokedex entries to match the original Green version.
Changed SGB data
Changed Title screen stuff.
Changed some in-game text.
Changed the over-world gfx to Green's, including the flower tile change routine and slot machine.
Changed Unknown Dungeon
Other changes

I needed help on how to re-point game text. Specifically I would like to move the text found at line 125572 of the disassembly (0xa46f9) to 0xb6eed. This is the text where the Viridian old man is drunk. It translates to something like this:

Lady: Why, Grandpa! I can do nothing about your drunkenness! Only wait for you to get sober!
Old Man: Young man!... wait a minute!... Listen to me!... Hello!... You cannot pass through here! I have spoken!

later on old man: Hmm... seems as though I was drunk! I have such a headache! Are you in a hurry?


If somebody can tell me how pointers work and what to repoint in hex please let me know. Only SERIOUS answers please, as I worked very hard on this Green Version. For other people working on Green hacks, you may NOT use my translation of this, thanks. :)


Also, how do I add pictures, I wanted to show off my hack ;) !

Last edited by ShaneM (2013-04-25 21:57:27)


I'm back. I'll try not to get as frustrated with stupid questions. People on my naughty list:

*Pokemon_Master
*Noizy
*lipun
*Spambots

Offline

#2 2013-04-25 19:16:35

YORAMRW
Member
From: The Netherlands
Registered: 2013-03-29
Post 126/1,199
Website

Re: Basic Z80 Question to Assist my PKMN GREEN Hack

You also should insert the Beta Lavender Town theme in your hack.


Hacks Gameboy 8-bit music in Pokémon Gen I & II, composes 8-bit music in FamiTracker

Offline

#3 2013-04-25 19:44:12

ShaneM
Member
From: United States (USA)
Registered: 2013-03-11
Post 7/287
Website

Re: Basic Z80 Question to Assist my PKMN GREEN Hack

shanem wrote:

If somebody can tell me how pointers work and what to repoint in hex please let me know. Only SERIOUS answers please, as I worked very hard on this Green Version. For other people working on Green hacks, you may NOT use my translation of this, thanks. :)


Also, how do I add pictures, I wanted to show off my hack ;) !

Please read.

My goal is not to make a mere translation, but rather a 'Nintendo quality' localized release. Why in the world would I add a mistake??? That glitch was fixed in Midori V1.1 anyway. I also fixed the Title Screen glitch where Nidorino sounds like Nidorina (thanks Sawakita for your Nidoreditor).

I will continue to fix glitches (excluding Glitch City and Missingno.).

Please, please, PLEASE listen! I am VERY serious about my hack and this thread only deals with the re-pointing text from the lines above. I will make a comments tread later on for any other related suggestions. Please answer if it pertains to the thread topic question, thanks.

p.s. I already corrected the text to Cinnabar trade and in Celadon city to what Green says. No re-point was needed. ;)


I'm back. I'll try not to get as frustrated with stupid questions. People on my naughty list:

*Pokemon_Master
*Noizy
*lipun
*Spambots

Offline

#4 2013-04-25 19:48:17

80C
Banned
Registered: 2013-03-16
Post 258/1,257

Re: Basic Z80 Question to Assist my PKMN GREEN Hack

Hey, don't fix the Ditto Glitch, the flying escape from the old man glitch & the dokokashira, that was amazing.


I left this forum.

Offline

#5 2013-04-25 21:47:58

ShaneM
Member
From: United States (USA)
Registered: 2013-03-11
Post 8/287
Website

Re: Basic Z80 Question to Assist my PKMN GREEN Hack

Look, I understand that you are excited about my hack, but please, respect my request. This tread ONLY deals with re-pointing and the lines and offsets that I provided as an example. I said that I will make a thread later where you can share your comments on my upcoming hack, okay :) ???

@Sawakita, I hope that you do not mind that I mention you on my thread. But I saw that you once provided a document about this topic, it is no longer accessible... as a Gen. I hacker can you share anything on this topic please? :)

Last edited by ShaneM (2013-04-25 21:49:01)


I'm back. I'll try not to get as frustrated with stupid questions. People on my naughty list:

*Pokemon_Master
*Noizy
*lipun
*Spambots

Offline

#6 2013-04-25 21:54:33

ShaneM
Member
From: United States (USA)
Registered: 2013-03-11
Post 9/287
Website

Re: Basic Z80 Question to Assist my PKMN GREEN Hack

Ok, according to the disassembly this is line 125572:

_UnnamedText_1920a: ; 0xa46f9
    db $0, "Ahh, I've had my", $4f
    db "coffee now and I", $55
    db "feel great!", $51
    db "Sure you can go", $4f
    db "through!", $51
    db "Are you in a", $4f
    db "hurry?", $57
; 0xa46f9 + 91 bytes

At line 33332:

UnnamedText_1920a: ; 0x1920a
    TX_FAR _UnnamedText_1920a
    db $50
; 0x1920a + 5 bytes

Is line 33332 the pointer???

Last edited by ShaneM (2013-04-25 21:56:08)


I'm back. I'll try not to get as frustrated with stupid questions. People on my naughty list:

*Pokemon_Master
*Noizy
*lipun
*Spambots

Offline

#7 2013-04-25 22:03:18

ShaneM
Member
From: United States (USA)
Registered: 2013-03-11
Post 10/287
Website

Re: Basic Z80 Question to Assist my PKMN GREEN Hack

The text previous to line 33332:

ViridianCityText7: ; 0x191df
    db $08 ; asm
    ld hl, UnnamedText_1920a
    call PrintText
    ld c, $2
    call DelayFrames
    call Func_35ec
    ld a, [$cc26]
    and a
    jr z, .asm_42f68 ; 0x191f2
    ld hl, UnnamedText_1920f
    call PrintText
    ld a, $1
    ld [$d5f4], a
    jr .asm_2413a ; 0x191ff
.asm_42f68 ; 0x19201
    ld hl, UnnamedText_19214
    call PrintText
.asm_2413a ; 0x19207
    jp TextScriptEnd

I'm back. I'll try not to get as frustrated with stupid questions. People on my naughty list:

*Pokemon_Master
*Noizy
*lipun
*Spambots

Offline

#8 2013-04-25 23:16:35

comet
Member
Registered: 2012-04-09
Post 218/679

Re: Basic Z80 Question to Assist my PKMN GREEN Hack

TX_FAR is a macro that takes the label _UnnamedText_1920a and expands it into a bank and address.

Doing this manually would look like:

db $16
dw _UnnamedText_1920a
db BANK(_UnnamedText_1920a)

Specifically, the label on its own defaults to just the address in rgbds.

The label is the pointer. If you wanted to point to _UnnamedText_1920f instead, you would replace _UnnamedText_1920a with that.

Offline

#9 2013-04-25 23:19:47

comet
Member
Registered: 2012-04-09
Post 219/679

Re: Basic Z80 Question to Assist my PKMN GREEN Hack

Also, pokered is a disassembly of the English version of Pokemon Red. It's at best a guideline for working with Japanese versions.

Offline

#10 2013-04-26 01:50:53

ShaneM
Member
From: United States (USA)
Registered: 2013-03-11
Post 11/287
Website

Re: Basic Z80 Question to Assist my PKMN GREEN Hack

OK, this is what I figured out.

The label at line 33332 goes to offset 0x1920a. It makes the note

; 0x1920a + 5 bytes

So the bytes at 1920a are:

$17 $f9 $46 $29 $50

$50 represents where the data for that label ends. $29 represents the bank?? And $f9 and $46 are Little Endian for the text itself located at 0xa46f9. So what do the $17 and $29 (if I'm wrong) represent, and how would I point it to 0xb6eed?

Note that I am doing all this by hex. The whole purpose of this is to give me room to add more text. I am fully aware that there are no opcodes for labels. Any info? Could somebody help me with this one, so that I may figure the others out. Thanks :) .


I'm back. I'll try not to get as frustrated with stupid questions. People on my naughty list:

*Pokemon_Master
*Noizy
*lipun
*Spambots

Offline

#11 2013-04-26 02:12:26

comet
Member
Registered: 2012-04-09
Post 220/679

Re: Basic Z80 Question to Assist my PKMN GREEN Hack

0x29 is the bank. 0x17 is a special text character that jumps to the text at 29:46f9.

rom banks are 0x4000-byte chunks, starting from bank 0. so you can get the bank for 0xb6eed by dividing it by 0x4000. the address is just 0xb6eed % 0x4000 ( + 0x4000 for nonzero banks. this is because pointers are really addresses mapped to ram. bank 0 sits in the first 0x4000 bytes of ram, and a switchable bank comes after).

Last edited by comet (2013-04-26 02:14:15)

Offline

#12 2013-04-26 02:24:06

ShaneM
Member
From: United States (USA)
Registered: 2013-03-11
Post 12/287
Website

Re: Basic Z80 Question to Assist my PKMN GREEN Hack

@comet

So basically at  0x1920A, I would change the next five bytes to:

$17 $ed $6e $2d $50

According to your instructions, of course, right?

OK, bank 2d is an unused bank, so what are my limits, could I do 4 lines instead of 2 if I wanted? And yes, I have a .tbl file.


I'm back. I'll try not to get as frustrated with stupid questions. People on my naughty list:

*Pokemon_Master
*Noizy
*lipun
*Spambots

Offline

#13 2013-04-26 02:29:23

comet
Member
Registered: 2012-04-09
Post 221/679

Re: Basic Z80 Question to Assist my PKMN GREEN Hack

lines?

Offline

#14 2013-04-26 02:40:05

ShaneM
Member
From: United States (USA)
Registered: 2013-03-11
Post 13/287
Website

Re: Basic Z80 Question to Assist my PKMN GREEN Hack

@comet

I don't know how to word it.

The old text took up 59 bytes, which would be about 2-two line dialogue boxes (in-game). Since I now have more space, can I expand it to 4-two line dialogue boxes at bank $2D??? (as long as I start the text with $00 and end the text with $50, right?)


I'm back. I'll try not to get as frustrated with stupid questions. People on my naughty list:

*Pokemon_Master
*Noizy
*lipun
*Spambots

Offline

#15 2013-04-26 02:44:33

comet
Member
Registered: 2012-04-09
Post 222/679

Re: Basic Z80 Question to Assist my PKMN GREEN Hack

if there's space for it you can put as much as you want there. using your example:

shanem wrote:
_UnnamedText_1920a: ; 0xa46f9
    db $0, "Ahh, I've had my", $4f
    db "coffee now and I", $55
    db "feel great!", $51
    db "Sure you can go", $4f
    db "through!", $51
    db "Are you in a", $4f
    db "hurry?", $57
; 0xa46f9 + 91 bytes

character $4f starts printing at the bottom line. $55 scrolls the text box down one line and starts printing at the bottom line. $51 clears the box and starts printing on the top line. $57 closes the text box.

so there are no limitations on how long text can go. of course you don't want to sit through a ton of text when playing the game.

Last edited by comet (2013-04-26 02:45:07)

Offline

#16 2013-04-26 03:01:53

ShaneM
Member
From: United States (USA)
Registered: 2013-03-11
Post 14/287
Website

Re: Basic Z80 Question to Assist my PKMN GREEN Hack

@comet


You are awesome! Thanks for the help.... I will post tomorrow with the results. I may have one question concerning OAM, but later.

Also, how do I upload pics of my Green version hack on here?

Here are three pics. notice that I translated pocket monsters into pokemon in the sgb border. changed the text date, etc. I also did the flower tile routine and unknown dungeon. Will use pokemon extender for PKMN Sprites. Oh, and did all 151 pokemon pokedex. :)

Will post some pics. of overworld and pokedex later. I also need to hack the OAM to match Green versions (the pkmn trainer's sprite) X and Y locs on title screen.


bgb00061_zps64ba91d7.png

bgb00063_zpsee0e5264.png

bgb00062_zps3090b5ef.png

Last edited by ShaneM (2013-04-26 03:33:13)


I'm back. I'll try not to get as frustrated with stupid questions. People on my naughty list:

*Pokemon_Master
*Noizy
*lipun
*Spambots

Offline

#17 2013-04-26 03:05:25

Danny-E 33
Administrator
Registered: 2012-06-09
Post 446/1,119

Re: Basic Z80 Question to Assist my PKMN GREEN Hack

Go to photobucket.com or imageshack.us or any other image hosting site and upload your screenshots.
To post them on the forum type this:

[img]url of the image goes here[/img]

Also, check your email. :)

Last edited by Danny-E 33 (2013-04-26 03:06:33)

Offline

#18 2013-04-26 16:15:04

80C
Banned
Registered: 2013-03-16
Post 259/1,257

Re: Basic Z80 Question to Assist my PKMN GREEN Hack

It seems that some tiles of Green's (the trainer) sprite got misplaced, but I think it should be in some way fixable.
Really cool, if this is gonna be a REAL Pokemon Green English and also an official one with its cartridge, then...
AWESOME!


I left this forum.

Offline

#19 2013-04-26 16:59:29

Munchulax
Member
From: Somewhere in Johto
Registered: 2011-08-10
Post 337/410

Re: Basic Z80 Question to Assist my PKMN GREEN Hack

shanem wrote:

bgb00063_zpsee0e5264.png

Question: How did you get "Green" to fit in four 8x8 tiles just like "Gary" and "John"?


“To live is the rarest thing in the world. Most people exist, that is all.” ― Oscar Wilde

Offline

#20 2013-04-26 17:44:53

ShaneM
Member
From: United States (USA)
Registered: 2013-03-11
Post 15/287
Website

Re: Basic Z80 Question to Assist my PKMN GREEN Hack

@80C

Please read:

I also need to hack the OAM to match Green versions (the pkmn trainer's sprite) X and Y locs on title screen.

Concerning the Title Screen, that is no glitch. Let me explain. Do you notice that he is holding a Pokeball on the Title Screen in Red/Blue? Ever noticed that when the starter Pokemon go by that the Pokeball goes up, then down?

Well, my friend, that is called an OAM routine. I don't have my debugger VRAM viewer in front of me, but, the X axis to that sprite increments from $68 to $69 $6D $70 $71 $74 and then decrements back to $68 upon that starting Pokemon's entry. I need to figure out how OAM (known as sprite attribute table on older microprocessors such as NES/Genesis) works on the Z80 microprocessor. In Program RAM on the Z80 it is stored at FE00-FE9F, four blocks each. I will actually post a topic on that later today. :)

@Munchulax

Simple, I created custom tiles that are always loaded when letter tiles are. That do not conflict when other tiles get loaded in what appears to be NOP's (the mnemonic for No operation, AKA opcode $00) I did that because at that time I did not know how to repoint text.

Stay tuned for the Viridian City drunk man text pics, just like Green. I was able to repoint the text.

Here is a useful tool for Z80 hackers, it contains all the mnemonics and opcodes in hex: http://pastraiser.com/cpu/gameboy/gameboy_opcodes.html

Last edited by ShaneM (2013-04-26 17:47:38)


I'm back. I'll try not to get as frustrated with stupid questions. People on my naughty list:

*Pokemon_Master
*Noizy
*lipun
*Spambots

Offline

#21 2013-04-26 18:55:21

95girl
Member
Registered: 2012-03-25
Post 46/83

Re: Basic Z80 Question to Assist my PKMN GREEN Hack

Amazing!can i eventually mail you about it,shanem?i hope you'll release it soon or later ;)
Also,which font is that one of the sgb border,which says 'pokémon!'?

Last edited by 95girl (2013-04-26 18:57:20)

Offline

#22 2013-04-26 20:21:10

ShaneM
Member
From: United States (USA)
Registered: 2013-03-11
Post 16/287
Website

Re: Basic Z80 Question to Assist my PKMN GREEN Hack

In the dialogue, in American Red/Blue, do they use ... or ..... in text dialogue, I can't find an occurrence of that.

@95girl will get back to you in a while.

Last edited by ShaneM (2013-04-26 20:26:01)


I'm back. I'll try not to get as frustrated with stupid questions. People on my naughty list:

*Pokemon_Master
*Noizy
*lipun
*Spambots

Offline

#23 2013-04-26 20:51:54

Tauwasser
Member
Registered: 2010-10-16
Post 383/452

Re: Basic Z80 Question to Assist my PKMN GREEN Hack

Don't even start with DTE, seriously. There are enough resources available to you right here right now that you don't have to use this method of last resort!

cYa,

Tauwasser

Offline

#24 2013-04-26 20:59:08

ShaneM
Member
From: United States (USA)
Registered: 2013-03-11
Post 17/287
Website

Re: Basic Z80 Question to Assist my PKMN GREEN Hack

Listen! The original Green version uses ..... there 5 times, I am just translating it as it is in Japanese!!!


I'm back. I'll try not to get as frustrated with stupid questions. People on my naughty list:

*Pokemon_Master
*Noizy
*lipun
*Spambots

Offline

#25 2013-04-26 23:17:18

ShaneM
Member
From: United States (USA)
Registered: 2013-03-11
Post 18/287
Website

Re: Basic Z80 Question to Assist my PKMN GREEN Hack

Text is now 100% translated. It matches Green 100%. Changed text in around 10 places. Here are some pics.

First pic Badges screen

bgb00065_zpsfa368a53.png

Jap. version for comparison

bgb00075_zps42c4720b.png


All 151 Pokedex Entries, COMPLETE!

bgb00067_zpsb3120118.png

bgb00066_zps5fa05d10.png


Here is some translated text with the Japanese for reference

bgb00068_zps72ae2dfc.png

bgb00069_zps016b9af1.png

bgb00070_zps53886d5f.png

bgb00072_zps5d43ec6d.png

bgb00073_zps36e068c9.png

bgb00074_zpsb87c94a5.png

Enjoy some scenery. I even got the flower routine to work! Skillez!

bgb00064_zps1a98e7a1.png

Last edited by ShaneM (2013-04-26 23:27:44)


I'm back. I'll try not to get as frustrated with stupid questions. People on my naughty list:

*Pokemon_Master
*Noizy
*lipun
*Spambots

Offline

Board footer

Powered by FluxBB