Jump to content

42bs's Photo


Member Since 4 Mar 2003
OFFLINE Last Active Apr 9 2019 4:23 AM

Posts I've Made

In Topic: C compilers?

Mon Apr 8, 2019 10:46 AM

Take the address you get from end and make sure it is phrase aligned

move.l #end,d0
add.l #8, d0
and.l #$fffffff8, d0

Will leave you with a phrase aligned address in d0




moveq #-8,d0

and.l #end+7,d0


or better (if the assembler can handle it):

move.l #( end+7 )  & ~7,d0


Note: Don't waste cycles on-line you can invest off-line.

In Topic: C compilers?

Sat Apr 6, 2019 1:35 PM

I've compiled the game without -flto and the lives and the bonus it's printed ok. I still have some graphics glitches with Pauline when you finish a screen, also some times the "How high can you get" triggers an address error when I copy the raster colors.


Next thing to do it's to output registers values when an exception it's raised.


I suggest an extra object for this (and other printf-debug info) which you can overlay where ever you want. And simply disable/enable it.

In Topic: C compilers?

Fri Apr 5, 2019 2:17 PM


I also tried the objdump but only got a text saying the file format, no disassembly.


This sounds weird.

In Topic: C compilers?

Fri Apr 5, 2019 1:25 PM

The strings are ascii/utf-8 (I've looked with a disk editor) but I don't know why some times it skips the first character or draw the first char wrong, but when I send it to the pc, the string it's ok.


I've used the alignment attribute in several parts, and it has fixed a lot of issues but still have some weird bugs, also some times I write some code and the game hangs in the intro, add a skunk_print to see if it's running the animation loop and it works.  :mad:


I need to write some code to catch 68000 exceptions.


Can you post the object file?

In Topic: C compilers?

Fri Apr 5, 2019 1:20 PM

Perhaps this may be of some help?  GCC Alignment in structs


Completely different issue. It is a common error people make when coming from 8/16 bit to 32bit systems.

Anyway, here we have byte accesses. Therefore no alignment issue.