Forums

Sega Master System / Mark III / Game Gear
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats - Credits
Music - Videos - Development - Hacks - Translations - Homebrew

View topic - Problems Assembling Code

Reply to topic
Author Message
  • Joined: 10 May 2005
  • Posts: 91
  • Location: Merry Olde England
Reply with quote
Problems Assembling Code
Post Posted: Sun Sep 17, 2006 3:21 am
I seem to be having some weird problems assembling code with WLA_DX. I would ordinarily take this to their forums, but they seem to have disappeared... I had a search through these forums, but didn't notice anything relevant to my situation. Apologies if this has previously been covered.

I've been busy with other stuff as of late, so haven't been able to do any more SMS coding - but I started to work on a new SMS code today. I made some small modifications to some of my old code, assembled it, then ran it in Mekanix.

The problem is that Mekanix segfaulted as soon as I loaded the ROM:

Quote
Shutting down Allegro due to signal #11
Segmentation fault


I tried assembling unmodified code (which I know to work fine) as well as the Digger Chan release code I used to create the ROM for release - the same thing happens. Curiously, Mekanix *doesn't* crash if I run the stuff I had previously assembled. So that *possibly* rules out Mekanix as the culprit.

My next suspect was WLA DX itself - although it doesn't give any errors when assembling and looks to have no problems. The MD5 sums of the new and old ROM data do differ, though. I'm even using the *exact* copy of WLA DX (v9.3) I compiled and used for my work on Digger Chan. On top of that; the *new* assembled code which crashed Mekanix runs without problem on the MasterGear emulator (as does the old code).

I resorted to compiling and trying the latest version of WLA DX (v9.4a), but that gives the same results. I tried compiling the latest nightly Mekanix code (I'm using the v0.72 "WIP" version right now), but that refuses to compile.

Does anyone have any ideas as to what could be causing this? It's really starting to bug me. I can supply the ROM files which crash Mekanix, should anyone want to take a closer look.
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8198
  • Location: Paris, France
Reply with quote
Post Posted: Sun Sep 17, 2006 12:39 pm
Please post the old and new crashing ROM.
Your WLA-DX might be doing something wrong, but in any cases, MEKA should *NOT* be ever crashing on an incorrect ROM. So this is definitively a bug to take care of in MEKA.
  View user's profile Send private message Visit poster's website
  • Joined: 10 May 2005
  • Posts: 91
  • Location: Merry Olde England
Reply with quote
Post Posted: Sun Sep 17, 2006 1:25 pm
The newly assembled ROM can be found here: http://www.aypok.co.uk/sms/digger_chan-new.sms (the one which crashes Mekanix).
The original ROM can be found here: http://www.aypok.co.uk/sms/digger_chan-old.sms (it's the one I entered into the coding competition).

UPDATE:

After contacting the WLA DX author, WLA DX has been ruled out as the culprit. I did a binary comparison on the ROMs it creates now and the ones it created in the past - the differences seemed to be the checksums and two other bytes:

ROM Offset 0x7FE6 (1 Byte): Day (BCD)
ROM Offset 0x7FE7 (1 Byte): Month (BCD)

Since I had assembled the code on different days, these two bytes would obviously contain different data - meaning that a different checksum is generated. That explains the differing ROMs.

What I have still not figured out is why they crash Mekanix 0.72... I've sort of gotten around the problem by reverting to the v0.70 binary given on the Meka site - that loads the ROMs without a problem.
  View user's profile Send private message Visit poster's website
Reply to topic



Back to the top of this page

Back to SMS Power!