diff --git a/tb_snes/checksum.inc b/tb_snes/checksum.inc index 87f1eb6..225a25f 100644 --- a/tb_snes/checksum.inc +++ b/tb_snes/checksum.inc @@ -1,2 +1,2 @@ - .word $2797 ; Complement of checksum - .word $d868 ; Unsigned 16-bit sum of ROM + .word $dfde ; Complement of checksum + .word $2021 ; Unsigned 16-bit sum of ROM diff --git a/tb_snes/title_screen.s b/tb_snes/title_screen.s index e5f5101..4318648 100644 --- a/tb_snes/title_screen.s +++ b/tb_snes/title_screen.s @@ -75,10 +75,10 @@ copypal: sta $2116 ; set adddress for VRAM read/write ; multiply by 2, so 0x0000 - ldy #$7000 ; Copy 896 tiles, which are 64 bytes each + ldy #$3bc0 ; Copy 478 tiles, which are 64 bytes each ; 8x8 tile with 8bpp (four bits per pixel) ; in 2-byte chunks, so - ; (896*64)/2 = 28672 = 0x7000 + ; (478*64)/2 = 15296 = 0x3bc0 ldx #$0000 copy_tile_data: diff --git a/tb_snes/tools/pcx_to_compressed_tilemap_8bpp.c b/tb_snes/tools/pcx_to_compressed_tilemap_8bpp.c index 46afd60..22803b1 100644 --- a/tb_snes/tools/pcx_to_compressed_tilemap_8bpp.c +++ b/tb_snes/tools/pcx_to_compressed_tilemap_8bpp.c @@ -7,6 +7,18 @@ #include /* for file modes */ #include /* exit() */ +static unsigned int hflip_byte(unsigned int byte) { + + int new_byte=0,i; + + for(i=0;i<8;i++) { + new_byte<<=1; + if (byte&(1<>8)&0xff)<<8) | + hflip_byte( temp_tile[y][plane]&0xff); + } + } + + + compressed_tiles++; + + } + else { + } tilemap[total_tiles]= ( ((v&1)<<15) | ((h&1)<<14) | ((o&1)<<13) | ((pal&7)<<10) | - (total_tiles&0x3ff)); + (found_tile&0x3ff)); total_tiles++; - compressed_tiles++; } }