snasm68k sections and alignment

Ask anything your want about Megadrive/Genesis programming.

Moderator: BigEvilCorporation

Post Reply
Pascal
Very interested
Posts: 200
Joined: Wed Nov 29, 2006 11:29 am
Location: Belgium
Contact:

snasm68k sections and alignment

Post by Pascal » Thu May 08, 2008 11:28 am

hello all,

i got a problem with snams68k, i'm working with section and it complains every time i'm trying to align at 256 bytes (or any value other than 2), i get this error

Code: Select all

cart2.asm(76) : Error 03041 : Cannot align to 256 boundary, section is 2 aligned
i tried with cnop 0,256 not better. anyone got a idea ??

please no "use asmx" :p my project is pretty huge and my debugger supports only snasm68k.

thanks

EDIT !

i found the switch SA, that i want to disable

snasm68k /Q sa- /L -O V+,C+,M+,W+,AE+ cart2.asm,demo,demo,demo
snasm68k /Q sa- /P -O V+,C+,M+,W+,AE+ main.lnk, demo.bin

but even with that switch, compiler want to align to the section boundaries :s

TmEE co.(TM)
Very interested
Posts: 2440
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Thu May 08, 2008 12:14 pm

Code: Select all

SNASM68K -P -O OP+,OS+,OW+,OZ+,OAQ+,OSQ+,OMQ+  TMFPLAY.ASM, TMFPLAY.BIN
What I use.... no problems so far

EDIT : that's not useful....
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

Pascal
Very interested
Posts: 200
Joined: Wed Nov 29, 2006 11:29 am
Location: Belgium
Contact:

Post by Pascal » Thu May 08, 2008 12:41 pm

TmEE co.(TM) wrote:

Code: Select all

SNASM68K -P -O OP+,OS+,OW+,OZ+,OAQ+,OSQ+,OMQ+  TMFPLAY.ASM, TMFPLAY.BIN
What I use.... no problems so far

EDIT : that's not useful....
that's the first thing i looked ;)

Sik
Very interested
Posts: 939
Joined: Thu Apr 10, 2008 3:03 pm
Contact:

Post by Sik » Thu May 08, 2008 2:13 pm

Does SNASM68K have its custom debugging format? Otherwise you could use ASM68K, which is exactly the same, except it's the original program :P It uses the same instruction set, the same parameters (except you use a slash instead of a hyphen) and seems to be more stable. Make sure you try the Windows version, not the DOS one :P (the one at my page is the Windows version, yup).

Anyways, no idea :/ And I'm not sure how much I could be able to help here because I don't use linking, simply too complex for me, I leave that to a compiler :P Instead I use my own method for making a ROM from several executables (namely having a separate ASM file that includes the rest :P this also allows me to specify the exact order for the files in the ROM).
Sik is pronounced as "seek", not as "sick".

Pascal
Very interested
Posts: 200
Joined: Wed Nov 29, 2006 11:29 am
Location: Belgium
Contact:

Post by Pascal » Thu May 08, 2008 2:26 pm

no, my debugger rely on how snasm68k is outputing the symbol table, not some kind of elf :p
Last edited by Pascal on Fri May 09, 2008 7:06 am, edited 1 time in total.

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

Post by Chilly Willy » Thu May 08, 2008 9:02 pm

Pascal wrote:no, my debugger rely on how snasm68k is output the symbol table, not some kind of elf :p
Well, asmx is open source. If someone knows how snasm68k outputs that symbol table, it could be added to asmx.

Pascal
Very interested
Posts: 200
Joined: Wed Nov 29, 2006 11:29 am
Location: Belgium
Contact:

Post by Pascal » Fri May 09, 2008 7:00 am

Chilly Willy wrote:
Pascal wrote:no, my debugger rely on how snasm68k is output the symbol table, not some kind of elf :p
Well, asmx is open source. If someone knows how snasm68k outputs that symbol table, it could be added to asmx.
that's the gud point of asmx, but i'd have prefer to spend my time on the code of my game ;)

anyway, asmx rely on unix command line parser. i wasn't able to recompile it :s

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

Post by Chilly Willy » Sat May 10, 2008 6:32 am

I believe you have to compile it with cygwin or mingw when on Windows. It compiles fine in Ubuntu, but you'd expect that. :)

Pascal
Very interested
Posts: 200
Joined: Wed Nov 29, 2006 11:29 am
Location: Belgium
Contact:

Post by Pascal » Sat May 10, 2008 2:36 pm

thanks, i was able to recompile it, if i remove all the command line parsing stuff.

i gonna work on a SN syntax, compatibility :)

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

Post by 8bitwizard » Mon May 12, 2008 12:46 pm

Pascal wrote:thanks, i was able to recompile it, if i remove all the command line parsing stuff.

i gonna work on a SN syntax, compatibility :)
... or you could find source for getopt() ? It can't be that hard.

Post Reply