splat icon indicating copy to clipboard operation
splat copied to clipboard

header section can be unbuildable for iQue roms

Open marijnvdwerf opened this issue 2 years ago • 2 comments

Splat produces invalid code when extracting the header from iQue roms, which barely have any info in the header. The "internal name" contains null bytes, which then trips up as

Error

mips-linux-gnu-as -EB -march=vr4300 -mtune=vr4300 -Iinclude ver/cn/asm/header.s -o ver/cn/build/ver/cn/asm/header.s.o
ver/cn/asm/header.s: Assembler messages:
ver/cn/asm/header.s:11: Warning: missing closing `"'
ver/cn/asm/header.s:11: Error: unrecognized opcode `
.word 0x00000000
.word 0x00000000
.ascii "\0\0"'

Hexdump (Paper Mario, iQue)

00000000  80 37 12 40 00 00 00 0f  80 02 5c 00 00 00 14 4c  |.7.@......\....L|
00000010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000020  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000030  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000040  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|

header.s

.section .data

.word 0x80371240       /* PI BSB Domain 1 register */
.word 0x0000000F       /* Clockrate setting */
.word 0x80025C00       /* Entrypoint address */
.word 0x0000144C       /* Revision */
.word 0x00000000       /* Checksum 1 */
.word 0x00000000       /* Checksum 2 */
.word 0x00000000       /* Unknown 1 */
.word 0x00000000       /* Unknown 2 */
.ascii "��������������������" /* Internal name */
.word 0x00000000       /* Unknown 3 */
.word 0x00000000       /* Cartridge */
.ascii "\0\0"          /* Cartridge ID */
.ascii "\0"            /* Country code */
.byte 0x00             /* Version */

marijnvdwerf avatar Feb 20 '23 20:02 marijnvdwerf

Fixed in #228

ethteck avatar Apr 03 '23 06:04 ethteck

Still happens as of 0c5540f4. This is probably gonna require changes in segtypes/n64/header.py.

marijnvdwerf avatar Apr 03 '23 18:04 marijnvdwerf