don't click here

Basic Questions & Answers thread

Discussion in 'Engineering & Reverse Engineering' started by Tweaker, May 29, 2008.

  1. muteKi

    muteKi

    Fuck it Member
    7,852
    131
    43
    Try working with BasiEgaXorz or whatever it's called. That might help get you started, at least.
     
  2. filmzombie

    filmzombie

    The real spindash... Member
    155
    0
    0
    England- The Land of Tea
    Sonic Synthesis
    FUCKING HELL!!!

    http://uk.youtube.com/watch?v=FDAJpXf9xyI&...feature=channel


    THIS IS WHY YOU DO NOT LEAVE AMATEURS TO DO ANYTHING BY THEMSELVES!!! FOR THE PAST THREE WEEKS I've BEEN TRYING TO DO THIS THROUGH WINRAR!!!!!




    ....these youtube videos are actually very effective. I suggest doing more of these, perhaps as video responses to people's queries if all else fails.




    ...and yes you may all laugh at my stupidity now.
     
  3. Sik

    Sik

    Sik is pronounced as "seek", not as "sick". Tech Member
    6,718
    1
    0
    being an asshole =P
    Um, but bear into mind that he won't get much chances to understand the hardware using BasiEgaXorz. If he wants to do that, it might not be a good idea.

    Also McGuirk, I can't help much without knowing the source code you're trying to build =P
     


  4. lol



    I just wonder why soned2 doesn't COME with the already joint ghz.bin. I hate having to always join them every single time -._-.
     
  5. nineko

    nineko

    I am the Holy Cat Tech Member
    6,316
    489
    63
    italy
    My (ignorant) guess is that SonED2, just like all the disassemblies on Sonic Retro, doesn't come bundled with the files to avoid copyright infringment, as they're technically part of the original Sonic 1. When you release your hack, it's YOUR problem if you're breaking a copyright, not Stealth's.
     
  6. McGuirk

    McGuirk

    The Egg-Man Cometh. Member
    hello.asm:
    Code (ASM):
    1. ; hello.asm
    2.  
    3.         LIST    OFF
    4.         INCLUDE    gen.h
    5.         LIST    ON
    6.  
    7. ;-----------------------------------------------------------------------
    8. ;    exception vectors
    9. ;-----------------------------------------------------------------------
    10.  
    11.  
    12.     DC.L    $FFFFFE00    ; startup SP
    13.     DC.L    START        ; startup PC
    14.  
    15.     DS.L    7,RTE        ; bus,addr,illegal,divzero,CHK,TRAPV,priv
    16.     DC.L    RTE        ; trace
    17.     DC.L    RTE        ; line 1010 emulator
    18.     DC.L    RTE        ; line 1111 emulator
    19.     DS.L    4,RTE        ; unassigned/uninitialized
    20.     DS.L    8,RTE        ; unassigned
    21.     DC.L    RTE        ; spurious interrupt
    22.     DC.L    RTE        ; interrupt level 1 (lowest priority)
    23.     DC.L    ExtInt        ; interrupt level 2 = external interrupt
    24.     DC.L    RTE        ; interrupt level 3
    25.     DC.L    HSync        ; interrupt level 4 = H-sync interrupt
    26.     DC.L    RTE        ; interrupt level 5
    27.     DC.L    VSync        ; interrupt level 6 = V-sync interrupt
    28.     DC.L    RTE        ; interrupt level 7 (highest priority)
    29.     DS.L    16,RTE        ; TRAP instruction vectors
    30.     DS.L    16,RTE        ; unassigned
    31.  
    32. ;-----------------------------------------------------------------------
    33. ;    cartridge info header
    34. ;-----------------------------------------------------------------------
    35.  
    36.     DC.B    "SEGA GENESIS    "    ; must start with "SEGA"
    37.     DC.B    "©---- "        ; copyright
    38.      DC.B    "2006.DEC"        ; date
    39.     DC.B    "HELLO WORLD                                     " ; cart name
    40.     DC.B    "HELLO WORLD                                     " ; cart name (alt. language)
    41.     DC.B    "GM MK-0000 -00"    ; program type / catalog number
    42.     DC.W    $0000            ; ROM checksum
    43.     DC.B    "J               "    ; hardware used
    44.     DC.L    $00000000        ; start of ROM
    45.     DC.L    $003FFFFF        ; end of ROM
    46.     DC.L    $00FF0000,$00FFFFFF    ; RAM start/end
    47.     DC.B    "            "        ; backup RAM info
    48.     DC.B    "            "        ; modem info
    49.     DC.B    "                                        " ; comment
    50.     DC.B    "JUE             "    ; regions allowed
    51.  
    52. ;-----------------------------------------------------------------------
    53. ;    generic exception handler
    54. ;-----------------------------------------------------------------------
    55.  
    56. ExtInt
    57. HSync
    58. VSync
    59. RTE    RTE
    60.  
    61. ;-----------------------------------------------------------------------
    62. ;    main entry point
    63. ;-----------------------------------------------------------------------
    64.  
    65. START
    66.         LEA    Regs1(PC),A5    ; initialize registers
    67.         MOVEM.L    (A5)+,D5-D7/A0-A4
    68.  
    69.         ; initialize TMSS
    70.         MOVE.B    (A1),D0        ; A10001 test the hardware version
    71.         ANDI.B    #$0F,D0
    72.         BEQ.B    @1        ; branch if no TMSS
    73.  
    74.         MOVE.L    #'SEGA',(A2)    ; A14000 disable TMSS
    75.  
    76. @1        MOVE.W    (A4),D0        ; C00004 read VDP status (interrupt acknowledge?)
    77.  
    78.         ; initialize USP and stuff
    79.         MOVEQ    #0,D0        ; D0 = 0
    80.         MOVEA.L    D0,A6        ; A6 = 0
    81.         MOVE    A6,USP        ; USP = 0
    82.  
    83.         MOVEQ    #24-1,D1    ; length of video initialization block
    84. @2        MOVE.B    (A5)+,D5    ; get next video control byte
    85.         MOVE.W    D5,(A4)        ; C00004 send write register command to VDP
    86.         ADD.W    D7,D5        ; point to next VDP register
    87.         DBRA    D1,@2        ; loop for rest of block
    88.  
    89.         ; DMA is now set up for 65535-byte fill of VRAM, let's do it
    90.         MOVE.L    #$40000080,(A4)    ; C00004 = VRAM write to $0000 (what is the 80 bit for?)
    91.         MOVE.W    D0,(A3)        ; C00000 = write zero to VRAM (starts DMA fill)
    92.  
    93. @3        MOVE.W    (A4),D4        ; C00004 read VDP status
    94.         BTST    #1,D4        ; test DMA busy flag
    95.         BNE.B    @3        ; loop while DMA busy
    96.  
    97.         ; initialize CRAM
    98.         MOVE.L    #$81048F02,(A4)    ; C00004 reg 1 = 0x04, reg 15 = 0x02: blank, auto-increment=2
    99.         MOVE.L    #$C0000000,(A4)    ; C00004 write CRAM address $0000
    100.         MOVEQ    #32-1,D3    ; loop for 32 CRAM registers
    101. @4        MOVE.L    D0,(A3)        ; C00000 clear CRAM register
    102.         DBRA    D3,@4
    103.  
    104.         ; initialize VSRAM
    105.         MOVE.L    #$40000010,(A4)    ; C00004 VSRAM write address $0000
    106.         MOVEQ    #20-1,D4    ; loop for 20 VSRAM registers
    107. @5        MOVE.L    D0,(A3)        ; C00000 clear VSRAM register
    108.         DBRA    D4,@5
    109.  
    110.         ; initialize PSG
    111.         MOVEQ    #4-1,D5        ; loop for 4 PSG registers
    112. @6        MOVE.B    (A5)+,$0011(A3)    ; C00011 copy PSG initialization commands
    113.         DBRA    D5,@6
    114.  
    115.         LEA    Regs2(PC),A1    ; initialize registers
    116.         MOVEM.L    (A1)+,D4-D7/A2-A6
    117.  
    118.         BSR.B    InitCRAM    ; set up colors in CRAM
    119.  
    120.         MOVE.L    #$4C200000,(A4)    ; C00004 VRAM write to $0C20
    121. @7        MOVE.L    (A1)+,(A5)    ; C00000 write next longword of charset to VDP
    122.         DBRA    D6,@7        ; loop until done
    123.  
    124.         LEA    HelloMsg(PC),A1
    125.         BSR.B    PrintMsg    ; copy startup message to screen
    126.  
    127.         MOVE.W    #$8144,(A4)    ; C00004 reg 1 = 0x44 unblank display
    128.  
    129.         MOVE.W    #60,D0
    130.         BSR.B    Delay        ; delay about 3 seconds
    131.  
    132. ;        MOVE.W    #$8104,(A4)    ; C00004 reg 1 = 0x04 blank display
    133.  
    134.     BRA.B    *
    135.  
    136. ;-----------------------------------------------------------------------
    137.  
    138. Delay        MOVE.W    #$95CE,D1    ; delay a long time (about 1/20 sec?)
    139. @1        DBRA    D1,@1
    140.         DBRA    D0,Delay
    141.         RTS
    142.  
    143. ;-----------------------------------------------------------------------
    144. ; set up colors in CRAM
    145.  
    146. InitCRAM
    147.         MOVE.W    (A2)+,D0        ; get length word
    148.         MOVE.L    #$C0020000,(A4)        ; C00004 CRAM write address = $0002
    149. @1        MOVE.W    (A2)+,(A5)        ; C00000 write next word to video
    150.         DBRA    D0,@1            ; loop until done
    151.         RTS
    152.  
    153.         ; CRAM initialization
    154. CRAM_tab
    155.         DC.W    (CRAM_end-CRAM_tab)/2-2    ; number of entries - 1
    156.         DC.W    $0EEE,$0EE8
    157. CRAM_end
    158.  
    159. ;-----------------------------------------------------------------------
    160. ; copy startup message to screen
    161.  
    162. PrintMsg    MOVE.L    D5,(A4)            ; C00004 write next character to VDP
    163. @1        MOVEQ    #0,D1            ; clear high byte of word
    164.         MOVE.B    (A1)+,D1        ; get next byte
    165.         BMI.B    @3            ; branch if high bit set
    166.         BNE.B    @2            ; store byte if not null
    167.         RTS                ; exit if null
    168.  
    169. @2        MOVE.W    D1,(A5)            ; C00000 store next word of name data
    170.         BRA.B    @1
    171.  
    172. @3        ADDI.L    #$01000000,D5        ; offset VRAM address by $0100 to skip a line
    173.         BRA.B    PrintMsg
    174.  
    175.         ; startup message
    176.  
    177. HelloMsg    DC.B    "hello "
    178.         DC.B    $7C,$7D,$7E,$7F    ; "SEGA" logo characters
    179.         DC.B    " world"
    180.         DC.B    $7B        ; "."
    181.         DC.B    0
    182.  
    183.         EVEN
    184.  
    185. ;-----------------------------------------------------------------------
    186.  
    187. Regs1        DC.L    $00008000    ; D5 = VDP register 0 write command
    188.         DC.L    0        ; D6 = unused
    189.         DC.L    $00000100    ; D7 = video register offset
    190.         DC.L    0        ; A0 = unused
    191.         DC.L    HW_Version    ; A1 = hardware version register
    192.         DC.L    TMSS_reg    ; A2 = TMSS register
    193.         DC.L    VDP_data    ; A3 = VDP data
    194.         DC.L    VDP_ctrl    ; A4 = VDP control / status
    195.                     ; A5 = pointer to the following data:
    196.  
    197.         ; VDP register initialization (24 bytes)
    198.         DC.B    $04    ; reg  0 = mode register 1: no H interrupt
    199.         DC.B    $14    ; reg  1 = mode register 2: blanked, no V interrupt, DMA enable
    200.         DC.B    $30    ; reg  2 = name table base for scroll A: $C000
    201.         DC.B    $3C    ; reg  3 = name table base for window:   $F000
    202.         DC.B    $07    ; reg  4 = name table base for scroll B: $E000
    203.         DC.B    $6C    ; reg  5 = sprite attribute table base: $D800
    204.         DC.B    $00    ; reg  6 = unused register: $00
    205.         DC.B    $00    ; reg  7 = background color: $00
    206.         DC.B    $00    ; reg  8 = unused register: $00
    207.         DC.B    $00    ; reg  9 = unused register: $00
    208.         DC.B    $FF    ; reg 10 = H interrupt register: $FF (esentially off)
    209.         DC.B    $00    ; reg 11 = mode register 3: disable ext int, full H/V scroll
    210.         DC.B    $81    ; reg 12 = mode register 4: 40 cell horizontal mode, no interlace
    211.         DC.B    $37    ; reg 13 = H scroll table base: $FC00
    212.         DC.B    $00    ; reg 14 = unused register: $00
    213.         DC.B    $01    ; reg 15 = auto increment: $01
    214.         DC.B    $01    ; reg 16 = scroll size: V=32 cell, H=64 cell
    215.         DC.B    $00    ; reg 17 = window H position: $00
    216.         DC.B    $00    ; reg 18 = window V position: $00
    217.         DC.B    $FF    ; reg 19 = DMA length count low:   $00FF
    218.         DC.B    $FF    ; reg 20 = DMA length count high:  $FFxx
    219.         DC.B    $00    ; reg 21 = DMA source address low: $xxxx00
    220.         DC.B    $00    ; reg 22 = DMA source address mid: $xx00xx
    221.         DC.B    $80    ; reg 23 = DMA source address high: VRAM fill, addr = $00xxxx
    222.  
    223.         ; PSG initialization: set all channels to minimum volume
    224.         DC.B    $9F,$BF,$DF,$FF
    225.  
    226. ;-----------------------------------------------------------------------
    227.  
    228. Regs2        DC.L    0        ; D4 = unused
    229.         DC.L    $45940003    ; D5 = VRAM write to middle of screen, addr = $C594
    230.         DC.L    FontSize/4-1    ; D6 = size of charset data
    231.         DC.L    0        ; D7 = unused
    232.         DC.L    CRAM_tab    ; A2 = CRAM table
    233.         DC.L    0        ; A3 = unused
    234.         DC.L    VDP_ctrl    ; A4 = VDP control / status
    235.         DC.L    VDP_data    ; A5 = VDP data
    236.         DC.L    0        ; A6 = unused
    237.                     ; A1 = pointer to the following data:
    238.  
    239.         ; pattern table initialization
    240. Font        HEX    01111100 11000110 11000110 11000110 ; A
    241.         HEX    11111110 11000110 11000110 00000000
    242.         HEX    11111100 11000110 11000110 11111100 ; B
    243.         HEX    11000110 11000110 11111100 00000000
    244.         HEX    11111110 11000110 11000110 11000000 ; C
    245.         HEX    11000110 11000110 11111110 00000000
    246.         HEX    11111100 11000110 11000110 11000110 ; D
    247.         HEX    11000110 11000110 11111100 00000000
    248.         HEX    11111110 11000000 11000000 11111100 ; E
    249.         HEX    11000000 11000000 11111110 00000000
    250.         HEX    11111110 11000000 11000000 11111100 ; F
    251.         HEX    11000000 11000000 11000000 00000000
    252.         HEX    11111110 11000110 11000000 11001110 ; G
    253.         HEX    11000110 11000110 11111110 00000000
    254.         HEX    11000110 11000110 11000110 11111110 ; H
    255.         HEX    11000110 11000110 11000110 00000000
    256.         HEX    00111000 00111000 00111000 00111000 ; I
    257.         HEX    00111000 00111000 00111000 00000000
    258.         HEX    00000110 00000110 00000110 00000110 ; J
    259.         HEX    00000110 01100110 01111110 00000000
    260.         HEX    11000110 11001100 11111000 11111000 ; K
    261.         HEX    11001100 11000110 11000110 00000000
    262.         HEX    01100000 01100000 01100000 01100000 ; L
    263.         HEX    01100000 01100000 01111110 00000000
    264.         HEX    11000110 11101110 11111110 11010110 ; M
    265.         HEX    11000110 11000110 11000110 00000000
    266.         HEX    11000110 11100110 11110110 11011110 ; N
    267.         HEX    11001110 11000110 11000110 00000000
    268.         HEX    11111110 11000110 11000110 11000110 ; O
    269.         HEX    11000110 11000110 11111110 00000000
    270.         HEX    11111110 11000110 11000110 11111110 ; P
    271.         HEX    11000000 11000000 11000000 00000000
    272.         HEX    11111110 11000110 11000110 11000110 ; Q
    273.         HEX    11001110 11001110 11111110 00000000
    274.         HEX    11111110 11000110 11000110 11111100 ; R
    275.         HEX    11000110 11000110 11000110 00000000
    276.         HEX    11111110 11000110 11000000 11111110 ; S
    277.         HEX    00000110 11000110 11111110 00000000
    278.         HEX    11111110 00111000 00111000 00111000 ; T
    279.         HEX    00111000 00111000 00111000 00000000
    280.         HEX    11000110 11000110 11000110 11000110 ; U
    281.         HEX    11000110 11000110 11111110 00000000
    282.         HEX    11000110 11000110 11000110 11000110 ; V
    283.         HEX    01101100 00111000 00010000 00000000
    284.         HEX    11000110 11000110 11000110 11010110 ; W
    285.         HEX    11111110 11101110 11000110 00000000
    286.         HEX    11000110 11000110 11101110 01111100 ; X
    287.         HEX    11101110 11000110 11000110 00000000
    288.         HEX    11000110 11000110 11000110 01101100 ; Y
    289.         HEX    00111000 00111000 00111000 00000000
    290.         HEX    11111110 00001110 00011100 00111000 ; Z
    291.         HEX    01110000 11100000 11111110 00000000
    292.         HEX    00000000 00000000 00000000 00000000 ; 7B = .
    293.         HEX    00000000 01100000 01100000 00000000
    294.         HEX    02222200 22000220 22000000 02222200 ; 7C = S
    295.         HEX    00000220 22000220 02222200 00000000
    296.         HEX    02222220 22000000 22000000 22222200 ; 7D = E
    297.         HEX    22000000 22000000 02222220 00000000
    298.         HEX    02222200 22000220 22000000 22002220 ; 7E = G
    299.         HEX    22000220 22000220 02222220 00000000
    300.         HEX    00022000 00222200 00222200 02200220 ; 7F = A
    301.         HEX    02200220 22000022 22022222 00000000
    302. FontSize = * - Font
    303.  
    304.         END    0
    305.  

    gen.h
    Code (ASM):
    1. ; Sega Genesis/Megadrive I/O addresses
    2. ;-----------------------------------------------------------------------
    3. ;        68K memory map:
    4. ;-----------------------------------------------------------------------
    5. ;    000000 - 3FFFFF = ROM cartridge
    6. ;    400000 - 7FFFFF = alternate ROM space
    7. ;    800000 - 9FFFFF = reserved (used by 32X?)
    8. ;    A00000          = Z-80 access
    9. ;    A10000          = I/O
    10. ;    A11000          = control
    11. ;    A12000          = sega CD gate array
    12. ;    A13000          = address space for /TIME cartridge pin
    13. ;    C00000 - DFFFFF = VDP
    14. ;    FF0000 - FFFFFF = work RAM
    15.  
    16. ;-----------------------------------------------------------------------
    17. ;        $A000xx = Z80 area
    18. ;        NOTE: no I/O ports are mapped in Z80 slave mode
    19. ;-----------------------------------------------------------------------
    20.  
    21. Z_base       EQU    $A00000    ; Z80 address window base, add to the values below from 68K
    22. Z_sndRAM   EQU    $0000    ; Z80 sound RAM at 0000-1FFF
    23. Z_audio       EQU    $4000    ; YM2612 chip at 4000-4003
    24. Z_audio_A0   EQU    $4000    ; YM2612 A0
    25. Z_audio_D0   EQU    $4001    ; YM2612 D0
    26. Z_audio_A1   EQU    $4002    ; YM2612 A1
    27. Z_audio_D1   EQU    $4003    ; YM2612 D1
    28. Z_bank       EQU    $6000    ; bank select register
    29. Z_VDP       EQU    $7F00    ; 7F00/7F04/7F08, but useless in VDP mode 5
    30. Z_PSG       EQU    $7F11    ; 76489 PSG sound chip
    31. Z_68K       EQU    $8000    ; 8000-FFFF = window to 68000 memory bank
    32.  
    33. ;-----------------------------------------------------------------------
    34. ;        $A100xx = I/O area (all are byte registers)
    35. ;-----------------------------------------------------------------------
    36.  
    37. HW_version   EQU    $A10001    ; hardware version in low nibble
    38.                 ; bit 6 is PAL (50Hz) if set, NTSC (60Hz) if clear
    39.                 ; region flags in bits 7 and 6:
    40.                 ;         USA NTSC = $80
    41.                 ;         Asia PAL = $C0
    42.                 ;         Japan NTSC = $00
    43.                 ;         Europe PAL = $C0
    44. P_data_1   EQU    $A10003    ; data (left controller)
    45. P_data_2   EQU    $A10005    ; data (right controller)
    46. P_data_3   EQU    $A10007    ; data (expansion port)
    47. P_control_1   EQU    $A10009    ; control (L)
    48. P_control_2   EQU    $A1000B    ; control ®
    49. P_control_3   EQU    $A1000D    ; control (exp)
    50. P_TxData_1   EQU    $A1000F    ; TxData (L)
    51. P_RxData_1   EQU    $A10011    ; RxData (L)
    52. P_SCtrl_1   EQU    $A10013    ; S-Ctrl (L)
    53. P_TxData_2   EQU    $A10015    ; TxData ®
    54. P_RxData_2   EQU    $A10017    ; RxData ®
    55. P_SCtrl_2   EQU    $A10019    ; S-Ctrl ®
    56. P_TxData_3   EQU    $A1001B    ; TxData (exp)
    57. P_RxData_3   EQU    $A1001D    ; RxData (exp)
    58. P_SCtrl_3   EQU    $A1001F    ; S-Ctrl (exp)
    59.  
    60. ;-----------------------------------------------------------------------
    61. ;        $A110xx = Control area
    62. ;-----------------------------------------------------------------------
    63.  
    64. ;        EQU    $A11000    ; memory mode (enables DRAM mode)
    65. Z_busreq   EQU    $A11100    ; Z80 busreq (R/W)
    66. Z_reset       EQU    $A11200    ; Z80 reset
    67. TMSS_reg   EQU    $A14000    ; (long) must store 'SEGA' if not version 0 hardware
    68. ;        EQU    $A14101    ; cartridge control register (byte) - used by boot ROM only
    69.                 ; bit 0 = 0 disables cartridge ROM, = 1 enables cartridge ROM
    70.  
    71. ;-----------------------------------------------------------------------
    72. ;        $C000xx = VDP area
    73. ;-----------------------------------------------------------------------
    74.  
    75. VDP_data   EQU    $C00000    ; VDP data, R/W word or longword access only
    76. VDP_ctrl   EQU    $C00004    ; VDP control, word or longword writes only
    77. VDP_stat   EQU    $C00004 ; VDP status
    78. ;  0xxx000x = VRAM  read (video RAM)
    79. ;  0xxx001x = VSRAM read (vertical scroll RAM)
    80. ;  0xxx002x = CRAM  read (color RAM)
    81. ;  4xxx000x = VRAM  write
    82. ;  4xxx001x = VSRAM write
    83. ;  8xyy     = register write
    84. ;  8xyy8xyy = double register write (high word first)
    85. ;  Cxxx     = CRAM write (this form may not work)
    86. ;  Cxxx000x = CRAM write with A14, A15
    87. VDP_HVctr   EQU    $C00008    ; VDP HV counter (even/high is Vert, odd/low is Horiz)
    88. PSG       EQU    $C00011    ; 76489 PSG sound chip, byte access only
    89.  

    build errors:
    Code (Text):
    1. SN 68k version 2.53
    2.  
    3. HELLO.ASM(3) : Error : Unexpected characters at end of line
    4.  list off
    5. HELLO.ASM(5) : Error : Unexpected characters at end of line
    6.  list on
    7. HELLO.ASM(15) : Error : Unexpected characters at end of line
    8.  ds.l 7,rte
    9. HELLO.ASM(19) : Error : Unexpected characters at end of line
    10.  ds.l 4,rte
    11. HELLO.ASM(20) : Error : Unexpected characters at end of line
    12.  ds.l 8,rte
    13. HELLO.ASM(29) : Error : Unexpected characters at end of line
    14.  ds.l 16,rte
    15. HELLO.ASM(30) : Error : Unexpected characters at end of line
    16.  ds.l 16,rte
    17. HELLO.ASM(81) : Error : Bad size on opcode
    18.  move a6,usp
    19. Errors during pass 1 - pass 2 aborted
    20. Assembly completed.
    21. 8 error(s) from 430 lines in 0.0 seconds
    22.  
    I can fix the list off/on probelsm by just putting gen.h inside of hello.asm, but all of these "Unexpected characters at end of line" seems to suggest that there is a bigger overall problem. Oh, and that "move a6,usp" can be fixed by changing to "move.l a6,usp". I think I'm learning, but posted in vanilla form in case my learning is going bad;P

    Those vector problems I'm not sure about. I can't figure out what the DS mnemonic is for. It's not listed under any references that I can find, and Sonic 2 uses dc for its vectors.
     
  7. Stealth

    Stealth

    Tech Member
    594
    30
    28
    Sonic Mania, HCGE, Sonic Megamix, SonED2, [...]
    "dc" declares the listed constants. "ds" reserves space the size of the suffix times the number in the parameter. The "ds" syntax in the example seems to be assembler-specific, and it's filling that space with the value of the second parameter (whereas the standard doesn't have a second parameter).

    Replace all instances of "ds.l x,y" with x instances of the line "dc.l y", and after having specified a size on the move to usp and getting rid of the "LIST" directive (also assembler-specific), any assembler should accept it
     
  8. McGuirk

    McGuirk

    The Egg-Man Cometh. Member
    Awesome and thanks. It builds.

    However, all is not well.

    Still no display. Here's a few things:

    The Title that Gens Displays at on the window titlebar is not right, something along the lines of "E NsKu"

    In the prebuilt version, the VDP Debug on Gens KMod showed the font tiles loaded, this one does not. The VDP's registers have data in them, however.

    There was this compile time warning:
    HELLO.ASM(316) : Warning : Forward reference to redefinable symbol

    Any ideas? Perhaps something to do with the checksum?

    I'm sorry to pester for so much help, but if I can get this working, then I can do much learning by testing with this program.
     
  9. Stealth

    Stealth

    Tech Member
    594
    30
    28
    Sonic Mania, HCGE, Sonic Megamix, SonED2, [...]
    The titlebar is displaying garbage because the header in the assembled ROM isn't correct (there is other data where it expects the game name to be). What probably happened is that you didn't insert the correct number of "dc.l y" lines when you prelaced the "ds.l x,y". You should, for example, replace this:

    ds.l 7, RTE

    with this:

    dc.l RTE
    dc.l RTE
    dc.l RTE
    dc.l RTE
    dc.l RTE
    dc.l RTE
    dc.l RTE

    That could explain all of your current problems. You should have 64 vectors listed, and they also have to be in the correct order (The "VSync" pointer should be entry $1A (26) in the vector table, for example)
     
  10. McGuirk

    McGuirk

    The Egg-Man Cometh. Member
    OH.

    Thanks, I was wondering how that would work otherwise.

    Slight issue.

    Here's what I have:
    Code (ASM):
    1. DC.L    $FFFFFE00   ; startup SP
    2.     DC.L    START       ; startup PC
    3.  
    4.     DC.L    RTE     ; bus,addr,illegal,divzero,CHK,TRAPV,priv
    5.     DC.L    RTE
    6.     DC.L    RTE
    7.     DC.L    RTE
    8.     DC.L    RTE
    9.     DC.L    RTE
    10.     DC.L    RTE     ; 7
    11.  
    12.     DC.L    RTE     ; trace
    13.     DC.L    RTE     ; line 1010 emulator
    14.     DC.L    RTE     ; line 1111 emulator
    15.  
    16.     DC.L    RTE     ; unassigned/uninitialized
    17.     DC.L    RTE
    18.     DC.L    RTE
    19.     DC.L    RTE     ; 4
    20.  
    21.     DC.L    RTE     ; unassigned
    22.     DC.L    RTE
    23.     DC.L    RTE
    24.     DC.L    RTE
    25.     DC.L    RTE
    26.     DC.L    RTE
    27.     DC.L    RTE
    28.     DC.L    RTE     ; 8
    29.  
    30.     DC.L    RTE     ; spurious interrupt
    31.     DC.L    RTE     ; interrupt level 1 (lowest priority)
    32.     DC.L    ExtInt      ; interrupt level 2 = external interrupt
    33.     DC.L    RTE     ; interrupt level 3
    34.     DC.L    HSync       ; interrupt level 4 = H-sync interrupt
    35.     DC.L    RTE     ; interrupt level 5
    36.     DC.L    VSync       ; interrupt level 6 = V-sync interrupt
    37.     DC.L    RTE     ; interrupt level 7 (highest priority)
    38.  
    39.     DC.L    RTE     ; TRAP instruction vectors
    40.     DC.L    RTE
    41.     DC.L    RTE
    42.     DC.L    RTE
    43.     DC.L    RTE
    44.     DC.L    RTE
    45.     DC.L    RTE
    46.     DC.L    RTE
    47.     DC.L    RTE
    48.     DC.L    RTE
    49.     DC.L    RTE
    50.     DC.L    RTE
    51.     DC.L    RTE
    52.     DC.L    RTE
    53.     DC.L    RTE
    54.     DC.L    RTE     ; 16
    55.  
    56.     DC.L    RTE     ; unassigned
    57.     DC.L    RTE
    58.     DC.L    RTE
    59.     DC.L    RTE
    60.     DC.L    RTE
    61.     DC.L    RTE
    62.     DC.L    RTE
    63.     DC.L    RTE
    64.     DC.L    RTE
    65.     DC.L    RTE
    66.     DC.L    RTE
    67.     DC.L    RTE
    68.     DC.L    RTE
    69.     DC.L    RTE
    70.     DC.L    RTE
    71.     DC.L    RTE     ; 16
    Which puts VSync at 30/31 (Depending on how they're numbered). I still have no output, the VDP has no tiles loaded, but the ROM header seems to be working now, as the title shows correctly.

    EDIT: By my genius, I have determined that Gens KMod is displaying the international title, if that helps.

    DOUBLE EDIT: I think it may have to do with the local labels (@1, etc). They were originally all .X instead, which made ASM68k cry. Assuming this was compiler-specific trouble, I changed all of the labels to local (@X). Perhaps this broke it...=(
     
  11. filmzombie

    filmzombie

    The real spindash... Member
    155
    0
    0
    England- The Land of Tea
    Sonic Synthesis
    Okay. I did everything on that video and it still didn't work.

    So I run through this again.

    I take Sonic 1 Projects, Sonic Split and Texts and SonEd2, then I extract the bloody files, make a random text document to accomodate for the lost file. I place the Sonic 1 rom in hivebrain folder and run Split.bat after ranaming it s1.bin.

    ...the folder thing aint happening. Its just staying the same.


    ...I notice the guy uses XP...I swear to God if this is a Vista thing...


    any suggestions?
     
  12. filmzombie

    filmzombie

    The real spindash... Member
    155
    0
    0
    England- The Land of Tea
    Sonic Synthesis
    right ok. Messed around a little bit- worked out a problem may have been that I named the file s1.bin.zip.

    took off the zip, ran split.bat and it came up with in the bacl box-


    C:\Users\Steven\Pictures\Timewaster\SonEd2 Files Retry\SonED2-1\Sonic_1_(Split_a
    nd_Text_by_Hivebrain)>split.exe s1.bin s1.txt

    C:\Users\Steven\Pictures\Timewaster\SonEd2 Files Retry\SonED2-1\Sonic_1_(Split_a
    nd_Text_by_Hivebrain)>derecmp.exe nd artnem artnem_u



    Anybody translate this? I know more is suppossed to follow.
     
  13. filmzombie

    filmzombie

    The real spindash... Member
    155
    0
    0
    England- The Land of Tea
    Sonic Synthesis
    okay....



    Third post.

    It seems the files were created above, not below. I then copied the Project files, extracted them...and now I am struggling because everytime I open one of them in SonEd2

    "Windows has stopped working...close program whilst it encounters Blah Blah Blah..."


    and now it opens them...but they come up with obscured blurs.

    damn it...STOP BEING SO GOD DAMN IRRATIONAL!!!


    I apologise. My computer is beginning to taunt me.
     
  14. Sik

    Sik

    Sik is pronounced as "seek", not as "sick". Tech Member
    6,718
    1
    0
    being an asshole =P
    McGuirk, before you continue, do you even know what that code does? Seems quite complex to me for being a simple "Hello, world" program o_O From where did you get it?
     
  15. filmzombie

    filmzombie

    The real spindash... Member
    155
    0
    0
    England- The Land of Tea
    Sonic Synthesis
    Alright, if anyone can understand this I'd greatly appreciate it.

    The Split Dissasembly is working...but not entirerly.

    Everytime I open SonED2, I proceed to open Hivebrain's Project Files...make sure to select any zone apart from Green Hill,

    and then I have a black screen.

    "It was made because something like THIS could happen."
    ..\artnem8x8mz.bin not found, creating blank template

    then copy and paste "not found, creating blank template" to..


    map16\mz.bin
    map256\mz.bin
    levels/mz1.bin

    there is about ten lines of this.

    Anyone know what I'm doing wrong?
     
  16. nineko

    nineko

    I am the Holy Cat Tech Member
    6,316
    489
    63
    italy
    If I remember correctly, SonED2's project files aren't directly compatible with the naming convention used in Hivebrain's Sonic 1 disasm.
    You have to edit the SEP files with notepad or another text editor of your choice and change their paths to the real one. The replacements should be quite obvious.
     
  17. Spanner

    Spanner

    The Tool Member
    Um, are you using the project files that came from SonED 2 or Quickman's project pack?
    On a slight off-topic note, the SVN version of the disassembly already comes with project files, you just have to fix GHZ.
     
  18. filmzombie

    filmzombie

    The real spindash... Member
    155
    0
    0
    England- The Land of Tea
    Sonic Synthesis
    I'm using Quickmans.

    I might try using another. I'm getting nowhere with this one.
     
  19. McGuirk

    McGuirk

    The Egg-Man Cometh. Member
    I don't know what every bit does, but I know that there's no built in fonts in a genesis, so you have to load tiles into the VDP that contain the text, put the palette into the CRAM, print the tiles on the screen... It looks a lot bigger than it is because of all the memory definitions from that header file pasted in there.

    I got it here: http://www.atariage.com/forums/index.php?showtopic=98540

    Though honestly, I'm not sure why it messes with the PSG...
     
  20. Emerald Spirit

    Emerald Spirit

    Newfound Potential Member
    Okay, well, I finally started attempting this. Split assembly, Quickman's project files, Hivebrain disassembly, all that...and I tried to fix GHZ...and now I can access it in SonED2 and everything...but...

    [​IMG]
    [​IMG]

    FFFF...what did I do wrong? Every other zone works, GHZ is the only garbled one.