Mega Drive dev environment on FreeBSD

Ask anything your want about Megadrive/Genesis programming.

Moderator: BigEvilCorporation

Post Reply
ElBarto
Very interested
Posts: 160
Joined: Wed Dec 13, 2006 10:29 am
Contact:

Mega Drive dev environment on FreeBSD

Post by ElBarto » Fri Oct 19, 2007 2:00 pm

Hello all,

Yesterday I was lazy to switch computer to do a little bit of dev on Mega Drive so I start to setup a dev environment on my FreeBSD desktop.
I've compiled the FreeBSD port m68k-rtems-gcc and it works fine to produce code for the megadrive (using Stef .ld file from his dev kit), I found a Z80 assembler too (z80-asm from Brainsoft).
I'm still searching a 68k assembler cause I totally dislike the gcc-asm syntax, is anyone is using one for FreeBSD or Linux ?

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Fri Oct 19, 2007 5:56 pm

Most folks here use asmx. It'll not only do 68000 using "normal" syntax, it'll do the Z80 for you too! :D

http://xi6.com/projects/asmx/

ElBarto
Very interested
Posts: 160
Joined: Wed Dec 13, 2006 10:29 am
Contact:

Post by ElBarto » Fri Oct 19, 2007 7:00 pm

OK, I'll test this tomorow.
Thanks.

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Fri Oct 19, 2007 11:09 pm

No problem. Just for reference, I'm using it in 64 bit Fedora 7 (linux).

8bitwizard
Very interested
Posts: 159
Joined: Sat Feb 24, 2007 11:35 pm
Location: San Antonio, TX

Re: Mega Drive dev environment on FreeBSD

Post by 8bitwizard » Sat Oct 20, 2007 4:30 am

ElBarto wrote:Hello all,

Yesterday I was lazy to switch computer to do a little bit of dev on Mega Drive so I start to setup a dev environment on my FreeBSD desktop.
I've compiled the FreeBSD port m68k-rtems-gcc and it works fine to produce code for the megadrive (using Stef .ld file from his dev kit), I found a Z80 assembler too (z80-asm from Brainsoft).
I'm still searching a 68k assembler cause I totally dislike the gcc-asm syntax, is anyone is using one for FreeBSD or Linux ?
You can use the "regular" motorola syntax as long as you put the % sign in front of register names and use the pipe for comments. I hate the gnu mnemonics too, but this was good enough for me when doing asm for GCC.

Code: Select all

    move.b  0xA10001, %d0          | read hardware version
    andi.b  #0x0F, %d0             | TMSS present if low 4 bits != 0
    beq.b   1f	                  | branch if no TMSS
    move.l  #0x53454741, 0xA14000  | move "SEGA" to the TMSS register
1:
There's also some special mode that makes it compatible with some old assembler using regular motorola mnemonics, but it also changes all the pseudo-ops too.

Post Reply