Chilly Willy wrote:Looking at the program... how are BMPs preprocessed before adding to the project? It can't be just making it binary or everything's all wrong. You should check what data is being generated for the moon and see if it matches what the program expects.
Yes ofcourse, look.
Code: Select all
-------------- Build: Out in smd_helloworld ---------------
bintos -bmp C:\Users\Ricky\Dev\cpp\SMD\smd_helloworld\moon.bmp
gcc.exe -m68000 -Wall -O3 -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer -fno-builtin-memset -fno-builtin-memcpy -IC:\Utils\GenDev\include\ -IC:\Utils\GenDev\bin -c moon.s -o obj\Out\\moon.o
rm moon.s
gcc.exe -m68000 -Wall -O3 -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer -fno-builtin-memset -fno-builtin-memcpy -c -IC:\Utils\GenDev\include\ -IC:\Utils\GenDev\bin -o obj\Out\\rom_head.o C:\Users\Ricky\Dev\cpp\SMD\smd_helloworld\rom_head.c
ld.exe -T C:/Utils/GenDev/md.ld -nostdlib --oformat binary -o rom_head.bin obj\Out\\rom_head.o
gcc.exe -m68000 -Wall -O3 -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer -fno-builtin-memset -fno-builtin-memcpy -c -IC:\Utils\GenDev\include\ -IC:\Utils\GenDev\bin C:/Utils/GenDev/src/boot/sega.s -o obj\Out\\sega.o
gcc.exe -m68000 -Wall -O3 -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer -fno-builtin-memset -fno-builtin-memcpy -c -IC:\Utils\GenDev\include\ -IC:\Utils\GenDev\bin -o obj\Out\\main.o C:\Users\Ricky\Dev\cpp\SMD\smd_helloworld\main.c
ld.exe -T C:/Utils/GenDev/md.ld -nostdlib --oformat binary -o rom_head.bin obj\Out\\rom_head.o
gcc.exe -m68000 -Wall -O3 -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer -fno-builtin-memset -fno-builtin-memcpy -c -IC:\Utils\GenDev\include\ -IC:\Utils\GenDev\bin C:/Utils/GenDev/src/boot/sega.s -o obj\Out\\sega.o
ld.exe -T C:/Utils/GenDev/md.ld -nostdlib obj\Out\\sega.o obj\Out\moon.o obj\Out\rom_head.o obj\Out\main.o C:/Utils/GenDev/lib/libmd.a C:/Utils/GenDev/lib/libgcc.a -o obj\Out\\smd.out
objcopy -O binary obj\Out\\smd.out bin\Out\smd_helloworld.smd
sizebnd bin\Out\smd_helloworld.smd -sizealign 131072
rm rom_head.bin
Output size is 48.02 KB
Output size is 128.00 KB
Output size is 128.00 KB
Process terminated with status 0 (0 minutes, 2 seconds)
0 errors, 0 warnings
I got Code::Blocks set up to run everything itself instead of using the makefile.gen I got much more control this way and I'll be making a thread on how I managed this soon after I got it fully up and working with all supported SGDK files. As you can see bintos is the first thing I call, then main has its moon.h so it doesn't complain, moon.o is linked later and everything else is business as usual. Can't explain what's going on, I build using the makefile.gen just in case I configured something wrong in Code::Blocks but I get the same results, grey.
I can see the moon in VRAM/Tile view when debugging the VDP from GensKmod.
I'm going to be building all tutorials to see whats going on.
Tutorial 1 builds and works (hello world)
Tutorial 2 builds and works (buttons)
Tutorial 3pt1 builds and works (drawing pixels)
Tutorial 3pt2 builds but does not work (moon fails, grey screen)
Testing tutorial 4 tomorrow, I'm going to bed