[MEGA DRIVE] ASM68K giving me trouble :(

Discussion in 'Sega Discussion' started by segaloco, Apr 4, 2010.

  1. segaloco

    segaloco Enthusiastic Member

    Joined:
    Jun 25, 2009
    Messages:
    531
    Likes Received:
    3
  2. SONIC3D

    SONIC3D Spirited Member

    Joined:
    Oct 30, 2008
    Messages:
    149
    Likes Received:
    33
    The Z80 assembler you supplied is not working.But the Z80.BIN is already the result of the binary code of Z80.I.So I will bypass how to compile z80 code.If you want to there is other z80 assembler out there.

    The Z80.bin will be binary included by main.asm near the bottom of it.
    The main.asm is not compilable due to the included file end the source code too early.
    You need to modify 2 file to get main.asm compiled.

    In bottom of Main.asm,there is
    1.Modify SEGALOGO.SUB
    Remove the last 2 line from this file or the source code will be ended and "UTIL.H" will not be included.
    2.Modify Util.h
    Because there are subroutine in Util.h that uses undeclared var.It will cause compile error.Although it's not very complicate to solve it perfectly,I prefer removing those unused subsoutine in this file.(UNUSED means unused by main.asm or other including file in main.asm).And same as SEGALOGO.SUB,the last "end" should be removed,too.In case you wanna include more files after "util.h" in "main.asm".

    The only subroutine need to be kept is _JOYGET6.So after removing other subroutines.The file looks like this:

    Now,the main.asm is compilable by using the command line in build.bat or just "ASM68K.EXE MAIN.ASM,MAIN.BIN".

    After that,you can pad the binary code with the command line in build.bat "ROMPAD MAIN.BIN 255 0" to make the ROM alien to 0xFF.And "FIXHEADR MAIN.BIN" fix the genesis checksum in header.

    Now the rom is completely valid.Open it in any emulator.You will get nothing because your code does do nothing.
     
    Last edited: Apr 29, 2010
sonicdude10
Draft saved Draft deleted
Insert every image as a...
  1.  0%

Share This Page