The PokéCommunity Forums Fan Games ROM Hacking Research & Development
Quick Research & Development Thread

Research & Development Got a well-founded knack with ROM hacking? Love reverse-engineering the Pokémon games? Or perhaps you love your assembly language. This is the spot for polling and gathering your ideas, and then implementing them! Share your hypothesis, get ideas from others, and collaborate to create!

Reply
 
Thread Tools
  #51    
Old September 2nd, 2010 (5:39 PM).
Shiny Quagsire's Avatar
Shiny Quagsire Shiny Quagsire is offline
I'm Still Alive, Elsewhere
     
    Join Date: May 2009
    Location: Hoenn Safari Zone
    Age: 20
    Gender: Male
    Nature: Jolly
    Posts: 700
    Quote:
    Originally Posted by JPAN View Post
    This means that each of the variables is linked to a specific OW number (person ID wasn't the best choice of words in this one, here it means the Sprite OW) And as OW sprite numbers are limited to a byte (0xfe, the table number, indicating that it is a berry tree), you only have 256 slots where you can have berries.
    So to turn the overworld into a berry tree, I'd use your OW hack, set the table # to 0xFE. But where does the variable come in? I'm not quite sure what you mean by the OW number. (Sorry if I'm frustrating you, it's just harder to understand when there's just text :p)

    Wait, do you mean set the sprite to the desired variable index?
    __________________



    Reply With Quote
      #52    
    Old September 4th, 2010 (11:57 AM).
    Diegoisawesome's Avatar
    Diegoisawesome Diegoisawesome is online now
    Oh god the bees
     
    Join Date: Dec 2007
    Location: :noitacoL
    Age: 21
    Gender: Male
    Nature: Naive
    Posts: 1,048
    JPAN, what about the flags? Is there a way to fix the flags above 0x900 or something?
    __________________


    My other resources:
    My Website
    diegoisawesome's MEGA-HUGE XSE Scripting Tutorial
    diegoisawesome's Miscellaneous Finds
    The Ruins of Alph Puzzles
    Diego's Miscellaneous Patches
    GBA Intro Manager
    The Secret Sauce: Triple-Layer Tiles
    Reply With Quote
      #53    
    Old September 5th, 2010 (1:45 AM). Edited September 6th, 2010 by HackMew.
    HackMew's Avatar
    HackMew HackMew is offline
    Mewtwo Strikes Back
     
    Join Date: Jun 2006
    Posts: 1,314
    Quote:
    Originally Posted by JPAN View Post
    You can use this routine to clear 0x1000 bytes. Just replace the last pointer for the one you will be using.
    Code:
    .align 2
    .thumb
    Fill_memory: push {r4-r7, lr}
        mov r4, #0x10
        lsl r4, r4, #0x8 /*value = 0x1000*/
        ldr r5, start_addr
        add r4, r5, r4
        mov r0, #0x0
        mov r1, #0x0
        mov r2, #0x0
        mov r3, #0x0
    fill_loop:  stmia r5!, {r0-r3}
        cmp r4, r5
        bgt fill_loop
        pop {r4-r7,pc}
    .hword 0x0000    
    start_addr:  .word 0x0203f000 /*change as needed*/
    I really don't understand why would you push r6 and r7 when they're not even used, and not pushing r0-r3 instead, which might be needed depending from where the routine is called. Either way, there are better and faster ways to do that:

    Code:
    .text
    .align 2
    .thumb
    .thumb_func
    .global EraseMemory
    
    main:
    	push {r0-r3, lr}
    	ldr r0, .START_ADDRESS
    	mov r1, #0x0
    	str r1, [r0]
    	add r1, r0, #0x0
    	ldr r2, .LENGTH
    	swi #0xC
    	pop {r0-r3, pc}
    	
    .align 2
    .START_ADDRESS:
    	.word 0x0203F000
    .LENGTH:
    	.word 0x01000400
    In the code above, 0x01000400 stands for 0x400 words, and the 1 is for memory filling, rather then copying (the default behavior). Note that due to the way the SWI 0xC works, the word count (total amount of bytes / 4) must be a multiple of 8.

    Quote:
    Originally Posted by diegoisawesome View Post
    JPAN, what about the flags? Is there a way to fix the flags above 0x900 or something?
    FYI, the address of the hypotetical flag 0x900 overlaps the one used by variable 0x4000. I guess I'll be able to tell you more when I implement the safe variables myself (sorry JPAN, but your code is just too messy).

    EDIT: I did some research, and I think I found some safe areas to store the new variables in. For FR/LG, the whole area between 0x0203C000 - 0x0203EFFF appears to be totally unused. I somewhat confirmed it by putting a breakpoint on read/write on the whole area. I wasn't able to get the debugger to break yet. Also, here's a list I made, which clearly shows my theory:

    Code:
    02030000
    02030001
    02030003
    02030014
    0203001C
    02030020
    02030023
    02030028
    0203002F
    02030032
    02030040
    02030050
    0203005F
    02030064
    02030073
    02030076
    0203007E
    0203009F
    020300CD
    020300DB
    020300DF
    020300F5
    020300F9
    02030101
    02030103
    02030104
    02030120
    02030201
    02030202
    0203022F
    0203025F
    02030400
    02030401
    02030405
    0203043F
    020304C0
    020304FF
    02030502
    0203050A
    02030614
    0203081D
    0203083E
    02030908
    02031022
    02031036
    020310B8
    02031208
    02031764
    02031C8C
    02031C90
    02031C94
    02031CCC
    02031DA4
    02031DA8
    02031DAC
    02031DB0
    02031DB4
    02031DBC
    02031DC4
    02031DCC
    02031DD4
    02031DD8
    02031DDA
    02031DDC
    02031DE0
    02031DE4
    02031DE8
    02031DEA
    02031DEC
    02031DFC
    020320AF
    020324C9
    0203281E
    0203303A
    0203306F
    020330BB
    020330F8
    020340FB
    02034B41
    02035046
    020350E3
    02036DFC
    02036E18
    02036E24
    02036E28
    02036E2C
    02036E30
    02036E34
    02036E38
    02037003
    02037044
    02037078
    02037098
    0203709A
    0203709C
    020370A0
    020370A4
    020370A8
    020370AC
    020370AE
    020370B0
    020370B2
    020370B4
    020370B6
    020370B8
    020370BA
    020370BC
    020370BE
    020370C0
    020370C2
    020370C4
    020370C6
    020370C8
    020370CA
    020370CC
    020370CE
    020370D0
    020370D2
    020370D4
    020370D6
    020370D8
    020370DA
    020370DC
    020370DE
    020370E0
    020370F0
    020370F4
    020370F5
    020370F6
    020370FF
    02037100
    02037101
    02037104
    02037108
    020371F8
    020371FA
    02037218
    02037238
    02037258
    02037278
    02037398
    020373F8
    02037408
    020375F8
    020375FA
    02037638
    020376B0
    020377F8
    02037850
    020379F8
    02037AB8
    02037AC8
    02037ACC
    02037ECC
    02037ED0
    02037ED4
    02037ED8
    02037EDC
    02037EE0
    02037EE1
    02037EE2
    02037EE3
    02037EE4
    02037EE8
    02037EEC
    02037EEE
    02037EFE
    02037F00
    02037F02
    02037F12
    02037F14
    02037F16
    02037F17
    02037F18
    02037F1A
    02037F1B
    02037F1C
    02037F24
    02037F28
    02037F30
    02037F34
    02038134
    02038208
    02038394
    02038684
    020386A4
    020386A8
    020386AC
    020386AE
    020386B0
    020386B4
    020386B8
    020386BC
    020386C0
    020386C4
    020386C8
    020386CC
    020386D0
    020386DC
    020386E0
    02038700
    02038702
    02038704
    02038980
    02038E80
    02038FC0
    02039600
    0203961C
    02039620
    02039624
    02039638
    0203963A
    02039654
    020397A4
    020397A8
    020397AC
    020397B0
    020397B4
    020397B5
    020397B6
    020397B7
    020397B8
    020397BA
    020397BC
    02039820
    02039821
    02039822
    02039823
    02039824
    02039825
    02039826
    02039828
    0203982C
    02039830
    02039870
    02039874
    02039878
    02039879
    02039882
    02039884
    02039888
    0203988C
    020398A4
    020398AC
    020398B4
    020398B8
    020398BA
    02039934
    02039942
    02039950
    02039954
    02039958
    0203995C
    02039960
    02039964
    02039968
    0203996C
    02039984
    02039988
    0203998C
    02039990
    02039994
    02039996
    02039998
    0203999C
    020399A4
    020399B4
    020399B8
    020399BC
    020399C0
    020399C4
    020399C8
    020399CC
    020399D0
    020399D4
    020399D8
    020399DC
    020399E0
    020399E4
    020399E8
    020399EC
    020399F0
    020399FC
    02039A00
    02039A04
    02039A0C
    02039A0E
    02039A10
    02039A14
    02039A18
    02039A1A
    02039A1B
    02039A1C
    02039A20
    02039A24
    02039A28
    02039A2C
    02039A30
    02039A34
    02039A38
    0203A066
    0203AA3C
    0203AAB0
    0203AAB4
    0203AAB8
    0203AABC
    0203AAC0
    0203AAC4
    0203AAC6
    0203AAD4
    0203AB00
    0203AB02
    0203AB04
    0203AB06
    0203AB08
    0203AB0A
    0203AB0C
    0203AB0E
    0203AB10
    0203AB12
    0203AB14
    0203AB16
    0203AB18
    0203AB1A
    0203AB1C
    0203AB1E
    0203AB20
    0203AB22
    0203AB24
    0203AB28
    0203AB2C
    0203AB30
    0203AB34
    0203AB38
    0203AB3C
    0203AB40
    0203AB44
    0203AB48
    0203AB4C
    0203AB50
    0203AB54
    0203AB58
    0203AB5C
    0203AB60
    0203ABE0
    0203ABE4
    0203ABE8
    0203ABEC
    0203ABED
    0203ABF0
    0203AC08
    0203ACE4
    0203ACE8
    0203ACEC
    0203ACF0
    0203ACF4
    0203ACFC
    0203AD02
    0203AD04
    0203AD0A
    0203AD10
    0203AD14
    0203AD18
    0203AD1C
    0203AD20
    0203AD24
    0203AD28
    0203AD2C
    0203AD30
    0203AD34
    0203AD40
    0203AD58
    0203ADB8
    0203ADBC
    0203ADC0
    0203ADC4
    0203ADC8
    0203ADCC
    0203ADD0
    0203ADD8
    0203ADDC
    0203ADE0
    0203ADE4
    0203ADF0
    0203ADF2
    0203ADF3
    0203ADF4
    0203ADF8
    0203ADF9
    0203ADFA
    0203ADFC
    0203ADFE
    0203AE04
    0203AE08
    0203AE0C
    0203AE8C
    0203AE90
    0203AE94
    0203AE98
    0203AF98
    0203AF9A
    0203B01A
    0203B01C
    0203B01E
    0203B020
    0203B024
    0203B044
    0203B048
    0203B049
    0203B04A
    0203B04B
    0203B04C
    0203B058
    0203B059
    0203B05C
    0203B064
    0203B068
    0203B06A
    0203B06C
    0203B084
    0203B088
    0203B08C
    0203B090
    0203B094
    0203B098
    0203B09C
    0203B0A0
    0203B0A9
    0203B0AE
    0203B0B4
    0203B0B8
    0203B0BC
    0203B0C0
    0203B0C1
    0203B0C4
    0203B0C8
    0203B0CC
    0203B0D0
    0203B0D4
    0203B0D8
    0203B0DC
    0203B0E0
    0203B0E4
    0203B0E8
    0203B0EC
    0203B0EE
    0203B0F0
    0203B0F4
    0203B0F8
    0203B0FC
    0203B100
    0203B104
    0203B108
    0203B10C
    0203B116
    0203B118
    0203B11C
    0203B120
    0203B124
    0203B128
    0203B12C
    0203B130
    0203B140
    0203B144
    0203B148
    0203B158
    0203B15C
    0203B160
    0203B164
    0203B168
    0203B16C
    0203B16D
    0203B16E
    0203B170
    0203B174
    0203F174
    0203F175
    0203F176
    0203F177
    0203F178
    0203F18A
    0203F190
    0203F1AC
    0203F34C
    0203F36C
    0203F370
    0203F37A
    0203F37C
    0203F380
    0203F384
    0203F388
    0203F38C
    0203F39C
    0203F3A0
    0203F3A4
    0203F3A8
    0203F3AE
    0203F3B0
    0203F3B8
    0203F3BC
    0203F3C0
    0203F3C4
    0203F3C8
    0203F3CC
    0203F3D0
    0203F3D4
    0203F3D8
    0203F3DC
    0203F3E0
    0203F3E4
    0203F3F8
    0203F400
    0203F42C
    0203F43C
    0203F440
    0203F444
    0203F44A
    0203F450
    0203F454
    0203F458
    0203F45C
    0203F464
    0203F754
    0203F758
    0203F76C
    0203F774
    0203FB74
    0203FB78
    0203FB7C
    0203FB80
    0203FB84
    0203FB88
    0203FC00
    As for Emerald, the whole 0x0203XXXX area is mostly used by the game already. So my suggestion is to try the 0x0202XXXX area, in particular anything between 0x02027000 - 0x02027FFF, or 0x0202A000 - 0x0202AFFF, or 0x0202D000 - 0x0202DFFF, or 0x0202F000 - 0x0202FFFF.

    Code:
    02020000
    02020001
    02020004
    020200AC
    020200C6
    020200FF
    02020100
    02020101
    02020102
    02020103
    02020180
    02020184
    02020188
    0202018C
    020201B0
    02020201
    02020202
    02020203
    0202022F
    02020242
    02020243
    02020244
    020202F0
    02020400
    02020401
    0202043F
    020204C0
    020204FF
    02020609
    02020630
    02020638
    0202064C
    0202065E
    02020706
    02020810
    02020815
    02020827
    02020857
    02020859
    0202085C
    020208A6
    02020908
    02020E00
    02021774
    020217F4
    02021834
    02021835
    02021838
    02021B38
    02021B3A
    02021B3C
    02021BBC
    02021BBE
    02021BC0
    02021CC0
    02021CC4
    02021DC4
    02021EC4
    02021FC4
    02022212
    020223AC
    020223BC
    020223BD
    020223C0
    020223C4
    020223C8
    020228C4
    020229C4
    020229C6
    020229C8
    020229CC
    020229E8
    020229F0
    02022A0C
    02022A74
    02022B00
    02022B08
    02022B0C
    02022B10
    02022B14
    02022B22
    02022B2C
    02022B44
    02022C20
    02022C2C
    02022C2D
    02022C30
    02022C38
    02022C3C
    02022C3E
    02022C40
    02022C58
    02022C60
    02022C64
    02022C68
    02022C6C
    02022C70
    02022C74
    02022C78
    02022C7C
    02022C80
    02022C84
    02022C88
    02022C8C
    02022C90
    02022C94
    02022C98
    02022C9C
    02022CB0
    02022CB8
    02022CE4
    02022CF4
    02022CF8
    02022CFC
    02022D00
    02022D04
    02022D06
    02022D08
    02022D09
    02022D0A
    02022D0C
    02022D10
    02022E10
    02022E14
    02022E16
    02022E18
    02022E1A
    02022E1C
    02022E1E
    02022E20
    02022E22
    02022E24
    02022E26
    02022E28
    02022E2A
    02022E2C
    02022F58
    02022F5A
    02022F5C
    02022F68
    02022F6A
    02022F78
    02022F88
    02022FEC
    02022FF0
    02022FF4
    02022FF8
    02023058
    0202305C
    02023060
    02023064
    02023066
    02023067
    02023068
    020235DB
    020237AA
    02023864
    02023868
    02024064
    02024068
    0202406C
    0202406E
    02024076
    0202407A
    0202407E
    02024082
    02024083
    02024084
    02024090
    0202409C
    020240A8
    020240AC
    020240B4
    020240CC
    020240D0
    020240D4
    020241E4
    020241E8
    020241E9
    020241EA
    020241EC
    020241EE
    020241F0
    020241F1
    020241F3
    020241F4
    020241F8
    02024208
    0202420A
    0202420B
    0202420C
    0202420D
    0202420E
    0202420F
    02024210
    02024211
    02024212
    02024214
    0202421C
    02024220
    02024230
    02024240
    02024248
    02024250
    02024258
    02024260
    02024268
    02024270
    02024274
    0202427C
    02024280
    02024284
    02024288
    0202428C
    0202428E
    02024294
    020242AC
    020242BC
    0202432C
    0202432E
    02024330
    02024332
    02024333
    02024335
    02024337
    0202433A
    0202433C
    0202437C
    020243CC
    020243D0
    020243FC
    020243FE
    02024400
    02024402
    02024404
    0202440C
    02024474
    02024478
    0202447C
    02024482
    02024483
    02024484
    02024487
    02024488
    0202448A
    0202448B
    0202448C
    0202448D
    0202448E
    0202448F
    02024492
    0202449C
    020244A0
    020244A4
    020244A8
    020244AC
    020244B0
    020244B4
    020244B8
    020244B9
    020244BC
    020244CC
    020244D0
    020244D4
    020244D8
    020244DC
    020244E0
    020244E2
    020244E4
    020244E8
    020244E9
    020244EA
    020244EC
    02024550
    020245B4
    02024618
    0202467C
    020246E0
    02024744
    020247A8
    0202480C
    02024870
    020248D4
    02024938
    0202499C
    020249B4
    020249BC
    020249C0
    020249C4
    02024A28
    02024A30
    02024A38
    02024A4C
    02024A54
    02024C08
    02025301
    02025A00
    02025E62
    02026B6C
    02026C04
    0202800D
    02029808
    0202BF21
    0202CAAC
    0202E82A
    As for R/S, the whole are between 0x0203B000 - 0x0x0203DFFF should be safe.

    Code:
    02030000
    02030001
    02030004
    02030009
    02030012
    02030014
    0203001C
    02030020
    02030022
    02030023
    02030028
    0203002F
    02030032
    02030034
    02030040
    02030043
    02030044
    02030050
    0203005F
    02030064
    02030066
    02030073
    02030077
    0203007E
    020300A0
    020300A4
    020300AC
    020300CC
    020300DD
    020300DF
    020300F9
    02030101
    02030104
    02030120
    02030200
    02030202
    02030203
    02030206
    02030208
    0203022F
    0203025F
    0203026F
    020302B3
    02030303
    02030400
    02030401
    02030405
    0203043F
    020304C0
    020304FF
    02030502
    0203050A
    02030604
    02030647
    02030800
    0203081D
    0203083D
    02030908
    02030A27
    02030DD2
    02030DDD
    0203100E
    02031016
    02031022
    0203104A
    02031068
    0203106F
    02031096
    02032053
    020320CE
    0203281E
    02032EAA
    020330D2
    020330D5
    020330EE
    0203323F
    02033301
    020340FB
    02034B41
    02035046
    02035100
    02037044
    02037850
    02038208
    020383E4
    02038470
    02038473
    02038474
    02038478
    0203847C
    0203847D
    0203847E
    0203847F
    02038480
    020384E4
    020384E5
    020384E6
    020384E7
    020384E8
    020384E9
    020384EA
    020384EC
    020384F0
    020384F4
    020384F8
    02038538
    0203853C
    02038540
    02038544
    02038550
    02038554
    02038558
    02038559
    0203855A
    0203855B
    0203855C
    0203855E
    02038560
    02038561
    02038562
    02038563
    02038564
    02038568
    0203856C
    02038570
    02038572
    0203857D
    0203858E
    02038596
    02038670
    02038678
    02038680
    02038688
    02038690
    02038694
    02038695
    02038696
    0203869A
    0203869B
    0203869C
    0203869E
    020386A0
    020386A4
    020386A8
    020386AA
    02038724
    02038730
    02038731
    02038734
    02038738
    020387B0
    020387B1
    020387B2
    020387B3
    020387B4
    020387D8
    020387D9
    020387DC
    020387E0
    020387E2
    020387E4
    020387E8
    020387EC
    020387F0
    02038800
    02038804
    02038808
    0203880A
    0203880C
    02038814
    020388AC
    020388B0
    020388B4
    020388B8
    020388BC
    020388C0
    020388C4
    020388CC
    020388D0
    020388D4
    020388D5
    020388D6
    020388E6
    020388F2
    020388F3
    020388F4
    020388F5
    020388F6
    020388F7
    02038900
    02038984
    02039184
    020391A4
    020391A6
    020391A8
    020391A9
    020391AA
    020391AC
    020391B4
    02039234
    02039238
    0203923C
    02039244
    02039248
    0203924C
    02039250
    02039251
    02039254
    02039258
    02039259
    0203925A
    0203925B
    0203925C
    02039260
    02039262
    02039264
    02039266
    02039268
    0203926A
    0203926C
    02039270
    02039274
    02039278
    02039279
    0203927A
    0203927B
    0203927C
    0203927D
    02039284
    02039288
    020392FC
    02039302
    02039304
    02039308
    0203930C
    02039310
    02039312
    02039314
    02039318
    0203931A
    0203931C
    02039320
    02039322
    02039324
    02039325
    02039328
    0203932A
    0203932C
    0203932E
    02039338
    0203933C
    0203933E
    02039350
    02039358
    0203935A
    0203935C
    02039360
    02039460
    02039629
    02039760
    0203A360
    0203A380
    0203A3D0
    0203A3D1
    0203A3D2
    0203A3D3
    0203A3D4
    0203A602
    0203E006
    0203E0ED
    0203F07F
    Although I made those lists as accurate as possible, please note that they're only approximative; testing is always a must. Especially if you're using R/S/E, because I didn't test them.
    __________________
    Reply With Quote
      #54    
    Old September 6th, 2010 (2:08 AM).
    Wichu's Avatar
    Wichu Wichu is offline
    Project Amethyst
       
      Join Date: Sep 2007
      Location: North Herts, England
      Age: 25
      Gender: Male
      Nature: Naive
      Posts: 2,052
      Not really that advanced compared to what you guys have been up to, but I was asked whether I knew where Steven's double battle team in Emerald was located. A bit of digging later, and I found it. It's not quite in the same format as normal trainers.

      Metang: 0x5dd6d0
      Skarmory: 0x5dd6e4
      Aggron: 0x5dd6f8

      Format:
      Species (2 bytes)
      IVs (1 byte)
      Level (1 byte)
      Nature? (1 byte) - unconfirmed; check this (Metang should be Lonely, Skarmory Impish, and Aggron Adamant)?
      EVs? (6 bytes) - unconfirmed; check this?
      Padding (1 byte)
      Moves (8 bytes)

      Unlike ordinary trainers (as far as I can remember), Steven's data appears to include nature and EVs. I bet this could be used to add opposing trainers with stronger Pokémon somehow.

      Anyway, a question: this isn't really useful for ROM hacking, but it's related. Could somebody find the formula used to calculate the PIDs of eggs in Emerald if the mother is holding an Everstone? I know the formula without the Everstone already, but I'm stumped as to what happens when one is used.
      __________________
      Reply With Quote
        #55    
      Old October 8th, 2010 (8:59 PM).
      colcolstyles's Avatar
      colcolstyles colcolstyles is offline
      Yours truly
       
      Join Date: May 2008
      Location: The Bay Area
      Gender: Male
      Nature: Lonely
      Posts: 1,590
      If anyone's interested, here's a tiny little morsel of information that I found recently. At the address '0x3A72A0' in Fire Red, you will find two bytes: '0xCD' and '0xFF'. These two bytes are used whenever the player is given two or more of some item using the 'giveitem' construct. The '0xCD' corresponds to an uppercase 'S' while the '0xFF' is the terminator byte, signifying the end of the string. If you change the byte from '0xCD' to '0xE7', the 'S' will become a lowercase 's'. I figure this might come in handy for those de-capitalization patches because it's really annoying to see "Player received the Poké BallS!" every time the player receives more than one of an item.
      __________________

      Brother of Vrai
      Reply With Quote
        #56    
      Old October 11th, 2010 (9:01 AM).
      slawter666's Avatar
      slawter666 slawter666 is offline
         
        Join Date: Sep 2008
        Posts: 84
        Realistically, how much work would be needed to change the 64x64 pixel limit in the 3rd generation games to the 80x80 pixel limit used in the 4th generation games? Please don't tell me it's hard or a lot of work. I'm genuinely interested in what would have to be done to increase the limit as it would be extremely beneficial to lots of people, especially as it would allow much higher quality sprites to be used as well as being able to import the 4th and 5th generation pokémon without (too much) resizing.
        __________________
        Reply With Quote
          #57    
        Old October 11th, 2010 (3:51 PM).
        Diegoisawesome's Avatar
        Diegoisawesome Diegoisawesome is online now
        Oh god the bees
         
        Join Date: Dec 2007
        Location: :noitacoL
        Age: 21
        Gender: Male
        Nature: Naive
        Posts: 1,048
        It appears that the offsets Hackmew posted a while back that were safe (for Emerald) are wrong..
        __________________


        My other resources:
        My Website
        diegoisawesome's MEGA-HUGE XSE Scripting Tutorial
        diegoisawesome's Miscellaneous Finds
        The Ruins of Alph Puzzles
        Diego's Miscellaneous Patches
        GBA Intro Manager
        The Secret Sauce: Triple-Layer Tiles
        Reply With Quote
          #58    
        Old October 11th, 2010 (5:48 PM).
        Shiny Quagsire's Avatar
        Shiny Quagsire Shiny Quagsire is offline
        I'm Still Alive, Elsewhere
           
          Join Date: May 2009
          Location: Hoenn Safari Zone
          Age: 20
          Gender: Male
          Nature: Jolly
          Posts: 700
          Quote:
          Originally Posted by slawter666 View Post
          Realistically, how much work would be needed to change the 64x64 pixel limit in the 3rd generation games to the 80x80 pixel limit used in the 4th generation games? Please don't tell me it's hard or a lot of work. I'm genuinely interested in what would have to be done to increase the limit as it would be extremely beneficial to lots of people, especially as it would allow much higher quality sprites to be used as well as being able to import the 4th and 5th generation pokémon without (too much) resizing.
          You would need to modify the games ASM code, which would be a pain and would be way too hard. And, the sprites would go outside the picture box in the status screen. In other words, it's really hard, and it's just not worth it.
          __________________



          Reply With Quote
            #59    
          Old October 11th, 2010 (5:52 PM).
          Gamer2020's Avatar
          Gamer2020 Gamer2020 is offline
          Accept no Imitations!
             
            Join Date: Jun 2008
            Location: Distant Land
            Gender: Male
            Nature: Bold
            Posts: 939
            Quote:
            Originally Posted by diegoisawesome View Post
            It appears that the offsets Hackmew posted a while back that were safe (for Emerald) are wrong..
            How's about putting a reason as to why you believe that?
            __________________

            The new home for ROM Hacking!
            Reply With Quote
              #60    
            Old October 12th, 2010 (1:55 AM).
            HackMew's Avatar
            HackMew HackMew is offline
            Mewtwo Strikes Back
             
            Join Date: Jun 2006
            Posts: 1,314
            Quote:
            Originally Posted by diegoisawesome View Post
            It appears that the offsets Hackmew posted a while back that were safe (for Emerald) are wrong..
            That's right, but like I said, I did not test them. What about 0x0203D800?
            __________________
            Reply With Quote
              #61    
            Old October 12th, 2010 (7:59 AM).
            slawter666's Avatar
            slawter666 slawter666 is offline
               
              Join Date: Sep 2008
              Posts: 84
              Quote:
              Originally Posted by shiny quagsire View Post
              You would need to modify the games ASM code, which would be a pain and would be way too hard. And, the sprites would go outside the picture box in the status screen. In other words, it's really hard, and it's just not worth it.
              Ok, I thought it would involve ASM and it wouldn't be a case of just changing a few values. I never even thought about the box in the status screen though. It's just irritating having to resize sprites and them losing their quality because of it.

              Anyway, thanks for the swift reply.
              __________________
              Reply With Quote
                #62    
              Old October 12th, 2010 (12:28 PM).
              The 100 Mega Shock The 100 Mega Shock is offline
               
              Join Date: Aug 2010
              Gender: Male
              Posts: 1,235
              The GBA hardware will only draw sprites up to 64 x 64 pixels.

              Go any bigger and you'll have to work with tiles and tilemaps, which would be an absolute nightmare to both code in the first place and then implement for each Pokémon.
              Reply With Quote
                #63    
              Old October 12th, 2010 (1:39 PM).
              Diegoisawesome's Avatar
              Diegoisawesome Diegoisawesome is online now
              Oh god the bees
               
              Join Date: Dec 2007
              Location: :noitacoL
              Age: 21
              Gender: Male
              Nature: Naive
              Posts: 1,048
              Quote:
              Originally Posted by HackMew View Post
              That's right, but like I said, I did not test them. What about 0x0203D800?
              That address appears to function properly, but only time will tell... hopefully.
              __________________


              My other resources:
              My Website
              diegoisawesome's MEGA-HUGE XSE Scripting Tutorial
              diegoisawesome's Miscellaneous Finds
              The Ruins of Alph Puzzles
              Diego's Miscellaneous Patches
              GBA Intro Manager
              The Secret Sauce: Triple-Layer Tiles
              Reply With Quote
                #64    
              Old October 12th, 2010 (2:06 PM).
              HackMew's Avatar
              HackMew HackMew is offline
              Mewtwo Strikes Back
               
              Join Date: Jun 2006
              Posts: 1,314
              Quote:
              Originally Posted by The 100 Mega Shock View Post
              Go any bigger and you'll have to work with tiles and tilemaps, which would be an absolute nightmare to both code in the first place and then implement for each Pokémon.
              No doubt it would be painful, but... you would only need a single tilemap for all the Pokémon. However, even if you succeeded, there would still be problems in the Pokédex etc. because the sprites weren't supposed to be bigger than 64x64 pixels.
              __________________
              Reply With Quote
                #65    
              Old October 14th, 2010 (12:11 PM). Edited October 16th, 2010 by slawter666.
              slawter666's Avatar
              slawter666 slawter666 is offline
                 
                Join Date: Sep 2008
                Posts: 84
                Quote:
                Originally Posted by The 100 Mega Shock View Post
                The GBA hardware will only draw sprites up to 64 x 64 pixels.

                Go any bigger and you'll have to work with tiles and tilemaps, which would be an absolute nightmare to both code in the first place and then implement for each Pokémon.
                Quote:
                Originally Posted by HackMew View Post
                No doubt it would be painful, but... you would only need a single tilemap for all the Pokémon. However, even if you succeeded, there would still be problems in the Pokédex etc. because the sprites weren't supposed to be bigger than 64x64 pixels.
                Ah I see why it's hard then...Could the pokédex problem be fixed by a gfx hack to make the box where they're shown bigger or do you mean they wouldn't show up properly? I take it that it would it be the same for the trainer sprites?

                I'll probably just leave it then and just resize any sprites I need to, but anyway, thank you all for the help, it's appreciated.
                __________________
                Reply With Quote
                  #66    
                Old October 21st, 2010 (8:27 AM).
                knizz's Avatar
                knizz knizz is offline
                   
                  Join Date: Aug 2007
                  Gender: Female
                  Posts: 192
                  In Pokemon Firered 825E074 contains the ping-pong animation for the arrows in the bag. Open in VBA Memory Viewer and play around. ;)
                  __________________
                  Firered IDA 6.6 DB: https://www.dropbox.com/s/d856o3pyndyr5sr/firered.idb
                  VBA-M with lua scripting support
                  incomplete firered decompilation
                  Reply With Quote
                    #67    
                  Old October 27th, 2010 (4:27 AM).
                  knizz's Avatar
                  knizz knizz is offline
                     
                    Join Date: Aug 2007
                    Gender: Female
                    Posts: 192
                    Controlling other characters on a map: Just write their id to 0x02037078+5. As always this is for Firered.
                    __________________
                    Firered IDA 6.6 DB: https://www.dropbox.com/s/d856o3pyndyr5sr/firered.idb
                    VBA-M with lua scripting support
                    incomplete firered decompilation
                    Reply With Quote
                      #68    
                    Old October 27th, 2010 (9:49 AM). Edited October 27th, 2010 by sonic1.
                    sonic1's Avatar
                    sonic1 sonic1 is offline
                    ASM is my life now...
                       
                      Join Date: May 2008
                      Location: Portugal
                      Age: 23
                      Gender: Male
                      Nature: Timid
                      Posts: 79
                      If you want to always run without using button B, like in HG/SS, set 0x02037078 to 02. Warning: If you open 1 of the menu options, or have a battle or warp, the effect fades off and you have to set it again.
                      VERSION: FIRERED

                      Credits to you knizz, for the offset! Can you tell us what really that offset is?

                      Quote:
                      Originally Posted by knizz View Post
                      Controlling other characters on a map: Just write their id to 0x02037078+5. As always this is for Firered.
                      Neat trick, i had this bug once in emerald and it only happened in a certain house opening the pokedex and always wondered how to do it.

                      But controlling other persons in A-Map has some limitations in-game like the camera not moving, and the limits the person can go,etc.
                      __________________
                      This signature has been disabled.
                      over 350px high
                      Please review and fix the issues by reading the signature rules.

                      You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.

                      Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.
                      Reply With Quote
                        #69    
                      Old October 27th, 2010 (9:57 AM).
                      altariaking's Avatar
                      altariaking altariaking is offline
                      Needs NO VMs...
                         
                        Join Date: Dec 2009
                        Location: Scotland, Lesmahagow
                        Age: 44
                        Gender: Male
                        Nature: Naive
                        Posts: 1,098
                        Quote:
                        Originally Posted by sonic1 View Post
                        If you want to always run without using button B, like in HG/SS, set 0x02037078 to 02. Warning: If you open 1 of the menu options, or have a battle or warp, the effect fades off and you have to set it again.

                        Credits to you knizz, for the offset! Can you tell us what really that offset is?


                        Neat trick, i had this bug once in emerald and it only happened in a certain house opening the pokedex and always wondered how to do it.

                        But controlling other persons in A-Map has some limitations in-game like the camera not moving, and the limits the person can go,etc.
                        Interesting find 0_0
                        This is or FireRed? I'll try and find the offset for Ruby after I finish my English essay xD
                        __________________
                        http://www.pokecommunity.com/member.php?u=253113
                        Reply With Quote
                          #70    
                        Old October 27th, 2010 (10:06 AM).
                        sonic1's Avatar
                        sonic1 sonic1 is offline
                        ASM is my life now...
                           
                          Join Date: May 2008
                          Location: Portugal
                          Age: 23
                          Gender: Male
                          Nature: Timid
                          Posts: 79
                          Quote:
                          Originally Posted by altariaking View Post


                          Interesting find 0_0
                          This is or FireRed? I'll try and find the offset for Ruby after I finish my English essay xD
                          Sorry, i forgot to put the version. Yes, it is for firered, i work only with firered.

                          Also, do you know why that happens? Check what happens to that value when you put the bike.
                          Sidenote: Because it simulates the speed of a bike, its a bit faster than running.
                          __________________
                          This signature has been disabled.
                          over 350px high
                          Please review and fix the issues by reading the signature rules.

                          You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.

                          Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.
                          Reply With Quote
                            #71    
                          Old October 27th, 2010 (10:19 AM). Edited June 11th, 2011 by knizz.
                          knizz's Avatar
                          knizz knizz is offline
                             
                            Join Date: Aug 2007
                            Gender: Female
                            Posts: 192
                            02037078 is a structure that controls the movement of, and only of, the player. However it can be associated to any NPC on screen.

                            The first two bits (0x03) of 02037078+0 determine the speed. 1 is normal. 2 is bike speed. 3 gives you a bike and changes itself to 2.

                            No matter what you write to 02037078+1 it is set to 0 again. If the value was 2 before the reset you get a bike. If you change the bike-byte the NPC turns into the hero.

                            02037078+2 and 02037078+3 behave like this:
                            0 0 Nothing pressed
                            0 0 Nothing pressed
                            1 1 Pressed forward
                            2 1 Pressed forward
                            2 1 Pressed forward
                            2 1 Pressed forward
                            0 0 Nothing pressed
                            2 1 Pressed forward
                            2 1 Pressed forward
                            0 0 Nothing pressed
                            0 0 Nothing pressed
                            1 1 Pressed forward
                            2 1 Pressed forward
                            2 1 Pressed forward

                            I don't know about 02037078+4.
                            02037078+5 sets the npc-id that is controlled by the keypad. (I wonder which numbers the npcs from connected maps have)
                            02037078+6 locks all movement when set to 1

                            More info about the NPCs is stored at 02036E38 in 16 0x24-byte long structures (Does that mean that there can't be more than 16 npcs in the overworld at the same time?!)
                            0x00 bits 7 and 6 are set when this npc is talking
                            0x01-0x0A unknown
                            0x0B height
                            0x0C-0x0F unknown
                            0x10 from (coords)
                            0x14 to (coords)
                            0x18 unknown
                            0x19 direction (in which the character actually looks)
                            0x1A unknown
                            0x1C direction (set when talked to but not always copied to 0x19)
                            0x1E unknown
                            0x20 direction (set after talk)
                            0x21-0x23 unknown

                            UPDATE: http://www.pokecommunity.com/showpost.php?p=6353380&postcount=2

                            coordinates are saved as two halfwords (x and y)

                            The code for moving uses a table to convert the direction to relative coordinates.
                            Table: 083A64C8
                            Function that uses the table above: 08063A20
                            Function that uses the function above to move npcs: 0805C4F4

                            Note that the table contains 9 and not 5 directions. Yes. Game Freak planned to have diagonally moving npcs.
                            __________________
                            Firered IDA 6.6 DB: https://www.dropbox.com/s/d856o3pyndyr5sr/firered.idb
                            VBA-M with lua scripting support
                            incomplete firered decompilation
                            Reply With Quote
                              #72    
                            Old November 1st, 2010 (5:23 PM).
                            colcolstyles's Avatar
                            colcolstyles colcolstyles is offline
                            Yours truly
                             
                            Join Date: May 2008
                            Location: The Bay Area
                            Gender: Male
                            Nature: Lonely
                            Posts: 1,590
                            In a Fire Red ROM, there is a table of data located at the address '0x452c4c'. Each entry in this table contains two pieces of information. One is a pointer and the other is a 32-bit number (I assume this is to keep the alignment consistent). The pointer points to another table and the number specifies the size of that table. In one of these secondary tables, there are a number of entries (the exact number is specified by the number mentioned earlier), each of which are also composed of a pointer and a 32-bit number. These pointers point instead to a list of pokémon and the number dictates the length of that list.

                            After a bit of research, I determined that the first table of pointers controls the classification of pokémon habitats (e.g., Grassland, Mountain, Rough-Terrain, etc.) as displayed in the PokéDex. The secondary tables specify which pokémon are in each Habitat and which pokémon appear on each "page" of the PokéDex (see the screenshots if you don't know what I mean). Let's look at an example. The first pointer at '0x452c4c' points to '0x4527d4' and is followed by the number '0x1b'. Thus, if you have a complete PokéDex, then there will be 27 ('0x1b' in decimal) pages of pokémon in the Grassland Habitat (the pointers are arranged in the order that they appear in-game, so Grassland comes first). The first pointer at '0x4527d4' points to '0x4524d0' and is followed by the number '0x4'. This means that the first four pokémon at that address are grouped onto one "PokéDex page". In this case, the numbers at that address (after reversing them) are '0x0013', '0x0014', '0x00a1', and '0x00a2', which correspond to Rattata, Raticate, Sentret, and Furret. So, if on the main PokéDex screen you select "Grassland Pokémon", you'll get a screen like this:
                            Spoiler:


                            But if we edit that data, we could get something like this:
                            Spoiler:


                            So let's say you replaced Machop (a Mountain Habitat pokémon) with a fakemon that you want to go in the Urban Habitat. You should first subtract one from the number of Mountain pokémon (Mountain is the sixth Habitat so the number would be found at '0x452c78') and add one to the number of Urban pokémon (Urban is the eigth Habitat so the number would be found at '0x452c88'). Then you would have to remove the entry for Machop's evolutionary family's page in the Mountain Habitat table and add it somewhere in the table for Urban Habitat pokémon.
                            __________________

                            Brother of Vrai
                            Reply With Quote
                              #73    
                            Old November 11th, 2010 (6:17 AM).
                            knizz's Avatar
                            knizz knizz is offline
                               
                              Join Date: Aug 2007
                              Gender: Female
                              Posts: 192
                              I need infos on the 0x083E-0x083F area.
                              __________________
                              Firered IDA 6.6 DB: https://www.dropbox.com/s/d856o3pyndyr5sr/firered.idb
                              VBA-M with lua scripting support
                              incomplete firered decompilation
                              Reply With Quote
                                #74    
                              Old November 11th, 2010 (6:27 AM).
                              Darthatron's Avatar
                              Darthatron Darthatron is offline
                              巨大なトロール。
                               
                              Join Date: Jan 2006
                              Location: Melbourne, Australia
                              Age: 27
                              Gender: Male
                              Nature: Modest
                              Posts: 1,152
                              Quote:
                              Originally Posted by knizz View Post
                              I need infos on the 0x083E-0x083F area.
                              Want to be a little more specific what you're looking for? :\
                              __________________
                              あなた は しきしゃ です
                              わたし は ばか です
                              Reply With Quote
                                #75    
                              Old November 11th, 2010 (7:18 AM).
                              knizz's Avatar
                              knizz knizz is offline
                                 
                                Join Date: Aug 2007
                                Gender: Female
                                Posts: 192
                                Want? Yes. Can? No.
                                Theres just a pile of structureless numbers and addresses.
                                __________________
                                Firered IDA 6.6 DB: https://www.dropbox.com/s/d856o3pyndyr5sr/firered.idb
                                VBA-M with lua scripting support
                                incomplete firered decompilation
                                Reply With Quote
                                Reply

                                Quick Reply

                                Join the conversation!

                                Create an account to post a reply in this thread, participate in other discussions, and more!

                                Create a PokéCommunity Account
                                Thread Tools

                                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 -8. The time now is 10:29 AM.