You are not logged in.
Pages: 1
I guess this is very easy and simple for those who know ASM.
I have this:
DrawBadges: ; ea03 (3:6a03)
; Draw 4x2 gym leader faces, with the faces replaced by
; badges if they are owned. Used in the player status screen.
; In Japanese versions, names are displayed above faces.
; Instead of removing relevant code, the name graphics were erased.
; Tile ids for face/badge graphics.
ld de, $cd3f
ld hl, .FaceBadgeTiles
ld bc, 8
call CopyData
; Booleans for each badge.
ld hl, $cd49
ld bc, 8
xor a
call FillMemory
; Alter these based on owned badges.
ld de, $cd49
ld hl, $cd3f
ld a, [W_OBTAINEDBADGES]
ld b, a
ld c, 8
.CheckBadge
srl b
jr nc, .NextBadge
ld a, [hl]
add 4 ; Badge graphics are after each face
ld [hl], a
ld a, 1
ld [de], a
.NextBadge
inc hl
inc de
dec c
jr nz, .CheckBadge
; Draw two rows of badges.
ld hl, $cd3d
ld a, $d8 ; [1]
ld [hli], a
ld [hl], $60 ; First name
FuncCoord 2, 11
ld hl, Coord
ld de, $cd49
call .DrawBadgeRow
FuncCoord 2, 14
ld hl, Coord
ld de, $cd49 + 4
; call .DrawBadgeRow
; ret
; ea4c
.DrawBadgeRow ; ea4c (3:6a4c)
; Draw 4 badges.
ld c, 4
.DrawBadge
push de
push hl
; Badge no.
ld a, [$cd3d]
ld [hli], a
inc a
ld [$cd3d], a
; Names aren't printed if the badge is owned.
ld a, [de]
and a
ld a, [$cd3e]
jr nz, .SkipName
call .PlaceTiles
jr .PlaceBadge
.SkipName
inc a
inc a
inc hl
.PlaceBadge
ld [$cd3e], a
ld de, 20 - 1
add hl, de
ld a, [$cd3f]
call .PlaceTiles
add hl, de
call .PlaceTiles
; Shift badge array back one byte.
push bc
ld hl, $cd3f + 1
ld de, $cd3f
ld bc, 8
call CopyData
pop bc
pop hl
ld de, 4
add hl, de
pop de
inc de
dec c
jr nz, .DrawBadge
ret
.PlaceTiles
ld [hli], a
inc a
ld [hl], a
inc a
ret
.FaceBadgeTiles
db $20, $28, $30, $38, $40, $48, $50, $58
I'd like to know if this is the right code to edit the Badge graphic palletes (and what I need to change, exactly). As example, Brock's Badge has too much brightness and I want to make it darky (I don't know how to explain) like Misty's Badge.
Offline
If you're looking to change the palette used by the Boulderbadge, you need to edit the sgb packet that is used when the trainer card is loaded.
BlkPacket_TrainerCard: ; 72360 (1c:6360)
ATTR_BLK 10
ATTR_BLK_DATA %010, 0,0,0, 03,12, 04,13
ATTR_BLK_DATA %010, 1,1,0, 07,12, 08,13
ATTR_BLK_DATA %010, 3,3,0, 11,12, 12,13
ATTR_BLK_DATA %010, 2,2,0, 16,11, 17,12
ATTR_BLK_DATA %010, 1,1,0, 14,13, 15,14
ATTR_BLK_DATA %010, 3,3,0, 16,13, 17,14
ATTR_BLK_DATA %010, 2,2,0, 03,15, 04,16
ATTR_BLK_DATA %010, 3,3,0, 07,15, 08,16
ATTR_BLK_DATA %010, 2,2,0, 11,15, 12,16
ATTR_BLK_DATA %010, 1,1,0, 15,15, 16,16
PalPacket_TrainerCard: PAL_SET PAL_MEWMON, PAL_BADGE, PAL_REDMON, PAL_YELLOWMON
The first ATTR_BLK_DATA is for the Boulderbadge (as you can tell by the coords of the affected region (03,12, 04,13)) so if you wanted to change the Boulderbadge to use the same palette as the Cascadebadge then you just need to change the palette number used for that ATTR_BLK_DATA.
Currently, the Boulderbadge uses palette 0 (PAL_MEWMON) and the Cascadebadge uses palette 1 (PAL_BADGE) so just change the first ATTR_BLK_DATA from:
ATTR_BLK_DATA %010, 0,0,0, 03,12, 04,13
to:
ATTR_BLK_DATA %010, 1,1,0, 03,12, 04,13
Offline
If you're looking to change the palette used by the Boulderbadge, you need to edit the sgb packet that is used when the trainer card is loaded.
Ok, I was missing this since it isn't into "main.asm". Thanks!
Anyway, for some reason, the changes are not being applied on Yellow. In R/B that table is at $72360 while in Yellow, at $726f1. I tried to apply the change but it didn't work. What could it be?
Offline
You have to replace the fourth byte after 0x726f1 with 1 + (1 << 2) + (0 << 4) which outputs 1 + 4 = 5
https://github.com/iimarckus/pokered/bl … ets.asm#L9
Since I know you're doing this with a hex editor you may find checking out the raw bytes helpful to make sure you are changing the byte you have to change: https://github.com/iimarckus/pokered/co … f-51fd23f8
Offline
Also keep in mind that Yellow version (excluding the Japanese versions) is both a Super Gameboy game and a Gameboy Color game. The game also uses different palettes for each system. You could alter the palette on the Super Gameboy, but if the emulator you use uses the Gameboy Color palettes instead of the Super Gameboy palettes, you won't be able to notice the changes.
You can try to hide yourself in this world of pretend; when the paper's crumpled up, it can't be perfect again.
Offline
Crystal_ wrote:You have to replace the fourth byte after 0x726f1 with 1 + (1 << 2) + (0 << 4) which outputs 1 + 4 = 5
https://github.com/iimarckus/pokered/bl … ets.asm#L9Hmmm, yeah I figured out to put 05 there, but still, it's not working. I even changed the 3rd byte, 4th, 5th, etc to see any changes there but nothing x_x
EDIT:
Also keep in mind that Yellow version (excluding the Japanese versions) is both a Super Gameboy game and a Gameboy Color game. The game also uses different palettes for each system. You could alter the palette on the Super Gameboy, but if the emulator you use uses the Gameboy Color palettes instead of the Super Gameboy palettes, you won't be able to notice the changes.
You're totally right. Gonna check this.
EDIT #2: Thanks stag019. It's correct, the changes applies only to the SGB palette. Then, now the question is: Is it possible to change the GBC palettes?
Last edited by Drake|Seawood (2015-02-10 22:15:54)
Offline
Pages: 1