#45667 - arundel - Mon Jun 13, 2005 4:41 pm
Hi there.
I coded a little app in x86 asm that ports the xboo functionality of Martin Korth's program (16 bit DOS flat binary) to Unix. Atm the software natively assembles under FreeBSD, but it supports Linux.
Unlike the great xboo communicator program (jep. I used it a few times and it's fantastic) for Windows/Linux it's a console based app. Also it is open source.
I have only been able to test the software natively under FreeBSD. The Linux version also builds fine and should work all right, but I could only test it using the linux emulation layer that ships with FreeBSD. So I haven't been able to test the software under native Linux envirements.
If you are using Linux or any kind of BSD and would like to test a new app that uploads a ROM to the AGB's EWRAM using it's multiboot routine your're welcome to use it. I don't think the software will work under other Unix flavours (Solaris, True Unix, etc.), because it makes use of a few syscalls. Unfortunately not all the systemcalls have the same ID under every unix system. Not even if that OS sticks to the Posix convention(s).
The software does not yet support Single/Double-BurstBoot. However I've written parts of the arm-bootloader and some lines of x86 code that will communicate with the bootloader through GENERAL_PURPOSE_MODE (that's also the way xboo does it). So this feature should be implemented in the next version.
I did not intended to actually release this app. That's why the code and especially the comments are not very readable atm. Also - as I saif before - the code is written in 32bit x86 assembly language using the Intel Syntax (or better yet nasm syntax). So you need to know assembly if you want to understand the code.
The current release is RELEASE 0.5. The source code can be found here:
http://arundel.blog.de/main/index.php/arundel?tag=gbadev
To build the software follow the instructions:
1. extract the archive
2. cd into the gbacopy_0.5 dir
3. create a file called bootloader `touch bootloader`. Later releases will come with an actual bootloader, but for now a dummy file will do the trick.
4. Assemble the code: `nasm -f elf gbacopy.asm && ld -o gbacopy gbacopy.o` (if you want to you can strip away the symbols making it impossible to debug the program: `strip -s gbacopy`)
If you want to assemble the code so you can easily debug it using gdb or ddd you can do so like this: `nasm -w+number-overflow -w+orphan-labels -w+macro-params -f elf -F stabs -g gbacopy.asm && ld -o gbacopy gbacopy.o`
IMPORTANT:
If you want to build the program in order to work under Linux you'll have to define a variable LINUX. Do so by adding the following to the command line (only `nasm`. `ld` doesn't need it.): -DLINUX
(Unfortunately I had no luck compiling the app with YASM. The project is quite new and forked from a nasm code snapshot. The idea of having modules instead of a monolithic executable sounds interesting. But yasm seems to have problems including binaries directly into the code using the %incbin statement. But maybe somebody actually manages to use YASM. It defenately looks promising.)
OK. Thx a lot for your help. Please report any bugs or change request you want me to know about. (e-mail addrss should be somewhere on my site)
Cheers.
_________________
http://www.nausicaa.net
I coded a little app in x86 asm that ports the xboo functionality of Martin Korth's program (16 bit DOS flat binary) to Unix. Atm the software natively assembles under FreeBSD, but it supports Linux.
Unlike the great xboo communicator program (jep. I used it a few times and it's fantastic) for Windows/Linux it's a console based app. Also it is open source.
I have only been able to test the software natively under FreeBSD. The Linux version also builds fine and should work all right, but I could only test it using the linux emulation layer that ships with FreeBSD. So I haven't been able to test the software under native Linux envirements.
If you are using Linux or any kind of BSD and would like to test a new app that uploads a ROM to the AGB's EWRAM using it's multiboot routine your're welcome to use it. I don't think the software will work under other Unix flavours (Solaris, True Unix, etc.), because it makes use of a few syscalls. Unfortunately not all the systemcalls have the same ID under every unix system. Not even if that OS sticks to the Posix convention(s).
The software does not yet support Single/Double-BurstBoot. However I've written parts of the arm-bootloader and some lines of x86 code that will communicate with the bootloader through GENERAL_PURPOSE_MODE (that's also the way xboo does it). So this feature should be implemented in the next version.
I did not intended to actually release this app. That's why the code and especially the comments are not very readable atm. Also - as I saif before - the code is written in 32bit x86 assembly language using the Intel Syntax (or better yet nasm syntax). So you need to know assembly if you want to understand the code.
The current release is RELEASE 0.5. The source code can be found here:
http://arundel.blog.de/main/index.php/arundel?tag=gbadev
To build the software follow the instructions:
1. extract the archive
2. cd into the gbacopy_0.5 dir
3. create a file called bootloader `touch bootloader`. Later releases will come with an actual bootloader, but for now a dummy file will do the trick.
4. Assemble the code: `nasm -f elf gbacopy.asm && ld -o gbacopy gbacopy.o` (if you want to you can strip away the symbols making it impossible to debug the program: `strip -s gbacopy`)
If you want to assemble the code so you can easily debug it using gdb or ddd you can do so like this: `nasm -w+number-overflow -w+orphan-labels -w+macro-params -f elf -F stabs -g gbacopy.asm && ld -o gbacopy gbacopy.o`
IMPORTANT:
If you want to build the program in order to work under Linux you'll have to define a variable LINUX. Do so by adding the following to the command line (only `nasm`. `ld` doesn't need it.): -DLINUX
(Unfortunately I had no luck compiling the app with YASM. The project is quite new and forked from a nasm code snapshot. The idea of having modules instead of a monolithic executable sounds interesting. But yasm seems to have problems including binaries directly into the code using the %incbin statement. But maybe somebody actually manages to use YASM. It defenately looks promising.)
OK. Thx a lot for your help. Please report any bugs or change request you want me to know about. (e-mail addrss should be somewhere on my site)
Cheers.
_________________
http://www.nausicaa.net