FF6LE Rogue CE

Last updated : 10/09/2016
Current version : 0.8.2
Stack : C#, winforms, 65816 assembly
Compatible with : FF3us 1.0, FF3us 1.1
Type : Level/Map editor
Github repository
Expansions

This project is a fork of FF6LE Rogue that now allow many expansion: Tilemaps, Tilemaps max space, max Locations (maps), NPC max space, Exits max space, Event Triggers max space, Chests max space, Chests SRAM bits and Message Names. This version of FF6LE does not add any of the mentioned data (except blank tilemaps and location data to have working new maps), it only allow to have more of the said data in your project.

The default L1 tilemap ID ($15F) on maps $19F to $1FF is shadow's dream (256x256 black map with layer 1 only). Tilemaps $15F to $1FF are all the same, they take $1A bytes of space each. To make the map bigger, you select your new tilemaps ID(s) (L1, L2 and L3 if neccesary). Then you resize the layers (from 256x256 to 1024x1024 as an example) and set the other map properties. Then you can either import tilemaps (which should cover the correct layers sizes) or hand draw.

Settings window

To access expansion, you must load a ROM first. You can select a setting file path. When you click "Expand Maps", the setting file is created. Map expansion give access to Chests expansion. Both expansion have an ASM validation that will prompt a warning message if a ASM change does not have the expected value at its offset.

If you were using Zone Doctor+ or FF6LE+ before, you must check the checkbox before expansion. This will ensure all your data will be carried on from your project.

If you want to use a "vanilla" ROM with this editor, blank out the setting file path and click "Apply". If you want to allow expansion on a new ROM, change the filepath name or choose another directory for your XML file and click "Apply".

Once your ROM is expanded, you can increase the number of banks for tilemap space if at some point you are at the limit of the size originally input.

expansions

Settings file

The settings are stored in a XML file. This file is read at editor loading to see if the project has expansions done. It is therefore important to have a valid setting file path in the setting window. I would suggest to not change settings in this files other than location names. Doing otherwise if you are not sure of what each setting does could limit or crash the editor depending on the ROM loaded.

Location names

You can change the names of the maps in the editor. This is mainly to name new maps. This feature doesn't change anything in the ROM, it was made to make map edit easier and to know which map is what. Location names are saved in the setting file. This feature is disabled if your ROM doesn't have the map expansion done. The $XXX string starting the name is trimmed in setting file and in the editor textbox. It is applied automatically.

Message names

In-Game map names can also be edited. Expansion allow 255 entries and max space is also expanded. Max length for a name is 37 characters. Allowed characters are A-Z a-z 0-9 ! ? : \ ' - . , ; # + ( ) % ~

Misc

Maximum Event offsets for Event Triggers and Entrance Events are now $35FFFE ($FFFFFE) instead of $2FFFF ($CCFFFF). his allow to put directly events outside the $CA0000-$CCFFFF range. This feature was not possible for NPC event offsets since the NPC data only allow 18 bits for the event (and not 3 full bytes).

Bugfixes

The following bugs were present in the original FF6LE Rogue and were fixed during development of the CE version.

  • When setting a location for an exit, value higher than 100 does not have the first digit cutoff anymore.
  • The map is now correctly updated when importing a Layer 2 or Layer 3 tilemap.
  • Some vanilla tilemaps gives an error when recompressing. This only occur if your force all tilemaps compression by changing the code. I suspect those tilemaps generally not edited does not fit the compression algorithm of FF6LE. Some arrays overflow checks were put in the compression function. However I have never seen an edited tilemap giving that saving error.
  • Checksum and reverse checksum is now correctly calculated and written in the ROM. Editor will also show a "(OK)" value for checksum when reloading the ROM.
  • When saving all the tilesets, the code would look if tilemap X (instead of tileset X) has been modified, resulting in compressing unmodified tilesets. This is not dramatic but in some case it would lead to having not enough space to save all tilesets. This may also means the compression algorithm in the editor is somewhat different from the ROM one, maybe less efficient?

expansions

expansions

expansions

ROM map
DESCRIPTION     TYPE    OLD LOCATION    NEW LOCATION    
-----------     ----    -------------   -------------   
Events          PTR     C40000-C40341   C40000-C40401   
Events          DATA    C40342-C41A0F   C40402-C44401   
NPCs            PTR     C41A10-C41D51   YY0000-YY0401   
NPCs            DATA    C41D52-C46ABF   YY0402-YY8FFF   
Exits (small)   PTR     DFBB00-DFBF01   YY9000-YY9401   
Exits (small)   DATA    DFBF02-DFD9FF   YY9402-YYCFFF   
Exits (long)    PTR     EDF480-EDF881   YYD000-YYD401   
Exits (long)    DATA    EDF882-EDFDFF   YYD402-YYDFFF   
Treasures       PTR     ED82F4-ED8633   YYE000-YYE3FF   
Treasures       DATA    ED8634-ED8E5A   YYE400-YYF3FF   
Free Space      ----    -------------   YYF400-YYFFFF
Tilemaps        PTR     D9CD90-D9D1AF   D9CD90-D9D38D   
Tilemaps        DATA    D9D1B0-DDFFFF   XX0000-ZZFFFF   
Map Properties  DATA    ED8F00-EDC47F   DA0000-DA41DE   
Map Names       PTR     E68400-E6877F   DA4200-DA43FF
Map Names       DATA    CEF100-CEF5FF   DA4400-DA68FF

YY = Expanded Data bank
XX = Expanded Tilemaps starting bank
ZZ = XX + number of Expanded Tilemaps banks
Reference ASM changes
;Assuming Expanded Data Banks is $50
;Assuming Expanded Tilemaps Data Starting Bank is $51

;MAP DATA
;--------
org $C01CBF
LDA $DA0000,X

;EVENTS
;------
org $C0BCAE    
LDA $C40002,X

org $C0BCB4    
LDA $C40000,X

org $C0BCBD    
LDA $C40000,X

org $C0BCD3    
LDA $C40002,X

org $C0BCED    
LDA $C40004,X

;NPCS
;----
org $C052BC    
LDA $500002,X

org $C052C2    
LDA $500000,X

org $C052D4    
LDA $500000,X

org $C052DB    
LDA $500001,X

org $C052E2    
LDA $500002,X

org $C052EB    
LDA $500002,X

org $C052F8    
LDA $500002,X

org $C05305    
LDA $500002,X

org $C05321    
LDA $500004,X

org $C0532C    
LDA $500004,X

org $C0533A    
LDA $500005,X

org $C0535A    
LDA $500005,X

org $C05369    
LDA $500006,X

org $C05373    
LDA $500007,X

org $C0537F    
LDA $500007,X

org $C0538A    
LDA $500007,X

org $C05397    
LDA $500008,X

org $C053AD    
LDA $500008,X

org $C053BC    
LDA $500008,X

org $C053D0    
LDA $500008,X

org $C053E3    
LDA $500008,X

;TREASURES
;---------
org $C04C08    
LDA $50E404,X

org $C04C0E    
LDA $50E402,X

org $C04BDA    
LDA $50E002,X

org $C04BE0    
LDA $50E000,X

org $C04BEC    
LDA $50E400,X

org $C04BF4    
LDA $50E401,X

org $C015DD    
LDA $50E002,X

org $C015E3    
LDA $50E000,X

org $C015F1    
LDA $50E400,X

org $C015F7    
LDA $50E401,X

org $C015FE    
LDA $50E402,X

org $C01609    
LDA $50E402,X

;LONG ENTRANCES
;--------------
org $C018EA    
LDA $50D002,X

org $C018F0    
LDA $50D000,X

org $C01903    
LDA $50D002,X

org $C0190B    
LDA $50D001,X

org $C01916    
SBC $50D000,X

org $C0191E    
LDA $50D000,X

org $C0192F    
LDA $50D000,X

org $C0193A    
SBC $50D001,X

org $C01942    
LDA $50D001,X

org $C01963    
LDA $50D003,X

org $C0196F    
LDA $50D003,X

org $C0197B    
LDA $50D003,X

org $C0198A    
LDA $50D005,X

org $C0199F    
LDA $50D005,X

org $C019A9    
LDA $50D004,X

org $C019B6    
LDA $50D004,X

org $C019C4    
LDA $50D004,X

org $C019E5    
LDA $50D003,X

org $C01A14    
LDA $50D004,X

;SHORT ENTRANCES
;---------------
org $C01A7D    
LDA $509002,X

org $C01A83    
LDA $509000,X

org $C01A8F    
LDA $509000,X

org $C01AAA    
LDA $509002,X

org $C01AB6    
LDA $509002,X

org $C01AC2    
LDA $509002,X

org $C01AD1    
LDA $509004,X

org $C01AE6    
LDA $509004,X

org $C01AF0    
LDA $509003,X

org $C01AFD    
LDA $509003,X

org $C01B0B    
LDA $509003,X

org $C01B2C    
LDA $509002,X

org $C01B5E    
LDA $509003,X

org $EE20E9
LDA $509000,X
STA $58        
LDA $509002,X

org $EE20FE
LDA $509000,X

org $EE2106
LDA $509001,X

org $EE2110
LDA $509002,X

org $EE213C
LDA $509004,X

;TILEMAPS
;--------
org $C02892
LDA $D9CD90,X  
CLC
ADC #$0000

org $C0289F
LDA $D9CD92,X
ADC #$51

org $C028E6
LDA $D9CD90,X  
CLC
ADC #$0000

org $C028F3
LDA $D9CD92,X
ADC #$51

org $C0293C
LDA $D9CD90,X
CLC
ADC #$0000

org $C02949
LDA $D9CD92,X
ADC #$51

;MAP NAMES
;---------
org $C07FFD
LDA #$DA

org $C08008
LDA $DA4200,X
ADC #$4400

;CHEST MEMORY
;------------
org $C0BB1A
STZ $1E20,X

org $C0BB1E
CPX #$0060

org $C04C1A
AND #$03FF

org $C04C24
LDA $1E20,Y

org $C04C2D
LDA $1E20,Y

org $C04C34
STA $1E20,Y

org $C01602
AND #$03FF

org $C01614
LDA $1E20,Y

FF6LE Rogue CE

Last updated : 10/09/2016
Current version : 0.8.2
Stack : C#, winforms, 65816 assembly
Compatible with : FF3us 1.0, FF3us 1.1
Type : Level/Map editor
Github repository
Expansions

This project is a fork of FF6LE Rogue that now allow many expansion: Tilemaps, Tilemaps max space, max Locations (maps), NPC max space, Exits max space, Event Triggers max space, Chests max space, Chests SRAM bits and Message Names. This version of FF6LE does not add any of the mentioned data (except blank tilemaps and location data to have working new maps), it only allow to have more of the said data in your project.

The default L1 tilemap ID ($15F) on maps $19F to $1FF is shadow's dream (256x256 black map with layer 1 only). Tilemaps $15F to $1FF are all the same, they take $1A bytes of space each. To make the map bigger, you select your new tilemaps ID(s) (L1, L2 and L3 if neccesary). Then you resize the layers (from 256x256 to 1024x1024 as an example) and set the other map properties. Then you can either import tilemaps (which should cover the correct layers sizes) or hand draw.

Settings window

To access expansion, you must load a ROM first. You can select a setting file path. When you click "Expand Maps", the setting file is created. Map expansion give access to Chests expansion. Both expansion have an ASM validation that will prompt a warning message if a ASM change does not have the expected value at its offset.

If you were using Zone Doctor+ or FF6LE+ before, you must check the checkbox before expansion. This will ensure all your data will be carried on from your project.

If you want to use a "vanilla" ROM with this editor, blank out the setting file path and click "Apply". If you want to allow expansion on a new ROM, change the filepath name or choose another directory for your XML file and click "Apply".

Once your ROM is expanded, you can increase the number of banks for tilemap space if at some point you are at the limit of the size originally input.

expansions

Settings file

The settings are stored in a XML file. This file is read at editor loading to see if the project has expansions done. It is therefore important to have a valid setting file path in the setting window. I would suggest to not change settings in this files other than location names. Doing otherwise if you are not sure of what each setting does could limit or crash the editor depending on the ROM loaded.

Location names

You can change the names of the maps in the editor. This is mainly to name new maps. This feature doesn't change anything in the ROM, it was made to make map edit easier and to know which map is what. Location names are saved in the setting file. This feature is disabled if your ROM doesn't have the map expansion done. The $XXX string starting the name is trimmed in setting file and in the editor textbox. It is applied automatically.

Message names

In-Game map names can also be edited. Expansion allow 255 entries and max space is also expanded. Max length for a name is 37 characters. Allowed characters are A-Z a-z 0-9 ! ? : \ ' - . , ; # + ( ) % ~

Misc

Maximum Event offsets for Event Triggers and Entrance Events are now $35FFFE ($FFFFFE) instead of $2FFFF ($CCFFFF). his allow to put directly events outside the $CA0000-$CCFFFF range. This feature was not possible for NPC event offsets since the NPC data only allow 18 bits for the event (and not 3 full bytes).

Bugfixes

The following bugs were present in the original FF6LE Rogue and were fixed during development of the CE version.

  • When setting a location for an exit, value higher than 100 does not have the first digit cutoff anymore.
  • The map is now correctly updated when importing a Layer 2 or Layer 3 tilemap.
  • Some vanilla tilemaps gives an error when recompressing. This only occur if your force all tilemaps compression by changing the code. I suspect those tilemaps generally not edited does not fit the compression algorithm of FF6LE. Some arrays overflow checks were put in the compression function. However I have never seen an edited tilemap giving that saving error.
  • Checksum and reverse checksum is now correctly calculated and written in the ROM. Editor will also show a "(OK)" value for checksum when reloading the ROM.
  • When saving all the tilesets, the code would look if tilemap X (instead of tileset X) has been modified, resulting in compressing unmodified tilesets. This is not dramatic but in some case it would lead to having not enough space to save all tilesets. This may also means the compression algorithm in the editor is somewhat different from the ROM one, maybe less efficient?

expansions

expansions

expansions

ROM map
DESCRIPTION     TYPE    OLD LOCATION    NEW LOCATION    
-----------     ----    -------------   -------------   
Events          PTR     C40000-C40341   C40000-C40401   
Events          DATA    C40342-C41A0F   C40402-C44401   
NPCs            PTR     C41A10-C41D51   YY0000-YY0401   
NPCs            DATA    C41D52-C46ABF   YY0402-YY8FFF   
Exits (small)   PTR     DFBB00-DFBF01   YY9000-YY9401   
Exits (small)   DATA    DFBF02-DFD9FF   YY9402-YYCFFF   
Exits (long)    PTR     EDF480-EDF881   YYD000-YYD401   
Exits (long)    DATA    EDF882-EDFDFF   YYD402-YYDFFF   
Treasures       PTR     ED82F4-ED8633   YYE000-YYE3FF   
Treasures       DATA    ED8634-ED8E5A   YYE400-YYF3FF   
Free Space      ----    -------------   YYF400-YYFFFF
Tilemaps        PTR     D9CD90-D9D1AF   D9CD90-D9D38D   
Tilemaps        DATA    D9D1B0-DDFFFF   XX0000-ZZFFFF   
Map Properties  DATA    ED8F00-EDC47F   DA0000-DA41DE   
Map Names       PTR     E68400-E6877F   DA4200-DA43FF
Map Names       DATA    CEF100-CEF5FF   DA4400-DA68FF

YY = Expanded Data bank
XX = Expanded Tilemaps starting bank
ZZ = XX + number of Expanded Tilemaps banks
Reference ASM changes
;Assuming Expanded Data Banks is $50
;Assuming Expanded Tilemaps Data Starting Bank is $51

;MAP DATA
;--------
org $C01CBF
LDA $DA0000,X

;EVENTS
;------
org $C0BCAE    
LDA $C40002,X

org $C0BCB4    
LDA $C40000,X

org $C0BCBD    
LDA $C40000,X

org $C0BCD3    
LDA $C40002,X

org $C0BCED    
LDA $C40004,X

;NPCS
;----
org $C052BC    
LDA $500002,X

org $C052C2    
LDA $500000,X

org $C052D4    
LDA $500000,X

org $C052DB    
LDA $500001,X

org $C052E2    
LDA $500002,X

org $C052EB    
LDA $500002,X

org $C052F8    
LDA $500002,X

org $C05305    
LDA $500002,X

org $C05321    
LDA $500004,X

org $C0532C    
LDA $500004,X

org $C0533A    
LDA $500005,X

org $C0535A    
LDA $500005,X

org $C05369    
LDA $500006,X

org $C05373    
LDA $500007,X

org $C0537F    
LDA $500007,X

org $C0538A    
LDA $500007,X

org $C05397    
LDA $500008,X

org $C053AD    
LDA $500008,X

org $C053BC    
LDA $500008,X

org $C053D0    
LDA $500008,X

org $C053E3    
LDA $500008,X

;TREASURES
;---------
org $C04C08    
LDA $50E404,X

org $C04C0E    
LDA $50E402,X

org $C04BDA    
LDA $50E002,X

org $C04BE0    
LDA $50E000,X

org $C04BEC    
LDA $50E400,X

org $C04BF4    
LDA $50E401,X

org $C015DD    
LDA $50E002,X

org $C015E3    
LDA $50E000,X

org $C015F1    
LDA $50E400,X

org $C015F7    
LDA $50E401,X

org $C015FE    
LDA $50E402,X

org $C01609    
LDA $50E402,X

;LONG ENTRANCES
;--------------
org $C018EA    
LDA $50D002,X

org $C018F0    
LDA $50D000,X

org $C01903    
LDA $50D002,X

org $C0190B    
LDA $50D001,X

org $C01916    
SBC $50D000,X

org $C0191E    
LDA $50D000,X

org $C0192F    
LDA $50D000,X

org $C0193A    
SBC $50D001,X

org $C01942    
LDA $50D001,X

org $C01963    
LDA $50D003,X

org $C0196F    
LDA $50D003,X

org $C0197B    
LDA $50D003,X

org $C0198A    
LDA $50D005,X

org $C0199F    
LDA $50D005,X

org $C019A9    
LDA $50D004,X

org $C019B6    
LDA $50D004,X

org $C019C4    
LDA $50D004,X

org $C019E5    
LDA $50D003,X

org $C01A14    
LDA $50D004,X

;SHORT ENTRANCES
;---------------
org $C01A7D    
LDA $509002,X

org $C01A83    
LDA $509000,X

org $C01A8F    
LDA $509000,X

org $C01AAA    
LDA $509002,X

org $C01AB6    
LDA $509002,X

org $C01AC2    
LDA $509002,X

org $C01AD1    
LDA $509004,X

org $C01AE6    
LDA $509004,X

org $C01AF0    
LDA $509003,X

org $C01AFD    
LDA $509003,X

org $C01B0B    
LDA $509003,X

org $C01B2C    
LDA $509002,X

org $C01B5E    
LDA $509003,X

org $EE20E9
LDA $509000,X
STA $58        
LDA $509002,X

org $EE20FE
LDA $509000,X

org $EE2106
LDA $509001,X

org $EE2110
LDA $509002,X

org $EE213C
LDA $509004,X

;TILEMAPS
;--------
org $C02892
LDA $D9CD90,X  
CLC
ADC #$0000

org $C0289F
LDA $D9CD92,X
ADC #$51

org $C028E6
LDA $D9CD90,X  
CLC
ADC #$0000

org $C028F3
LDA $D9CD92,X
ADC #$51

org $C0293C
LDA $D9CD90,X
CLC
ADC #$0000

org $C02949
LDA $D9CD92,X
ADC #$51

;MAP NAMES
;---------
org $C07FFD
LDA #$DA

org $C08008
LDA $DA4200,X
ADC #$4400

;CHEST MEMORY
;------------
org $C0BB1A
STZ $1E20,X

org $C0BB1E
CPX #$0060

org $C04C1A
AND #$03FF

org $C04C24
LDA $1E20,Y

org $C04C2D
LDA $1E20,Y

org $C04C34
STA $1E20,Y

org $C01602
AND #$03FF

org $C01614
LDA $1E20,Y