don't click here

How to add a newer SEGA screen to Sonic 1

Discussion in 'Engineering & Reverse Engineering' started by Shaonic, Dec 22, 2008.

Thread Status:
Not open for further replies.
  1. Shaonic

    Shaonic

    Member
    44
    0
    0
    Note: You must be using the ASM68K assembler to properly add the screen

    In sonic1.asm add the following equates and macros to the beginning of the file:

    Code (Text):
    1. BitMapXpos  equ 4
    2. BitMapYpos  equ 2
    3. BitMapWidth equ 256
    4. BitMapHeight    equ 128
    5. BitMapCellHeight    equ (BitMapHeight/8)
    6. BitMapCellWidth equ (BitMapWidth/8)
    7. WallPalBits equ $2000
    8. MapRowWidth equ 64
    9. bitmapaddr  equ $8000
    10. scrollAaddr equ $C000
    11. spriteaddr  equ $D800
    12. hscrolladdr equ $DC00
    13. scrollBaddr equ $E000
    14. windowaddr  equ $F000
    15. DMA_ByteInc equ $0
    16. DMA_Length1 equ $2
    17. DMA_Length2 equ $4
    18. DMA_SrcAdr1 equ $6
    19. DMA_SrcAdr2 equ $8
    20. DMA_SrcAdr3 equ $A
    21. DMA_DMAenbl equ $C
    22. DMA_DstAdr1 equ $E
    23. DMA_DstAdr2 equ $10
    24. DMA_DMADisbl    equ $12
    25. SNDADD        EQU    $A04000
    26. SNDDAT        EQU    $A04001
    27. CNTLA          EQU   $A10008
    28. CNTLB          EQU   $A1000A
    29. CNTLC          EQU   $A1000C
    30. CNTLAW        EQU    $A10009
    31. CNTLBW        EQU    $A1000B
    32. CNTLCW        EQU    $A10009
    33. PPCNTL        EQU    $A1000D
    34. PPDATA        EQU    $A10007
    35. BUSREQ        EQU    $A11100
    36. BUSRES        EQU    $A11200
    37. Z80RAM        EQU    $A00000
    38. VDATA          EQU   $C00000
    39. VCTRL          EQU   $C00004
    40. SetVdpRegister  MACRO
    41.         MOVE.W  #$8000|(\1<<8)|\2,VCTRL; check out the SEGA manual
    42.         ENDM
    43. SetVdpRegisterCode    MACRO
    44.         and.w   #$00ff,\2             ; Mask off high part
    45.         or.w    #$8000|(\1<<8),\2
    46.         move.w  \2,VCTRL
    47.         ENDM
    48. AutoIncrement   MACRO
    49.         SetVdpRegister  15,\1
    50.         ENDM
    51. VramWrtAddr  MACRO
    52.         MOVE.L  #$40000000|((\1&$3fff)<<16)|((\1>>14)&3),\2
    53.         ENDM
    54. VSramWrtAddr  MACRO
    55.         MOVE.L  #$40000010|((\1&$3fff)<<16)|((\1>>14)&3),\2
    56.         ENDM
    57. CramWrtAddr  MACRO
    58.         MOVE.L  #$C0000000|((\1&$3fff)<<16)|((\1>>14)&3),\2
    59.         ENDM
    60. CalcVramWrtAddrCode MACRO
    61.         move.w  \1,\2         ; Copy for lower 14 bits
    62.         and.l   #$3fff,\2     ; mask
    63.         lsl.l   #8,\2
    64.         lsl.l   #8,\2         ; Shift up
    65.         or.l    #$40000000,\2  ; Set bit that tells VDP it's a VRAM WRITE
    66.         lsr.l   #8,\1
    67.         lsr.l   #6,\1         ; Shift down 14 bits
    68.         and.l   #$3,\1
    69.         or.l    \1,\2         ; and combine
    70.         ENDM
    At the end of the file add

    Code (Text):
    1. SegaLogo
    2.     move.l  #10,d6
    3.     bsr delay
    4.     SetVdpRegister  1,$44
    5.     SetVdpRegister  16,1
    6.     lea.l   LogoChars,A0
    7.     VramWrtAddr  $20,VCTRL
    8.     move.l  #16*147,d0
    9. ldchar:
    10.     move.w  (a0)+,VDATA
    11.     dbra    d0,ldchar
    12.     lea.l   LogoPalette,a0
    13.     CramWrtAddr  $0,VCTRL
    14.     moveq.l #15,d0
    15. ldpal:
    16.     move.w  (a0)+,VDATA
    17.     dbra    d0,ldpal
    18.     VramWrtAddr $C51C,D2
    19.     moveq.l #1,d1
    20.     moveq.l #3,d3
    21. newrow:
    22.     move.l  d2,VCTRL
    23.     add.l   #$00800000,D2
    24.     moveq.l #11,D0
    25. wrtrow1:
    26.     move.w  d1,VDATA
    27.     addq.w  #1,d1
    28.     dbra    d0,wrtrow1
    29.     dbra    d3,newrow
    30.     lea.l   LogoCycle,a0
    31.     add.l   #32,a0
    32.     moveq   #16,d1
    33.     move.l  #$3f,d6
    34.     jsr delay
    35. stcycl:
    36.     move.l  a0,a1
    37.     move.l  #$c00e0000,$C00004.L
    38.     moveq   #8,d0
    39. cyc:
    40.     move.w  (a1)+,VDATA
    41.     dbra    d0,cyc
    42.     move.l  #$08,d6
    43.     bsr  delay
    44.     subq    #2,a0
    45.     dbra    d1,stcycl
    46.     move.l  #$40,d6
    47.     bsr  delay
    48.     CramWrtAddr  $0,VCTRL
    49.     moveq.l #15,d0
    50. .clpal:
    51.     move.w  #0,VDATA
    52.     dbra    d0,.clpal
    53.     VramWrtAddr $C000,VCTRL
    54.     move.l #64*28,d0
    55. .clmap:
    56.     move.w  #0,VDATA
    57.     dbra    d0,.clmap
    58.     rts
    59. delay:
    60.     move.l  #$fff,d7
    61. dt: nop
    62.     dbra    d7,dt
    63.     dbra    d6,delay
    64.     rts
    65. LogoChars:
    66.                 dc.l    $00000000,$00000111,$00011BBC,$001ABBBB
    67.                 dc.l    $01AABBBB,$01AAABBB,$1AAAABB1,$19AAAA1B
    68.                 dc.l    $00000000,$11111111,$CCCDDDDE,$CCCCDDDD
    69.                 dc.l    $CCCCDDDD,$BCCCCDDD,$11111111,$BBCCCCDD
    70.                 dc.l    $00000000,$11111100,$EEEFF100,$EEEEF101
    71.                 dc.l    $EEEEF11A,$DEEEE11A,$111111AA,$DDEEE1AA
    72.                 dc.l    $00000000,$00111111,$11BBCCCC,$BBBBCCCC
    73.                 dc.l    $ABBBBCCC,$ABBBBCCC,$AABBB111,$AABB1BCC
    74.                 dc.l    $00000000,$11111111,$DDDDEEEE,$DDDDEEEE
    75.                 dc.l    $CDDDDEEE,$CDDDDEEE,$11111111,$CCDDDDEE
    76.                 dc.l    $00000000,$11110000,$FFF10011,$FFF101BB
    77.                 dc.l    $EFF11ABB,$EFF11ABB,$1111AAAB,$EEF1AAAB
    78.                 dc.l    $00000000,$11111111,$BCCCCDDD,$BCCCCDDD
    79.                 dc.l    $BBCCCCDD,$BBCCCCDD,$BBB11111,$B11CCCCD
    80.                 dc.l    $00000000,$11111111,$DEEEEFFF,$DEEEEFFF
    81.                 dc.l    $DDEEEEFF,$DDEEEEFF,$11111111,$DDDEEEEF
    82.                 dc.l    $00000000,$11000000,$F1000000,$F1000000
    83.                 dc.l    $F1000000,$F1000000,$11000000,$F1000001
    84.                 dc.l    $00000000,$00000111,$00011DDD,$001CCDDD
    85.                 dc.l    $01CCCDDD,$1BCCCCDD,$1BCCCCDD,$BBBCCC11
    86.                 dc.l    $00001111,$10000010,$E1100010,$DEE10010
    87.                 dc.l    $DEEE1010,$DDEEE100,$DDEEE100,$DDDEEE10
    88.                 dc.l    $10100001,$00110011,$00101101,$00100001
    89.                 dc.l    $00100001,$00000000,$00000000,$00000000
    90.                 dc.l    $19AAA1BB,$199AA1AB,$199AA1AB,$1999A1AA
    91.                 dc.l    $1999A1AA,$199991AA,$199991AA,$1899991A
    92.                 dc.l    $BBCCCCDD,$BBBCCCCD,$BBBCCCCD,$BB111111
    93.                 dc.l    $BBBBCCCC,$ABBBBCCC,$ABBBBCCC,$AABBBBCC
    94.                 dc.l    $DDEEE19A,$DDDEE19A,$DDDEE199,$11111199
    95.                 dc.l    $11111199,$CD111199,$CDD11199,$CCDD1199
    96.                 dc.l    $AAA1BBBC,$AAA1BBBC,$AAA1BBBB,$AAA1BBB1
    97.                 dc.l    $9AA1ABBB,$9AA1ABBB,$99A1AABB,$99A1AABB
    98.                 dc.l    $CCCDDDDE,$CCCDDDDE,$CCCCDDDD,$11111111
    99.                 dc.l    $BCCCCDDD,$BCCCCDDD,$BBCCCCDD,$BBCCCCDD
    100.                 dc.l    $EEE1AAAA,$EEE19AAA,$EEE19AAA,$111199AA
    101.                 dc.l    $D11199AA,$D111999A,$D111999A,$D1119999
    102.                 dc.l    $1BBBCCCC,$1BBBBCCC,$1BBBBCCC,$1ABBB111
    103.                 dc.l    $1ABBB1CC,$1AABB1BC,$1AABB1BC,$1AAAB1BB
    104.                 dc.l    $DDDDEEEE,$CDDDEEEE,$CDDDDEEE,$11111111
    105.                 dc.l    $CCDDDDEE,$CCCDDDEE,$CCCDDDDE,$CCCCDDDE
    106.                 dc.l    $F1000001,$F1000001,$E100001A,$1100001A
    107.                 dc.l    $E100001A,$E10001AA,$E10001AA,$E100019A
    108.                 dc.l    $BBBCCC11,$BBBBC1CC,$BBBBC1CC,$ABBBB1CC
    109.                 dc.l    $ABBB1CCC,$AABB1BCC,$AABB1BCC,$AAA1BBBC
    110.                 dc.l    $DDDEEE10,$1DDDEE10,$1DDDEEE1,$1DDDDEE1
    111.                 dc.l    $C1DDDEE1,$C1DDDDEE,$C1DDDDEE,$CC1DDDDE
    112.                 dc.l    $00000000,$00000000,$00000000,$00000000
    113.                 dc.l    $00000000,$10000000,$10000000,$10000000
    114.                 dc.l    $019999A1,$0189999A,$0019999A,$00189999
    115.                 dc.l    $00011199,$11111111,$18888999,$18888899
    116.                 dc.l    $1111111C,$AAABBBB1,$AAABBBBC,$AAAABBBB
    117.                 dc.l    $AAAABBBB,$1111ABBB,$9AAAABBB,$99AAAABB
    118.                 dc.l    $CCDD1189,$CCCDD189,$1CCDD188,$1CCCD188
    119.                 dc.l    $1CCCD188,$1CCCC188,$1CCCC188,$1BCCC188
    120.                 dc.l    $99911111,$9991AAAB,$9991AAAA,$9991AAAA
    121.                 dc.l    $89919AAA,$89919AA1,$889199AA,$889199AA
    122.                 dc.l    $11111111,$BBBCCCCD,$BBBBCCCC,$BBBBCCCC
    123.                 dc.l    $ABBBBCCC,$11111111,$AABBBBCC,$AABBBBCC
    124.                 dc.l    $11119999,$D1118999,$D1118999,$D1118899
    125.                 dc.l    $C1118899,$11118889,$CCD18889,$CCD18888
    126.                 dc.l    $1AAAB111,$1AAAA1BB,$1AAAA1BB,$19AAA1BB
    127.                 dc.l    $19AAA1BB,$199AA111,$199AAAAB,$1999AAAA
    128.                 dc.l    $11111DDD,$BCCC1DDD,$BCCC1DDD,$BBCC1CDD
    129.                 dc.l    $BBCC1CDD,$BBBC1CCD,$BBBC1CCD,$BBBB1CCC
    130.                 dc.l    $E100199A,$E1001999,$D1001999,$D1018999
    131.                 dc.l    $D1018999,$D1018899,$D1188899,$D1188889
    132.                 dc.l    $AAA1BBBC,$AAA1BBBB,$AA1ABBBB,$9A1AABBB
    133.                 dc.l    $9A1AAB11,$91AAAA11,$91AAAABB,$919AAAAB
    134.                 dc.l    $CC1DDDDE,$CC1CDDDD,$CCC1DDDD,$BCC1CDDD
    135.                 dc.l    $BCC1CDDD,$BBCC1CDD,$BBCC1CDD,$BBBC1CCD
    136.                 dc.l    $E1000000,$E1000000,$E1000000,$DE100000
    137.                 dc.l    $DE100000,$DD100000,$DDE10000,$DDD10000
    138.                 dc.l    $17888899,$17788889,$11111111,$17778888
    139.                 dc.l    $17778888,$17777888,$17777888,$11111111
    140.                 dc.l    $99AAAABB,$999AAAA1,$1111111B,$9999AAAA
    141.                 dc.l    $9999AAAA,$89999AAA,$89999AAA,$11111111
    142.                 dc.l    $1BCCC178,$BBBCC178,$BBBCC177,$BBBB1017
    143.                 dc.l    $BBBB1017,$ABB10001,$A1100000,$10000000
    144.                 dc.l    $8881999A,$8889199A,$88889111,$88889999
    145.                 dc.l    $78888999,$78888999,$11888899,$00111111
    146.                 dc.l    $AAABBBBC,$AAABBBBC,$11111111,$AAAABBBB
    147.                 dc.l    $9AAAABBB,$9AAAABBB,$99AAAABB,$11111111
    148.                 dc.l    $CCC17888,$CCC17888,$11111788,$CCC11788
    149.                 dc.l    $BCC11778,$BCC10178,$BBC10011,$11110000
    150.                 dc.l    $1999AAAA,$81199AAA,$88911111,$889999AA
    151.                 dc.l    $8889999A,$8889999A,$88889999,$11111111
    152.                 dc.l    $BBBB1CCC,$ABBB1CCC,$11111BCC,$AABBBBCC
    153.                 dc.l    $AAABBBBC,$AAABBBBC,$AAAABBBB,$11111111
    154.                 dc.l    $D1788889,$C1778888,$CC778888,$CC777881
    155.                 dc.l    $CC777881,$CC777781,$CC777781,$11111111
    156.                 dc.l    $199AAAAB,$1999AAAA,$19991111,$89991AAA
    157.                 dc.l    $89911AAA,$889119AA,$881119AA,$11111111
    158.                 dc.l    $BBBCC1CD,$BBBBC1CC,$111111CC,$ABBBBCCC
    159.                 dc.l    $ABBBBCCC,$AABBBBCC,$AABBBBCC,$11111111
    160.                 dc.l    $DDD10000,$DDDD1000,$DDDD1000,$CDDD1000
    161.                 dc.l    $CDDDD100,$CCDDD100,$CCDDD100,$11111100
    162.     DC.L    $00000000,$00000000,$00000000,$00000000
    163.     DC.L    $00000000,$00000000,$00000000,$00000000
    164.     DC.L    $00110000,$00110000,$00110000,$00110000
    165.     DC.L    $00110000,$00000000,$00110000,$00000000
    166.     DC.L    $01101100,$01101100,$01101100,$00000000
    167.     DC.L    $00000000,$00000000,$00000000,$00000000
    168.     DC.L    $01101100,$01101100,$11111110,$01101100
    169.     DC.L    $11111110,$01101100,$01101100,$00000000
    170.     DC.L    $00110000,$01111100,$11000000,$01111000
    171.     DC.L    $00001100,$11111000,$00110000,$00000000
    172.     DC.L    $00000000,$11000110,$11001100,$00011000
    173.     DC.L    $00110000,$01100110,$11000110,$00000000
    174.     DC.L    $00111000,$01101100,$00111000,$01110110
    175.     DC.L    $11011100,$11001100,$01110110,$00000000
    176.     DC.L    $01100000,$01100000,$11000000,$00000000
    177.     DC.L    $00000000,$00000000,$00000000,$00000000
    178.     DC.L    $00011000,$00110000,$01100000,$01100000
    179.     DC.L    $01100000,$00110000,$00011000,$00000000
    180.     DC.L    $01100000,$00110000,$00011000,$00011000
    181.     DC.L    $00011000,$00110000,$01100000,$00000000
    182.     DC.L    $00000000,$01100110,$00111100,$11111111
    183.     DC.L    $00111100,$01100110,$00000000,$00000000
    184.     DC.L    $00000000,$00110000,$00110000,$11111100
    185.     DC.L    $00110000,$00110000,$00000000,$00000000
    186.     DC.L    $00000000,$00000000,$00000000,$00000000
    187.     DC.L    $00000000,$00110000,$00110000,$01100000
    188.     DC.L    $00000000,$00000000,$00000000,$11111100
    189.     DC.L    $00000000,$00000000,$00000000,$00000000
    190.     DC.L    $00000000,$00000000,$00000000,$00000000
    191.     DC.L    $00000000,$00110000,$00110000,$00000000
    192.     DC.L    $00000110,$00001100,$00011000,$00110000
    193.     DC.L    $01100000,$11000000,$10000000,$00000000
    194.     DC.L    $01111100,$11000110,$11001110,$11011110
    195.     DC.L    $11110110,$11100110,$01111100,$00000000
    196.     DC.L    $00110000,$01110000,$00110000,$00110000
    197.     DC.L    $00110000,$00110000,$01111000,$00000000
    198.     DC.L    $11111000,$00001100,$00001100,$00111000
    199.     DC.L    $01100000,$11000000,$11111100,$00000000
    200.     DC.L    $11111000,$00001100,$00001100,$00111000
    201.     DC.L    $00001100,$00001100,$11111000,$00000000
    202.     DC.L    $00011100,$00111100,$01101100,$11001100
    203.     DC.L    $11111110,$00001100,$00001100,$00000000
    204.     DC.L    $11111100,$11000000,$11111000,$00001100
    205.     DC.L    $00001100,$00001100,$11111000,$00000000
    206.     DC.L    $00111100,$01100000,$11000000,$11111000
    207.     DC.L    $11001100,$11001100,$01111000,$00000000
    208.     DC.L    $11111100,$00001100,$00011000,$00110000
    209.     DC.L    $01100000,$11000000,$11000000,$00000000
    210.     DC.L    $01111000,$11001100,$11001100,$01111000
    211.     DC.L    $11001100,$11001100,$01111000,$00000000
    212.     DC.L    $01111000,$11001100,$11001100,$01111100
    213.     DC.L    $00001100,$00001100,$01111000,$00000000
    214.     DC.L    $00000000,$00110000,$00110000,$00000000
    215.     DC.L    $00000000,$00110000,$00110000,$00000000
    216.     DC.L    $00000000,$00110000,$00110000,$00000000
    217.     DC.L    $00000000,$00110000,$00110000,$01100000
    218.     DC.L    $00011000,$00110000,$01100000,$11000000
    219.     DC.L    $01100000,$00110000,$00011000,$00000000
    220.     DC.L    $00000000,$00000000,$11111100,$00000000
    221.     DC.L    $00000000,$11111100,$00000000,$00000000
    222.     DC.L    $01100000,$00110000,$00011000,$00001100
    223.     DC.L    $00011000,$00110000,$01100000,$00000000
    224.     DC.L    $11111000,$00001100,$00001100,$00111000
    225.     DC.L    $00110000,$00000000,$00110000,$00000000
    226.     DC.L    $01111100,$11000110,$11011110,$11011110
    227.     DC.L    $11011110,$11000000,$01111000,$00000000
    228.     DC.L    $00110000,$01111000,$11001100,$11001100
    229.     DC.L    $11111100,$11001100,$11001100,$00000000
    230.     DC.L    $11111000,$11001100,$11001100,$11111000
    231.     DC.L    $11001100,$11001100,$11111000,$00000000
    232.     DC.L    $01111100,$11000000,$11000000,$11000000
    233.     DC.L    $11000000,$11000000,$01111100,$00000000
    234.     DC.L    $11111000,$11001100,$11001100,$11001100
    235.     DC.L    $11001100,$11001100,$11111000,$00000000
    236.     DC.L    $11111100,$11000000,$11000000,$11111000
    237.     DC.L    $11000000,$11000000,$11111100,$00000000
    238.     DC.L    $11111100,$11000000,$11000000,$11111000
    239.     DC.L    $11000000,$11000000,$11000000,$00000000
    240.     DC.L    $01111100,$11000000,$11000000,$11000000
    241.     DC.L    $11011100,$11001100,$01111100,$00000000
    242.     DC.L    $11001100,$11001100,$11001100,$11111100
    243.     DC.L    $11001100,$11001100,$11001100,$00000000
    244.     DC.L    $01111000,$00110000,$00110000,$00110000
    245.     DC.L    $00110000,$00110000,$01111000,$00000000
    246.     DC.L    $00011110,$00001100,$00001100,$00001100
    247.     DC.L    $00001100,$00001100,$11111000,$00000000
    248.     DC.L    $11000110,$11001100,$11011000,$11110000
    249.     DC.L    $11011000,$11001100,$11000110,$00000000
    250.     DC.L    $11000000,$11000000,$11000000,$11000000
    251.     DC.L    $11000000,$11000000,$11111100,$00000000
    252.     DC.L    $11000110,$11101110,$11111110,$11010110
    253.     DC.L    $11000110,$11000110,$11000110,$00000000
    254.     DC.L    $11000110,$11100110,$11110110,$11011110
    255.     DC.L    $11001110,$11000110,$11000110,$00000000
    256.     DC.L    $01111000,$11001100,$11001100,$11001100
    257.     DC.L    $11001100,$11001100,$01111000,$00000000
    258.     DC.L    $11111000,$11001100,$11001100,$11111000
    259.     DC.L    $11000000,$11000000,$11000000,$00000000
    260.     DC.L    $01111000,$11001100,$11001100,$11001100
    261.     DC.L    $11001100,$11011000,$01101100,$00000000
    262.     DC.L    $11111000,$11001100,$11001100,$11111000
    263.     DC.L    $11110000,$11011000,$11001100,$00000000
    264.     DC.L    $01111100,$11000000,$11000000,$01111000
    265.     DC.L    $00001100,$00001100,$11111000,$00000000
    266.     DC.L    $11111100,$00110000,$00110000,$00110000
    267.     DC.L    $00110000,$00110000,$00110000,$00000000
    268.     DC.L    $11001100,$11001100,$11001100,$11001100
    269.     DC.L    $11001100,$11001100,$01111100,$00000000
    270.     DC.L    $11001100,$11001100,$11001100,$11001100
    271.     DC.L    $11001100,$01111000,$00110000,$00000000
    272.     DC.L    $11000110,$11000110,$11000110,$11010110
    273.     DC.L    $11111110,$11101110,$11000110,$00000000
    274.     DC.L    $11000110,$11000110,$01101100,$00111000
    275.     DC.L    $01101100,$11000110,$11000110,$00000000
    276.     DC.L    $11001100,$11001100,$11001100,$01111000
    277.     DC.L    $00110000,$00110000,$00110000,$00000000
    278.     DC.L    $11111110,$00001100,$00011000,$00110000
    279.     DC.L    $01100000,$11000000,$11111110,$00000000
    280.     DC.L    $01111000,$01100000,$01100000,$01100000
    281.     DC.L    $01100000,$01100000,$01111000,$00000000
    282.     DC.L    $11000000,$01100000,$00110000,$00011000
    283.     DC.L    $00001100,$00000110,$00000010,$00000000
    284.     DC.L    $01111000,$00011000,$00011000,$00011000
    285.     DC.L    $00011000,$00011000,$01111000,$00000000
    286.     DC.L    $00010000,$00111000,$01101100,$11000110
    287.     DC.L    $00000000,$00000000,$00000000,$00000000
    288.     DC.L    $00000000,$00000000,$00000000,$00000000
    289.     DC.L    $00000000,$00000000,$00000000,$11111111
    290.     DC.L    $00110000,$00110000,$00011000,$00000000
    291.     DC.L    $00000000,$00000000,$00000000,$00000000
    292.     DC.L    $00000000,$00000000,$11111000,$00001100
    293.     DC.L    $01111100,$11001100,$01111100,$00000000
    294.     DC.L    $11000000,$11000000,$11111000,$11001100
    295.     DC.L    $11001100,$11001100,$11111000,$00000000
    296.     DC.L    $00000000,$00000000,$01111100,$11000000
    297.     DC.L    $11000000,$11000000,$01111100,$00000000
    298.     DC.L    $00001100,$00001100,$01111100,$11001100
    299.     DC.L    $11001100,$11001100,$01111100,$00000000
    300.     DC.L    $00000000,$00000000,$01111000,$11001100
    301.     DC.L    $11111100,$11000000,$01111100,$00000000
    302.     DC.L    $00111100,$01100000,$01100000,$11111000
    303.     DC.L    $01100000,$01100000,$01100000,$00000000
    304.     DC.L    $00000000,$00000000,$01111100,$11001100
    305.     DC.L    $11001100,$01111100,$00001100,$11111000
    306.     DC.L    $11000000,$11000000,$11111000,$11001100
    307.     DC.L    $11001100,$11001100,$11001100,$00000000
    308.     DC.L    $00110000,$00000000,$00110000,$00110000
    309.     DC.L    $00110000,$00110000,$00110000,$00000000
    310.     DC.L    $00011000,$00000000,$00011000,$00011000
    311.     DC.L    $00011000,$00011000,$00011000,$11110000
    312.     DC.L    $11000000,$11000000,$11001100,$11011000
    313.     DC.L    $11110000,$11011000,$11001100,$00000000
    314.     DC.L    $01110000,$00110000,$00110000,$00110000
    315.     DC.L    $00110000,$00110000,$00110000,$00000000
    316.     DC.L    $00000000,$00000000,$11000110,$11111110
    317.     DC.L    $11010110,$11000110,$11000110,$00000000
    318.     DC.L    $00000000,$00000000,$11111000,$11001100
    319.     DC.L    $11001100,$11001100,$11001100,$00000000
    320.     DC.L    $00000000,$00000000,$01111000,$11001100
    321.     DC.L    $11001100,$11001100,$01111000,$00000000
    322.     DC.L    $00000000,$00000000,$11111000,$11001100
    323.     DC.L    $11001100,$11001100,$11111000,$11000000
    324.     DC.L    $00000000,$00000000,$01111100,$11001100
    325.     DC.L    $11001100,$11001100,$01111100,$00001100
    326.     DC.L    $00000000,$00000000,$11011100,$11100000
    327.     DC.L    $11000000,$11000000,$11000000,$00000000
    328.     DC.L    $00000000,$00000000,$01111100,$11000000
    329.     DC.L    $01111000,$00001100,$11111000,$00000000
    330.     DC.L    $01100000,$01100000,$11111100,$01100000
    331.     DC.L    $01100000,$01100000,$00111100,$00000000
    332.     DC.L    $00000000,$00000000,$11001100,$11001100
    333.     DC.L    $11001100,$11001100,$01111100,$00000000
    334.     DC.L    $00000000,$00000000,$11001100,$11001100
    335.     DC.L    $11001100,$01111000,$00110000,$00000000
    336.     DC.L    $00000000,$00000000,$11000110,$11000110
    337.     DC.L    $11010110,$11111110,$11000110,$00000000
    338.     DC.L    $00000000,$00000000,$11000110,$01101100
    339.     DC.L    $00111000,$01101100,$11000110,$00000000
    340.     DC.L    $00000000,$00000000,$11001100,$11001100
    341.     DC.L    $11001100,$01111100,$00001100,$11111000
    342.     DC.L    $00000000,$00000000,$11111100,$00011000
    343.     DC.L    $00110000,$01100000,$11111100,$00000000
    344.     DC.L    $00011100,$00110000,$00110000,$11100000
    345.     DC.L    $00110000,$00110000,$00011100,$00000000
    346.     DC.L    $00011000,$00011000,$00011000,$00000000
    347.     DC.L    $00011000,$00011000,$00011000,$00000000
    348.     DC.L    $11100000,$00110000,$00110000,$00011100
    349.     DC.L    $00110000,$00110000,$11100000,$00000000
    350.     DC.L    $01110110,$11011100,$00000000,$00000000
    351.     DC.L    $00000000,$00000000,$00000000,$00000000
    352.     DC.L    $00000000,$00010000,$00111000,$01101100
    353.     DC.L    $11000110,$11000110,$11111110,$00000000
    354.     dc.l    $10000000
    355.     dc.l    $00000000
    356.     dc.l    $00000000
    357.     dc.l    $00000000
    358.     dc.l    $00000000
    359.     dc.l    $00000000
    360.     dc.l    $00000000
    361.     dc.l    $00000000
    362.     dc.l    $00011000
    363.     dc.l    $00011000
    364.     dc.l    $00011000
    365.     dc.l    $11000011
    366.     dc.l    $11000011
    367.     dc.l    $00011000
    368.     dc.l    $00011000
    369.     dc.l    $00011000
    370.     dc.l    $00000000
    371.     dc.l    $01100110
    372.     dc.l    $11111110
    373.     dc.l    $11111110
    374.     dc.l    $10011010
    375.     dc.l    $00000010
    376.     dc.l    $00000010
    377.     dc.l    $00000010
    378.     dc.l    $11000000
    379.     dc.l    $11110000
    380.     dc.l    $11111100
    381.     dc.l    $01111000
    382.     dc.l    $01111100
    383.     dc.l    $00100110
    384.     dc.l    $00000011
    385.     dc.l    $00000000
    386. LogoPalette:
    387.                 dc.w    $000,$EEE,$EEE,$EEE,$EEE,$EEE,$EEE
    388. LogoCycle:
    389.                 dc.w    $EA0,$E80,$E60,$E40,$E20,$E00,$C00,$A00,$800
    390.                 dc.w    $A00,$C00,$E00,$E20,$E40,$E60,$E80,$EA0,$E80
    391.                 dc.w    $E60,$E40,$E20,$E00,$C00,$A00,$800
    But wait! The code needed for the SEGA logo needs to be added!

    Under CheckSumCheck add
    Code (Text):
    1.                 jsr  SegaLogo
    OK, Now there are 2 SEGA Screens, how do we solve that?

    Replace all of SegaScreen with this:
    Code (Text):
    1. SegaScreen:         ; XREF: GameModeArray
    2.         move.b  #$E4,d0
    3.         bsr.w   PlaySound_Special; stop music
    4.         bsr.w   ClearPLC
    5.         bsr.w   Pal_FadeFrom
    6.         lea ($C00004).l,a6
    7.         move.w  #$8004,(a6)
    8.         move.w  #$8230,(a6)
    9.         move.w  #$8407,(a6)
    10.         move.w  #$8700,(a6)
    11.         move.w  #$8B00,(a6)
    12.         clr.b   ($FFFFF64E).w
    13.         move    #$2700,sr
    14.         move.w  ($FFFFF60C).w,d0
    15.         andi.b  #$BF,d0
    16.         move.w  d0,($C00004).l
    17.         bsr.w   ClearScreen
    18.         move.l  #$40000000,($C00004).l
    19.         lea (Nem_SegaLogo).l,a0; load Sega  logo patterns
    20.         bsr.w   NemDec
    21.         lea ($FF0000).l,a1
    22.         lea (Eni_SegaLogo).l,a0; load Sega  logo mappings
    23.         move.w  #0,d0
    24.         bsr.w   EniDec
    25.         lea ($FF0000).l,a1
    26.         move.w  #-$A,($FFFFF632).w
    27.         move.w  #0,($FFFFF634).w
    28.         move.w  #0,($FFFFF662).w
    29.         move.w  #0,($FFFFF660).w
    30.         move.w  ($FFFFF60C).w,d0
    31.         ori.b   #$40,d0
    32.         move.w  d0,($C00004).l
    33.  
    34. Sega_GotoTitle:
    35.         move.b  #4,($FFFFF600).w; go to title screen
    36.         rts
    And there you go! A newer SEGA screen!
     
  2. Hayate

    Hayate

    Tech Member
    That's nice, but

    1. You don't need a billion equates for something like this, especially as your names do not have some specific prefix to indicate what they are for
    2. The data should be in .bin files
    3. You shouldn't be targeting a specific assembler if you want people to use it
    4. There no screenshots, a video or a built ROM so we can't see what it looks like
     
  3. Ollie

    Ollie

    DIGGY DIGGY HOLE Member
    Can I just ask, what this actually does?

    Could you explain a bit more in detail?
     
  4. Yuzu

    Yuzu

    Member
    2,548
    51
    28
    Am I the only person having an error when compiling this on a clean rom? I hope this isn't just a SEGA logo with a black background.
     
  5. Lyrica

    Lyrica

    (Formerly: Donnyku) Oldbie
    1,375
    40
    28
    Pennsylvania
    Wedding Planning
    I'm with Ollie on this. Do you mean the later Genesis game's Sega Logo with the black screen or Sega's newest one with the animation and everything? I'm betting the first one.
     
  6. Oh, AWESOME :D WITH pallette cycle even!

    [​IMG]
     
  7. roxahris

    roxahris

    Everyone's a hypocrite. Take my word for it. Member
    1,224
    0
    0
    Doing anything at all
    That SEGA screen? It's not exactly newer... games older than Sonic 1 have it, not to mention that Sonic 2 and 3 have similar screens.
     
  8. Tets

    Tets

    one rude dude Oldbie
    911
    87
    28
    It is old, but I think it looks pretty cool myself. I tried to clean it up (only a few of the equates in that whole list are actually used) and add it to Sonic 2, but it's not happening. A lot of the code in there doesn't make any sense to me. I was eventually able to make it build, but the new screen never came up.

    Also, needs more asm tags instead of code tags. If I'm not mistaken, they preserve the original formatting much better.
     
Thread Status:
Not open for further replies.