Basic Questions and Answers Thread

Discussion in 'Discussion & Q&A' started by Malevolence, Jul 7, 2009.

  1. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    I use yy-chr, the flower art is in the artunc folder.
     
  2. Bluesfire

    Bluesfire Will Hack For Food. Member

    Joined:
    May 29, 2012
    Messages:
    23
    Location:
    Arizona.
    Is there an English version, MainMemory? I do not understand Japanese.


    Edit: Nevermind, downloaded it and found it was in English.
     
    Last edited by a moderator: Jun 1, 2012
  3. M.N.K.

    M.N.K. In the River of Darkness... Member

    Joined:
    Feb 22, 2009
    Messages:
    506
    Location:
    Earth...
    @bluesfire: I couldnt help but to see that you are trying to enable the eggman. im suprised no one has told you about the code on the retro tutorials by nineko yet. just look there, add the code for it and it should work.


    edit: nevermind i see you already added it.
     
  4. Bluesfire

    Bluesfire Will Hack For Food. Member

    Joined:
    May 29, 2012
    Messages:
    23
    Location:
    Arizona.
    How do you edit the icons within the monitors? I have edited the monitor itself, but what of the icons?
     
  5. MarkeyJester

    MarkeyJester ♡ ! Member

    Joined:
    Jun 27, 2009
    Messages:
    2,867
    How to fix!




    >> Step 01


    Go to routine "LevSz_StartLoc:" and you will see:



    Code:
            move.w    ($FFFFFE10).w,d0
    
            lsl.b    #6,d0
    
            lsr.w    #4,d0
    
            lea    StartLocArray(pc,d0.w),a1 ; load Sonic's start location
    
            tst.w    ($FFFFFFF0).w    ; is demo mode on?
    
            bpl.s    LevSz_SonicPos    ; if not, branch
    
            move.w    ($FFFFFFF4).w,d0
    
            subq.w    #1,d0
    
            lsl.w    #2,d0
    
            lea    EndingStLocArray(pc,d0.w),a1 ; load Sonic's start location


    Replace it with:





    Code:
            move.w    ($FFFFFE10).w,d0
    
            lsl.b    #6,d0
    
            lsr.w    #4,d0
    
            lea    (StartLocArray).l,a1            ; MJ: load location array
    
            lea    (a1,d0.w),a1                ; MJ: load Sonic's start location address
    
            tst.w    ($FFFFFFF0).w    ; is demo mode on?
    
            bpl.s    LevSz_SonicPos    ; if not, branch
    
            move.w    ($FFFFFFF4).w,d0
    
            subq.w    #1,d0
    
            lsl.w    #2,d0
    
            lea    EndingStLocArray(pc,d0.w),a1 ; load Sonic's start location


    This will prevent a program counter distance error.



    >> Step 02



    Go to routine "LevSz_SonicPos:" and you will see:





    Code:
            moveq    #0,d1
    
            move.w    (a1)+,d1
    
            move.w    d1,($FFFFD008).w ; set Sonic's position on x-axis
    
            moveq    #0,d0
    
            move.w    (a1),d0
    
            move.w    d0,($FFFFD00C).w ; set Sonic's position on y-axis


    Add this code onto the end:





    Code:
            move.b    ($FFFFF600).w,d2            ; MJ: load game mode
    
            andi.w    #$00FC,d2                ; MJ: keep in range
    
            cmpi.b    #$04,d2                    ; MJ: is screen mode at title?
    
            bne    loc_60D0                ; MJ: if not, branch
    
            move.w    #$0050,d1                ; MJ: set positions for title screen
    
            move.w    #$03B0,d0                ; MJ: ''
    
            move.w    d1,($FFFFD008).w            ; MJ: save to object 1 so title screen follows
    
            move.w    d0,($FFFFD00C).w            ; MJ: ''

    This will ensure that the X and Y positions of the first object are fixed for the title screen.


    >> Conclusion


    No more complaints...
     
  6. Captain British

    Captain British Newcomer Trialist

    Joined:
    May 23, 2012
    Messages:
    17
    Location:
    England
    Are there any tutorials around for adding an extra splash screen to Sonic 2? I had a search around and found the one designed for Sonic 1 but comments in that thread lead me to believe that the code needs some modification to work in Sonic 2, and I do not have the technical know-how for that.


    I'm kind of debating with my self if or not to move my hack to Sonic 1 instead to be honest, it seems to be a better choice for a beginner due to how many tutorials there are for it and the main reason I started on Sonic 2 in the first place was just so that I could have avoid re-implementing the Spin Dash, I don't even want Tails. I've disabled him completely :c.
     
  7. Arctiq

    Arctiq OBJECTION! I WILL CROSS EXAMINE THE WITNESS' PET P Member

    Joined:
    Jun 2, 2012
    Messages:
    57
    When I'm using SonLVL to place a switch and I test run the level (GHZ), the switches' texture is messed up. Does anyone know how to fix this?


    [​IMG]
     
  8. Psycho RFG

    Psycho RFG Well-Known Member Member

    Joined:
    Feb 22, 2011
    Messages:
    234
    Because the switch object is not loaded in GHz... You have to edit the patern load cues and find a free space in VRAM to load it.
     
  9. D.A. Garden

    D.A. Garden Sonic CD's Sound Test Member

    Joined:
    Aug 6, 2009
    Messages:
    582
    Location:
    England
    This happens because the switch's graphics aren't typically loaded for Green Hill Zone. All objects load graphics depending on allocated memory (VRAM) and for what levels they are used in. It's for this reason that level specific objects don't work in other levels (Like Scrap Brain platforms in Green Hill or the Ball Hog enemy in Labyrinth, for examples).


    In order to change this, you have to change the pattern load cues for the levels, allocate new memory space (VRAM) for the graphics and then change the objects' coding to work with this new code. Then there is also the case of changing the palette, which may look wrong depending on what palette line it uses.


    This is all from the top of my head, by the way. I have never done this myself but I believe this is how it is done. Feel free to correct me.
     
    Last edited by a moderator: Jun 4, 2012
  10. MarkeyJester

    MarkeyJester ♡ ! Member

    Joined:
    Jun 27, 2009
    Messages:
    2,867
    DAGarden is correct, and the best kind of correct, have yourself a point!


    You will need to insert another item into the pattern load cues list for GHZ, you can find the list at "_incPattern load cues.asm", inside, and specifically here:



    Code:
    PLC_GHZ2:    dc.w 5
    
            dc.l Nem_Swing        ; swinging platform
    
            dc.w $7000
    
            dc.l Nem_Bridge        ; bridge
    
            dc.w $71C0
    
            dc.l Nem_SpikePole    ; spiked pole
    
            dc.w $7300
    
            dc.l Nem_Ball        ; giant    ball
    
            dc.w $7540
    
            dc.l Nem_GhzWall1    ; breakable wall
    
            dc.w $A1E0
    
            dc.l Nem_GhzWall2    ; normal wall
    
            dc.w $6980


    Is the list you will want to add the art to, to add a new item to it, simply place a new line in with the location of the compressed art, and the VRAM address to write to:





    Code:
    PLC_GHZ2:    dc.w 6            ; MJ: Changed from 5 to 6 (there is one more extra item now)
    
            dc.l Nem_Swing        ; swinging platform
    
            dc.w $7000
    
            dc.l Nem_Bridge        ; bridge
    
            dc.w $71C0
    
            dc.l Nem_SpikePole    ; spiked pole
    
            dc.w $7300
    
            dc.l Nem_Ball        ; giant    ball
    
            dc.w $7540
    
            dc.l Nem_GhzWall1    ; breakable wall
    
            dc.w $A1E0
    
            dc.l Nem_GhzWall2    ; normal wall
    
            dc.w $6980
    
            dc.l Nem_LzSwitch    ; MJ: switch art location
    
            dc.w $????        ; MJ: VRAM address


    Notice how the number 5 has now been changed to the number 6, every time you add an item, you must increase that value, every time you remove an item, you must decrease that value, it is a counter to tell the engine how many items are in the list, and is vastly important.



    In "sonic1.asm" you'll need to go to the object's code, find the routine named "Obj32:", in it's routine you will find:





    Code:
            move.w    #$4513,2(a0)    ; MZ specific code
    
            cmpi.b    #2,($FFFFFE10).w
    
            beq.s    loc_BD60
    
            move.w    #$513,2(a0)    ; SYZ, LZ and SBZ specific code
    
    
    
    loc_BD60:
    
            move.b    #4,1(a0)
    
            move.b    #$10,$19(a0)
    
            move.b    #4,$18(a0)
    
            addq.w    #3,$C(a0)


    The first couple of lines is to set the object's sprites to read art from a VRAM address, this can be anywhere you want, we'll put in a specific code for GHZ:





    Code:
            move.w    #$4513,2(a0)    ; MZ specific code
    
            cmpi.b    #2,($FFFFFE10).w
    
            beq.s    loc_BD60
    
            move.w    #$513,2(a0)    ; SYZ, LZ and SBZ specific code
    
    
    
    loc_BD60:
    
            tst.b    ($FFFFFE10).w                ; MJ: is the level Zone 00 (GHZ)?
    
            bne    Obj32_NotGHZ                ; MJ: if not, branch
    
            move.w    #(($????/$20)+$04),$02(a0)        ; MJ: set VRAM read address for GHZ
    
    
    
    Obj32_NotGHZ:
    
            move.b    #4,1(a0)
    
            move.b    #$10,$19(a0)
    
            move.b    #4,$18(a0)
    
            addq.w    #3,$C(a0)


    Now inside the pattern load cues list, and in the object code above, you may have noticed the "$????", the reason why I've put question marks inside instead of a number, is because that is for you to decide, below is a list of available VRAM spaces in GHZ you can use:





    Code:
    67C0 - 697F    0E tiles
    
    7D00 - 7FFF    18 tiles
    
    A1A0 - A1DF    02 tiles
    
    

    The switch art uses C tiles, so I recommend using either the VRAM address 67C0 or 7D00. There is not a lot of space, so you should use VRAM very wisely.
     
  11. Bluesfire

    Bluesfire Will Hack For Food. Member

    Joined:
    May 29, 2012
    Messages:
    23
    Location:
    Arizona.
    CaptainBritish: I had the same reasoning for using Sonic 2 when I started my hack. After moving to Sonic 1 I can guarantee it is a much easier ride. Implementing the Spindash can be difficult but it isn't too hard. My hack would still have it if I hadn't forgot to backup my Sonic1.asm file before attempting to implement new code. I lost all my bugfixes and everything along with it as well. So be careful with that ha ha. Move to Sonic 1 if you are getting frustrated with Sonic 2. It may feel bad losing all of your hard work, but in the end you will have something great, and in my case, better than what you had before.
     
  12. redhotsonic

    redhotsonic Also known as RHS Member

    Joined:
    Aug 10, 2007
    Messages:
    2,969
    Location:
    England
    Am I the only person in the world who finds Sonic 2 the easiest to hack? Years ago, it was all Sonic 2 hacks and now Sonic 1 hacks! =P


    EDIT: Spellings.
     
    Last edited by a moderator: Jun 5, 2012
  13. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    RHS: you are not. It also helps that I can't stand working with either of the currently available S1 disassemblies.
     
  14. Selbi

    Selbi The Euphonic Mess Member

    Joined:
    Jul 20, 2008
    Messages:
    2,429
    Location:
    Northern Germany
    Well, I find that you have way more control about Sonic 1 than Sonic 2 if you know what you're doing. Plus, you have a rather small game by default, so it's easy to keep things comprehensible, whereas Sonic 2 tends to just slip out of my hands all the time with its hugeness.


    But then again, that's just my opinion.
     
  15. Sonic master

    Sonic master Well-Known Member Member

    Joined:
    Mar 27, 2010
    Messages:
    303
    I don't know why but I could never get it to work on sonic 2 I have never hacked sonic 2 before so I don't know much about it.
     
  16. Animemaster

    Animemaster Lets get to work! Member

    Joined:
    Mar 20, 2009
    Messages:
    1,229
    Location:
    UK
    Pretty much what Selbi said, when I think to hack Sonic 2 I wonder where I should start because of how much is there compared to Sonic 1. In fairness though, it was proberly the matter of choosing to hack Sonic 1 or 2 to begin with and learn whatever game I chose. Like in this case I chose Sonic 1 because I thought it would be best suited to start with for some one new at hacking. But others could say that for Sonic 2.
     
  17. vladikcomper

    vladikcomper Well-Known Member Member

    Joined:
    Dec 2, 2009
    Messages:
    415
    It's matter of taste or preferences, I may say.


    I personally like Sonic 1, because it's more 'blank' than other Sonic games. The engine is simplier, the amount of coding is times smaller than in later games. Overall it's easier to learn and examine every corner of the game, this is exactly what I like to do.


    Sonic 2 is more polished overall: slightly rearranged and optimized engine with less bugs. Lots of new features you might want are here already, like Spin Dash, Tails as a partner, 2P mode etc. With this, Sonic 2 needs way fewer additions than Sonic 1. In Sonic 1, you had to add Spin Dash and fix many basic bugs.


    This, I think, is a key factor when it comes to choosing between Sonic 1 and 2. Some people may like working with the code, following guides to fix bugs and experiment with game features in Sonic 1, while others like working on content like levels and art without touching engine much in nearly-ideal Sonic 2. I'm not talking for everyone though, many people may have their own reasons I guess, that's just my thoughts =P
     
  18. MarkeyJester

    MarkeyJester ♡ ! Member

    Joined:
    Jun 27, 2009
    Messages:
    2,867
    Vladikomper, you must be me in another dimension or something because I actually feel exactly the same way, I prefer blank canvases to work on.


    However, we have had this debate regarding preferred disassemblies a many number of times now, and we always come to the conclusion that reasons for choosing a game is down to preferrence, so with that logic in mind, I feel that we can get off this subject and get back to answering basic questions. Sorry to ruin the fun folks, just doing my job here...
     
  19. Sonic master

    Sonic master Well-Known Member Member

    Joined:
    Mar 27, 2010
    Messages:
    303
    I personally am better at making my own game than hacking


    I don't always like the way something is done in a sonic game.


    And when sonic 1 is still not blank enough there is always this:



    Code:
    
    align macro
    
    	 cnop 0,1
    
    	 endm
    
    DPORT	EQU $C00000	; VDP Data port
    
    CPORT	EQU $C00004	; VDP Command port
    
    
    
    
    
    	rsset $FF0000
    
    ;all varibles go here
    
    
    
    ; ---------------------------------------------------------------------------
    
    ; disable interrupts
    
    ; ---------------------------------------------------------------------------
    
    
    
    disable_ints:	macro
    
    		move	#$2700,sr
    
    		endm
    
    
    
    ; ---------------------------------------------------------------------------
    
    ; enable interrupts
    
    ; ---------------------------------------------------------------------------
    
    
    
    enable_ints:	macro
    
    		move	#$2300,sr
    
    		endm
    
    
    
    
    
    Vectors:
    
    	dc.l $FFFE00, Entrypoint, Error, Error
    
    	dc.l Error, Error, Error, Error
    
    	dc.l Error, Error, Error, Error
    
    	dc.l Error, Error, Error, Error
    
    	dc.l Error, Error, Error, Error
    
    	dc.l Error, Error, Error, Error
    
    	dc.l Error, Error, Error, Error
    
    	dc.l HBlank, Error, VBlank, Error
    
    	dc.l Error, Error, Error, Error
    
    	dc.l Error, Error, Error, Error
    
    	dc.l Error, Error, Error, Error
    
    	dc.l Error, Error, Error, Error
    
    	dc.l Error, Error, Error, Error
    
    	dc.l Error, Error, Error, Error
    
    	dc.l Error, Error, Error, Error
    
    	dc.l Error, Error, Error, Error
    
    Header:
    
    	dc.b "SEGA MEGA DRIVE " ; Console name
    
    	dc.b "(C) Sega 16 2012" ; Copyright/Date
    
    DomesticName:
    
    	 dc.b "Genesis does									"
    
    	 dc.b "Genesis does									"
    
    	dc.b "GM 00000000-42" ; Version
    
    Checksum:
    
    	dc.w $0042  ; Checksum
    
    	dc.b "J			   " ; I/O Support
    
    RomStartLoc:
    
    	dc.l 0 ; ROM Start
    
    RomEndLoc:
    
    	dc.l RomEnd ; ROM End
    
    RamStartLoc:
    
    	dc.l $FF0000 ; RAM Start
    
    RamEndLoc:
    
    	dc.l $FFFFFF ; RAM End
    
    
    
    	dc.b $20,$20,$20,$20 ; 'RA',$F8,$20 if SRAM = on
    
    
    
    SramStart:
    
    	dc.l $20202020 ; $200000 if SRAM = on
    
    SramEnd:
    
    	dc.l $20202020 ; $20xxxx if SRAM = on
    
    
    
    	dc.b  "	"
    
    	dc.b  "				"
    
    	dc.b  "				"
    
    	dc.b  "				"
    
    	dc.b  "F			   "  ; enable any hardware configuration
    
    FMPORT1  EQU $A04000
    
    FMPORT2  EQU $A04001
    
    FMPORT3  EQU $A04002
    
    FMPORT4  EQU $A04003
    
    ;---------------------
    
    ; Code start
    
    ;---------------------
    
    
    
    Entrypoint:
    
    
    
    	tst.l ($A10008).l ;Test Port A control
    
    	bne PortA_Ok
    
    
    
    	tst.w ($A1000C).l ;Test Port C control
    
    
    
    PortA_Ok:
    
    	bne SkipSetup
    
    
    
    	move.b ($A10001).l,d0 ;version
    
    	andi.b #$F,d0
    
    	beq SkipSecurity ;if the smd/gen model is 1, skip the security
    
    	move.l #'SEGA',($A14000).l
    
    
    
    SkipSecurity:
    
    
    
    	move.w ($C00004).l,d0 ;hang if VDP locked due to security failure
    
    
    
    	moveq #0,d0
    
    	movea.l d0,a6
    
    	move.l a6,usp ;set usp to $0
    
    
    
    ;---------------------
    
    ; Setup VDP registers
    
    ;---------------------
    
    	lea (VDPSetupArray,pc),a0
    
    	move.w #(VDPSetupArrayEnd-VDPSetupArray)/2,d1 ;$18 VDP registers
    
    
    
    VDPSetupLoop:
    
    	move.w (a0)+,($C00004).l
    
    	dbra d1,VDPSetupLoop
    
    
    
    
    
    	move.l #$40000080,($C00004).l
    
    	move.w #0,($C00000).l ;clean the screen
    
    
    
    
    
    ;---------------------
    
    ; Init the Z80
    
    ;---------------------
    
    
    
    	move.w #$100,($A11100).l ;Stop the Z80
    
    	move.w #$100,($A11200).l ;Deassert reset to the Z80
    
    
    
    Waitforz80:
    
    	btst #0,($A11100).l
    
    	bne Waitforz80 ;Wait for z80 to halt
    
    
    
    	lea (Z80Init,pc),a0
    
    	lea ($A00000).l,a1
    
    	move.w #Z80InitEnd-Z80Init,d1
    
    
    
    InitZ80:
    
    	move.b (a0)+,(a1)+
    
    	dbra d1,InitZ80
    
    
    
    	move.w #0,($A11200).l ;Assert reset to the Z80
    
    	move.w #0,($A11100).l ;Start the Z80
    
    	move.w #$100,($A11200).l ;Deassert reset to the Z80
    
    
    
    
    
    ;---------------------
    
    ; Reset the RAM
    
    ;---------------------
    
    
    
    	lea ($FFFF0000).l,a0
    
    	move.w #$3fff,d1
    
    
    
    ClearRAM:
    
    	move.l #0,(a0)+
    
    	dbra d1,ClearRAM
    
    
    
    
    
    ;---------------------
    
    ; VDP again
    
    ;---------------------
    
    
    
    
    
    	move.w	#$8174,($C00004).l
    
    	move.w	#$8F02,($C00004).l
    
    
    
    
    
    ;---------------------
    
    ; Clear the CRAM
    
    ;---------------------
    
    
    
    	move.l #$C0000000,($C00004).l ;Set VDP ctrl to CRAM write
    
    	move.w #$3f,d1
    
    
    
    ClearCRAM:
    
    	move.w #0,($C00000).l
    
    	dbra d1,ClearCRAM
    
    
    
    
    
    ;---------------------
    
    ; Clear the VDP stuff
    
    ;---------------------
    
    
    
    	move.l #$40000010,($C00004).l
    
    	move.w #$13,d1
    
    
    
    ClearStuff:
    
    	move.l #0,($C00000).l
    
    	dbra d1,ClearStuff
    
    
    
    
    
    ;---------------------
    
    ; Init the PSG
    
    ;---------------------
    
    
    
    	move.b #$9F,($C00011).l
    
    	move.b #$BF,($C00011).l
    
    	move.b #$DF,($C00011).l
    
    	move.b #$FF,($C00011).l
    
    
    
    ;---------------------
    
    ; Load the z80 driver
    
    ;---------------------
    
    
    
    	move.w #$100,($A11100).l ;Stop the Z80
    
    	move.w #$100,($A11200).l ;Deassert reset to the Z80
    
    
    
    Waitforz80a:
    
    	btst #0,($A11100).l
    
    	bne Waitforz80a ;Wait for z80 to halt
    
    
    
    	lea (Z80Driver,pc),a0
    
    	lea ($A00000).l,a1
    
    	move.w #Z80DriverEnd-Z80Driver,d1
    
    
    
    LoadZ80Driver:
    
    	move.b (a0)+,(a1)+
    
    	dbra d1,LoadZ80Driver
    
    
    
    	move.w #0,($A11200).l ;Assert reset to the Z80
    
    	move.w #0,($A11100).l ;Start the Z80
    
    	move.w #$100,($A11200).l ;Deassert reset to the Z80
    
    
    
    ;---------------------
    
    ; Clear the registers
    
    ; and set the SR
    
    ;---------------------
    
    
    
    	movem.l ($FF0000).l,d0-a6
    
    	lea ($FFFE00).l,a7
    
    	move #$2700,sr
    
    SkipSetup:
    
    
    
    
    
    ;-----------------------
    
    ; Here starts your code
    
    ;-----------------------
    
    Main:
    
    
    
    ;---------------------------------
    
    ; nothing else for the 68000 to do
    
    ;---------------------------------
    
    loop:
    
    	bra.s	loop
    
    	rts
    
    ;---------------------
    
    ; Error exceptions
    
    ;---------------------
    
    
    
    Error:
    
    	rte
    
    
    
    ;---------------------
    
    ; Horizontal Blank
    
    ;---------------------
    
    HBlank:
    
    	rte
    
    ;---------------------
    
    ; Vertical Blank
    
    ;---------------------
    
    VBlank:
    
    	rte
    
    ;---------------------
    
    ; VDP registers array
    
    ;---------------------
    
    
    
    VDPSetupArray:
    
    	dc.w $8004 ;9-bit palette = 1 (otherwise would be 3-bit), HBlank = 0
    
    	dc.w $8134 ;Genesis display = 1, DMA = 1, VBlank = 1, display = 0
    
    	dc.w $8230 ;Scroll A - $C000
    
    	dc.w $8338 ;Window - $E000
    
    	dc.w $8407 ;Scroll B - $E000
    
    	dc.w $857c ;Sprites - $F800
    
    	dc.w $8600 ;Unused
    
    	dc.w $8700 ;Backdrop color - $00
    
    	dc.w $8800 ;Unused
    
    	dc.w $8900 ;Unused
    
    	dc.w $8A00 ;H Interrupt register
    
    	dc.w $8B00 ;Full screen scroll, no external interrupts
    
    	dc.w $8C81 ;40 cells display
    
    	dc.w $8D3F ;H Scroll - $FC00
    
    	dc.w $8E00 ;Unused
    
    	dc.w $8F02 ;VDP auto increment
    
    	dc.w $9001 ;64 cells scroll
    
    	dc.w $9100 ;Window H position
    
    	dc.w $9200 ;Window V position
    
    	dc.w $93FF ;DMA stuff (off)
    
    	dc.w $94FF ;DMA stuff (off)
    
    	dc.w $9500 ;DMA stuff (off)
    
    	dc.w $9600 ;DMA stuff (off)
    
    	dc.w $9780 ;DMA stuff (off)
    
    VDPSetupArrayEnd:
    
    
    
    
    
    ;---------------------
    
    ; Z80 init code
    
    ;---------------------
    
    
    
    Z80Init:
    
    	dc.w $af01, $d91f, $1127, $0021, $2600, $f977
    
    	dc.w $edb0, $dde1, $fde1, $ed47, $ed4f, $d1e1
    
    	dc.w $f108, $d9c1, $d1e1, $f1f9, $f3ed, $5636
    
    	dc.w $e9e9
    
    Z80InitEnd:
    
    ; ---------------------------------------------------------------------------
    
    ; Subroutine to	display	patterns via the VDP
    
    ; ---------------------------------------------------------------------------
    
    
    
    ; ||||||||||||||| S U B	R O U T	I N E |||||||||||||||||||||||||||||||||||||||
    
    
    
    
    
    ShowVDPGraphics:			; XREF: SegaScreen; TitleScreen; SS_BGLoad
    
    		lea	($C00000).l,a6
    
    		move.l	#$800000,d4
    
    
    
    loc_142C:
    
    		move.l	d0,4(a6)
    
    		move.w	d1,d3
    
    
    
    loc_1432:
    
    		;move.w	(A2)+,d5;changed from a1 to A2
    
    		;add.w	(tile_offset),d5; add to offset tiles
    
    		;add.w	d7,d5
    
    		move.w	(a0)+,(a6)
    
    		dbf	d3,loc_1432
    
    		add.l	d4,d0
    
    		dbf	d2,loc_142C
    
    		rts	
    
    ; End of function ShowVDPGraphics
    
    ;---------------------
    
    ; Music driver (z80)
    
    ;---------------------		
    
    
    
    Z80Driver:
    
    		dc.b	$c3,$46,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
    
    		dc.b	$00,$00,$00,$00,$00,$f3,$ed,$56,$31,$00,$20,$3a,$39,$00,$b7,$ca,$4c,$00,$21,$3a,$00,$11,$40,$00,$01,$06,$00,$ed,$b0,$3e,$00,$32,$39,$00,$3e,$b4,$32,$02,$40,$3e,$c0,$32,$03,$40,$3e,$2b,$32,$00,$40,$3e,$80,$32,$01,$40,$3a,$43,$00,$4f,$3a,$44,$00,$47,$3e,$06,$3d
    
    		dc.b	$c2,$81,$00,$21,$00,$60,$3a,$41,$00,$07,$77,$3a,$42,$00,$77,$0f,$77,$0f,$77,$0f,$77,$0f,$77,$0f,$77,$0f,$77,$0f,$77,$3a,$40,$00,$6f,$3a,$41,$00,$f6,$80,$67,$3e,$2a,$32,$00,$40,$7e,$32,$01,$40,$21,$40,$00,$7e,$c6,$01,$77,$23,$7e,$ce,$00,$77,$23,$7e,$ce,$00,$77
    
    		dc.b	$3a,$39,$00,$b7,$c2,$4c,$00,$0b,$78,$b1,$c2,$7f,$00,$3a,$45,$00,$b7,$ca,$4c,$00,$3d,$3a,$45,$00,$06,$ff,$0e,$ff,$c3,$7f,$00
    
    Z80DriverEnd:
    
    
    
    
    
    RomEnd:
    
    
     
    Last edited by a moderator: Jun 5, 2012
  20. Bluesfire

    Bluesfire Will Hack For Food. Member

    Joined:
    May 29, 2012
    Messages:
    23
    Location:
    Arizona.
    I am having issues with running sprites in Sonic 1. I am changing the sprites to my fan character, Electro. I made sure the running sprites are perfectly aligned and in the proper places, but the first frame jumps a bit ahead of the other 3. If pics are needed, I will post, if it is a common fixable error, could someone please help? I tried everything. I am using SonMapEd


    EDIT: Nevermind, I am stupid, I forgot that I had been leaving dead sprites in it after loading blank tiles ( I use Chimpo's method)


    Sorry for asking a VERY noobish question ha ha..
     
    Last edited by a moderator: Jun 6, 2012