Dwedit's Board

Enjoy the board

You are not logged in.

Announcement

Welcome, fellow visitors from other websites!
Whenever you download a file, I'd appreciate it if you posted a nice "Thank You" message, then tell me which site you came from. Thanks.
- Dwedit

#1 2021-04-27 6:48:45 pm

brainard52
Member
Registered: 2021-04-27
Posts: 7

Building Goomba Color on MacOS

I'm attempting to build 2019-05-04 from source on macOS, and I'm getting errors related to the linker that I'm not really sure how to resolve. I've installed devkitpro for mac per the dkp installation instructions, and I have gnu make 3.81 installed. My trouble is that I'm simply not proficient with make.

As far as I can tell, lines 162 and 166 of the makefile are what creates build/font.lz77.o and build/build/fontpal.bin.o. It seems as though line 36 is expecting font.o instead of font.lz77.o and fontpal.o instead of fontpal.bin.o. I'm not really certain which portions of the makefile to change to resolve this. Thoughts?

Also, how would I submit patches for review? I'm interested in improving accuracy for better game compatibility.

Last edited by brainard52 (2021-04-27 7:14:24 pm)


Attachments:
Attachment Icon make.txt, Size: 2,658 bytes, Downloads: 28

Offline

#2 2021-04-27 7:41:26 pm

Dwedit
Administrator
From: Chicago
Registered: 2004-12-12
Posts: 1,017
Website

Re: Building Goomba Color on MacOS

I just did "make clean" and "make" and it built fine, don't know why it's having trouble with the two binary files.

According to "make --trace", it should be using "bin2s" as the command to generate the .o files from the raw binaries.

On my PC, "bin2s.exe" was found in "C:\devkitpro\tools\bin".

---------

In the devkitARM folder, there are these files:
gba_rules
base_rules
base_tools

base_tools is the file that defines the directory where "bin2s" would be found.

base_rules defines the "bin2o" macro at the end of the file.  The macro uses "bin2s" to do the actual work.

The main makefile has some rules that makes it call "bin2o" on a few file types (.lz77, .bin, .gba) when it needs them as binary files.

----------

So try deleting any "font.o" or "fontpal.o" files, and run "make --trace" to see if it is trying to build them.

----------

I might put Goomba Color on Github soon if you want to send in PRs or things like that.


"We are merely sprites that dance at the beck and call of our button pressing overlord."

Offline

#3 2021-04-27 10:34:21 pm

brainard52
Member
Registered: 2021-04-27
Posts: 7

Re: Building Goomba Color on MacOS

Dwedit wrote:

I just did "make clean" and "make" and it built fine, don't know why it's having trouble with the two binary files.

According to "make --trace", it should be using "bin2s" as the command to generate the .o files from the raw binaries.

On my PC, "bin2s.exe" was found in "C:\devkitpro\tools\bin".

---------

In the devkitARM folder, there are these files:
gba_rules
base_rules
base_tools

base_tools is the file that defines the directory where "bin2s" would be found.

base_rules defines the "bin2o" macro at the end of the file.  The macro uses "bin2s" to do the actual work.

The main makefile has some rules that makes it call "bin2o" on a few file types (.lz77, .bin, .gba) when it needs them as binary files.

----------

So try deleting any "font.o" or "fontpal.o" files, and run "make --trace" to see if it is trying to build them.

I distilled the issue down to a few lines of makefile. I still don't really know what to do about it though... I've attached a tgz with the test file I made and the Makefile. I think the behavior just comes down to how bin2s and arm-none-eabi-gcc-ar work on UNIX-ey operating systems. I'm on macOS at the moment. I think what we're both expecting is that it take font.lz77 and do whatever with it before dropping a font.o. Instead, it does whatever and names it font.lz77.o.

Dwedit wrote:

I might put Goomba Color on Github soon if you want to send in PRs or things like that.

That would be super duper if you did.

EDIT:

I worked with somebody on freenode.net##workingset and found a change to the bin2s line of base_tools that fixed the build issue. Your forum software doesn't like when I put it in the body of my message, so I've created a text file with the change. Would you mind making the same change and checking whether it builds on your system still? If it does, I'd like to submit the change to the devkitpro people and see what they think.

EDIT 2:

Forgot to attach it. It's there now :) See changes.txt

Last edited by brainard52 (2021-04-28 12:10:18 am)


Attachments:
Attachment Icon test.tgz, Size: 16,384 bytes, Downloads: 28
Attachment Icon changes.txt, Size: 134 bytes, Downloads: 34

Offline

#4 2021-04-28 5:36:18 am

Dwedit
Administrator
From: Chicago
Registered: 2004-12-12
Posts: 1,017
Website

Re: Building Goomba Color on MacOS

My "base_rules" has this line:

bin2s $< | $(AS) -o $(@)

and does not have the line you listed.

My "base_tools" has no reference at all to bin2s.

My file date is Feb 19, 2019.


"We are merely sprites that dance at the beck and call of our button pressing overlord."

Offline

#5 2021-04-28 10:52:35 am

brainard52
Member
Registered: 2021-04-27
Posts: 7

Re: Building Goomba Color on MacOS

I'm seeing that devkitarm-rules was built for my machine on 2020-07-27, gba-tools was built  2018-07-28, and general-tools was built 2020-07-30. It's likely that we just have different toolchain releases. I'm glad that the solution I found was effectively what you have in yours even if it's not defined in the same file. I'm currently able to build Goombacolor 2019-05-04 with the change I made. Until you get the github up and running, how would you like patches to be submitted?

Offline

#6 2021-04-28 11:08:20 am

Dwedit
Administrator
From: Chicago
Registered: 2004-12-12
Posts: 1,017
Website

Re: Building Goomba Color on MacOS


"We are merely sprites that dance at the beck and call of our button pressing overlord."

Offline

#7 2021-04-29 8:35:13 am

brainard52
Member
Registered: 2021-04-27
Posts: 7

Re: Building Goomba Color on MacOS

Dwedit wrote:

Nice! Which license is it under?

Offline

#8 2021-04-29 9:02:18 am

Dwedit
Administrator
From: Chicago
Registered: 2004-12-12
Posts: 1,017
Website

Re: Building Goomba Color on MacOS

I have no idea what license I actually want to use, but the inclusion of MiniLZO makes it GPL2.  The original Goomba code was under a Public Domain license, aside from the MiniLZO library.


"We are merely sprites that dance at the beck and call of our button pressing overlord."

Offline

#9 2021-04-29 2:16:34 pm

brainard52
Member
Registered: 2021-04-27
Posts: 7

Re: Building Goomba Color on MacOS

Dwedit wrote:

I have no idea what license I actually want to use, but the inclusion of MiniLZO makes it GPL2.  The original Goomba code was under a Public Domain license, aside from the MiniLZO library.

Krikzz's GBAIO doesn't seem to have a license file included. I'm interested in adding functionality to the Everdrive X5 to allow for SDCard saves, so I'm going to try and find out what license that's under. Hopefully it's compatible.

Offline

#10 2021-04-29 7:54:32 pm

Dwedit
Administrator
From: Chicago
Registered: 2004-12-12
Posts: 1,017
Website

Re: Building Goomba Color on MacOS

If you're doing something involving the filesystem, I have code sitting around for the GBAMP versions of PocketNES, Goomba Color, and SMSAdvance.  I might also have the build of PocketNES that uses the M3's RAM to store the entire loaded rom file.  Haven't dusted off this code in a while though.

This was back when the M3 and Supercard were the flash cartridges with RAM in them, and everdrive was years and years away.


"We are merely sprites that dance at the beck and call of our button pressing overlord."

Offline

#11 2021-05-03 8:06:28 pm

brainard52
Member
Registered: 2021-04-27
Posts: 7

Re: Building Goomba Color on MacOS

Thanks for being accommodating with my notions haha. I didn't really think about what I was getting into, so I've got a bit of learning to do before I'll be able to make any PRs. I still plan on making some, though.

Offline

Registered users online in this topic: 0, guests: 1
[Bot] claudebot

Board footer

Powered by FluxBB
Modified by Visman