Gameboy Development Forum

Discussion about software development for the old-school Gameboys, ranging from the "Gray brick" to Gameboy Color
(Launched in 2008)

You are not logged in.

Ads

#26 2017-06-17 02:15:25

cabbage
New member
Registered: 2016-06-10
Posts: 5

Re: using asm files in combonation with a C game

by the way, you cannot just check the file size of the .o file to know much space it will use in a compiled rom. the .o is an object file which contains some extra information and in a special format (not just raw data) for the linker.

i would guess that whatever is in these mysterious .dat files is the problem. i.e., is it really in gb-compatible format?
again, how did you generate the data in story1.dat and story2.dat?

Offline

 

#27 2017-10-02 21:59:49

jobalisk
Member
From: I don't even know anymore...
Registered: 2017-05-28
Posts: 55
Website

Re: using asm files in combonation with a C game

I fixed the problem, took ages, especially since I ditched programing for a few months, by substituting the bank file for the original image.c files and by using a different set of compiling parameters along with changing a few different pieces of code, I finally achieved what I was trying to do.

Here are the parameters I used in the end:

lcc -Wa-l -Wl-m -Wl-j -DUSE_SFR_FOR_REG -c -o advojobo.o advojobo.c
lcc -Wa-l -Wl-m -Wl-j -DUSE_SFR_FOR_REG -Wf-bo2 -Wf-ba1 -c -o story1.o story1.c
lcc -Wa-l -Wl-m -Wl-j -DUSE_SFR_FOR_REG -Wf-bo3 -Wf-ba1 -c -o alphabet.o alphabet.c
lcc -Wa-l -Wl-m -Wl-j -DUSE_SFR_FOR_REG -Wf-bo4 -Wf-ba1 -c -o story2.o story2.c
lcc -Wa-l -Wl-m -Wl-j -DUSE_SFR_FOR_REG -Wf-bo5 -Wf-ba1 -c -o story3.o story3.c
lcc -Wa-l -Wl-m -Wl-j -DUSE_SFR_FOR_REG -Wf-bo6 -Wf-ba1 -c -o story4.o story4.c
lcc -Wa-l -Wl-m -Wl-j -DUSE_SFR_FOR_REG -Wf-bo7 -Wf-ba1 -c -o story5.o story5.c

lcc -Wa-l -Wl-m -Wl-j -DUSE_SFR_FOR_REG -Wl-yt2 -Wl-yo8 -Wl-ya1 -o advojobo.gb advojobo.o story1.o alphabet.o story2.o story3.o story4.o story5.o


I've got a link here to the resulting game (no where near complete):

https://drive.google.com/file/d/0B5dpnl … sp=sharing

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson