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 2007-04-06 11:14:57 pm

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

The Goomba Color to GCC port project

This is a snapshot of me trying to convert Goomba Color to the GNU Assembler.
(2:07AM CDT, 4/7/2007)

Contents:
src\source_conversion_tools:
    The hacky tools I made to convert much of the code's syntax
src\source_conversion_tools\labelkiller:
    Labelkiller - Takes in a list of labels, then for each "LDR, STR, ADR" line in the source code which refers to one of those labels, adds a underscore suffix.  This lets me kill off the register reletive labels by replacing them with macros like ldr_ str_ adr_.
src\source_conversion_tools\asmconv2:
    Asmconv2 - Tries to convert ARM SDT-formatted code to GNU-formatted code.  Conversion is not complete.
src\c:
    The C sources for goomba color, unchanged.  Not all code files are used.  (such as the dead-end development of speedhacks)
src\asm:
    The ASM source (ARM SDT) for Goomba Color.  Register Reletive labels were removed with almost no change in the binary.  Labelkiller works wonders.
src\asm\new:
    The output of asmconv2 run on the original source code.

Mainly of interest is the directory "src\asm\new".  It contains my futile attempts at converting the project, generated by a hackish source conversion automation tool I made.  Most of the syntax has been converted completely, but there are still lots of ARM SDT specific labels and directives in the code.

Right now, the error messages from the assembler are very unhelpful, especially considering it's CRASHING immediately after a macro is used!

So here's what needs to be done to convert it to GNU tools:
Fix the asm code, make it build correctly
Change the boot code
Make a linkscript
Make a makefile

And I have no clue how to do linkscripts and makefiles, I really need help.

- Dwedit


Attachments:
Attachment Icon goombacolor_gcc_broken.tar.gz, Size: 237,567 bytes, Downloads: 249

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

Offline

#2 2007-04-07 10:03:22 pm

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

Re: The Goomba Color to GCC port project

Next Try...

Status update: I've solved all assembler errors with the ASM code. In order to resolve deficiencies in Gnu assembler (ADR instruction can't cross files), I had to make one ASM file .includes all the other source code.

Still need to figure out the black magic that is makefiles and getting the damn thing to link.

Still need help: I need to modify the CRT files and possibly the linkscript for these features:
* In multiboot mode (booted from cartridge) or cartridge mode, get the address of the last byte in the binary (in rom), and store it to a variable. Also get the address of the last byte of EWRAM.
* In multiboot mode, remove the sections that do not stay in EWRAM. Also make sure there are no holes (all non-ewram content strictly comes after ewram content in the binary)
* In multiboot mode, move the appended content (initially stored after the end of the MB binary) over to what becomes the last byte of EWRAM. This removes the IWRAM content from EWRAM. Also store a pointer to the location the appended data was copied to.


Attachments:
Attachment Icon goombacolor_gcc_broken2.tar.gz, Size: 345,683 bytes, Downloads: 241

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

Offline

#3 2007-05-13 3:24:46 pm

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

Re: The Goomba Color to GCC port project

Now I'm taking a break, and porting SMSAdvance to GCC.  I've gotten it almost working... Almost in that THE FREAKIN .iwram SECTION IS REPLACED WITH A BUNCH OF ZEROES!!!!  Not good.


Attachments:
Attachment Icon smsadvance-gcc-broken.zip, Size: 215,660 bytes, Downloads: 235

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

Offline

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

Board footer

Powered by FluxBB
Modified by Visman