flash · 288873
#-------------------------------------------------------# graphics in tile format#--------------------------------------------------------gt#-------------------------------------------------------# trasparent color#--------------------------------------------------------gT7C1F#-------------------------------------------------------# tile reduction#--------------------------------------------------------mRtpf#-------------------------------------------------------# map output#--------------------------------------------------------m#-------------------------------------------------------# graphics bit depth is 4 (16 color)#--------------------------------------------------------gB4#-------------------------------------------------------# Map layout for regular backgrounds. 16-bit entries, broken down into screenblocks. #--------------------------------------------------------mLs
ldr r0, =VRAM_A_CR @ Set VRAM A to be main bg address 0x06000000 ldr r1, =(VRAM_ENABLE | VRAM_A_MAIN_BG_0x06000000) strb r1, [r0] ldr r0, =VRAM_C_CR @ Set VRAM C to be sub bg address 0x06200000 ldr r1, =(VRAM_ENABLE | VRAM_C_SUB_BG_0x06200000) strb r1, [r0] mov r0, #REG_DISPCNT @ Main screen to Mode 0 with BG0 & BG1 active ldr r1, =(MODE_0_2D | DISPLAY_BG0_ACTIVE | DISPLAY_BG1_ACTIVE) str r1, [r0] ldr r0, =REG_DISPCNT_SUB @ Sub screen to Mode 0 with BG0 & BG1 active ldr r1, =(MODE_0_2D | DISPLAY_BG0_ACTIVE | DISPLAY_BG1_ACTIVE) str r1, [r0] ldr r0, =REG_BG0CNT @ Set main screen BG0 format to be 64x64 tiles at base address ldr r1, =(BG_COLOR_16 | BG_64x64 | BG_MAP_BASE(0) | BG_TILE_BASE(1) | BG_PRIORITY(1)) str r1, [r0] ldr r0, =REG_BG0CNT_SUB @ Set sub screen BG0 format to be 64x64 tiles at base address ldr r1, =(BG_COLOR_16 | BG_64x64 | BG_MAP_BASE(0) | BG_TILE_BASE(1) | BG_PRIORITY(1)) str r1, [r0] ldr r0, =REG_BG1CNT @ Set main screen BG0 format to be 64x64 tiles at base address ldr r1, =(BG_COLOR_16 | BG_32x64 | BG_MAP_BASE(4) | BG_TILE_BASE(1) | BG_PRIORITY(3)) str r1, [r0] ldr r0, =REG_BG1CNT_SUB @ Set sub screen BG0 format to be 64x64 tiles at base address ldr r1, =(BG_COLOR_16 | BG_32x64 | BG_MAP_BASE(4) | BG_TILE_BASE(1) | BG_PRIORITY(3)) str r1, [r0]
Yes very strange because I swore I checked all the sizes of the registers and I thought those REG_BGxCNT regs were 32-bit. Can't believe we missed that as I thought we checked them all.Anyway it feels good were back on track. I would not use a framebuffer mode mixed with a tilemode, it just wouldn't work. What we should do is find some nice star sprites and just build a map like the level map using stars and maybe some planets and things for the background. Maybe we could have two layers for the background, something like stars on one and planets on the other and scroll them at different speeds.
-ga <n> Pixel offset for non-zero pixels. Useful if the associated palette is at an offset.-ps <n> Starting palette entry. -ps 16 would start the export at color 16. Works together with -pe and -pn.
PS. I see you had the same problem as me with the scroll matching and the blank areas. I am going to make all the bloody 3 layers the same size... There - that's told Mr. Arm...
-pS Shared palette data. The colors of the source bitmaps are merged into a single palette. See also -O and -S. NOTE: will alter the order of the original palette (unless the first bitmap happened to have all the colors in it (hint, hint)).
#define BG_PALETTE 0x05000000
Okay got BG2 working. I'm not sure exactly what was going wrong but it looks like the tile data was overlapping other map or tile data but by my calculations there should have been plenty of space for it. So I just made more room. Did a few other odds and ends as I wasn't sure exactly what was causing it. I also fixed the crash on No$GBA when the demo ends, and the other crash after a few seconds in.Also I noticed the movement code doesn't work on hardware but didn't get around to finding out why.