Jump to content

  •  

Photo

Basic Questions and Answers Thread


  • Please log in to reply
1572 replies to this topic

#1207 Selbi

Selbi

    Obligatory new year's avatar remake.

  • Pro User
  • 1675 posts
  • Gender:Male
  • Location:Lüneburg, Germany

Posted 20 August 2012 - 10:26 PM

I would like to help, but I'm afraid I can't find a question.
  • 0

#1208 Mike B Berry

Mike B Berry

    The requisite of life

  • Member
  • 324 posts
  • Gender:Male
  • Location:Stanfield Oregon
  • Interests:Studying ASM and editing Sega Genesis roms.

Posted 20 August 2012 - 10:49 PM

What would be my best option?

If that wan't enough then could you please help me with my issue, sir Selbi?

Edited by Mike B Berry, 20 August 2012 - 10:53 PM.

  • 0

#1209 Selbi

Selbi

    Obligatory new year's avatar remake.

  • Pro User
  • 1675 posts
  • Gender:Male
  • Location:Lüneburg, Germany

Posted 20 August 2012 - 11:25 PM

Oh I've seen that, and that's not the issue. I was asking what it is you are actually asking for? What sort of option? Sorry if I'm misreading something here, but I can't seem to find your question.
  • 0

#1210 Mike B Berry

Mike B Berry

    The requisite of life

  • Member
  • 324 posts
  • Gender:Male
  • Location:Stanfield Oregon
  • Interests:Studying ASM and editing Sega Genesis roms.

Posted 20 August 2012 - 11:32 PM

Oh that. I need to construct the code and have it loaded once GHZ is loaded. Could you help out in any way?
  • 0

#1211 Selbi

Selbi

    Obligatory new year's avatar remake.

  • Pro User
  • 1675 posts
  • Gender:Male
  • Location:Lüneburg, Germany

Posted 21 August 2012 - 12:47 AM

Ah, now I get it.

Well, you really shouldn't use a completely new object and rather go with a level specific version of Obj5C. Generally, all you need to do is to change the tile offset to the new location. As a basic example of how that works:
		move.w	#$83CC,2(a0)	; set offest for SLZ
tst.b ($FFFFFE10).w ; is level GHZ?
bne.s Obj5C_NotGHZ ; if not, branch
move.w #$8555,2(a0) ; set offset for GHZ

Obj5C_NotGHZ:

You obviously need to change the tile offset to whatever VRAM address you've assigned your new art to.
  • 0

#1212 Mike B Berry

Mike B Berry

    The requisite of life

  • Member
  • 324 posts
  • Gender:Male
  • Location:Stanfield Oregon
  • Interests:Studying ASM and editing Sega Genesis roms.

Posted 21 August 2012 - 03:07 AM

Alright, I have the new VRAM adress set, now I need to implement the art into GHZ it'sself... bombard me with negative reputation, I can take it. Could you possibly guide me through this bit as well?
  • 0

#1213 tristanseifert

tristanseifert

    I make... THINGS!

  • Member
  • 370 posts
  • Gender:Male
  • Location:Austin, TX

Posted 21 August 2012 - 08:04 PM

Alright, I have the new VRAM adress set, now I need to implement the art into GHZ it'sself... bombard me with negative reputation, I can take it. Could you possibly guide me through this bit as well?

It's actually quite special. Sonic 1 loads art when the level loads through the use of the Pattern Load Cue system. Open the file in "_inc/Pattern load cues.asm" Since you want to add something to Green Hill, find the label called "PLC_GHZ" You should see something as below (I might've edited this):


; ---------------------------------------------------------------------------
; Pattern load cues - Green Hill
; ---------------------------------------------------------------------------
PLC_GHZ: dc.w $A
dc.l Nem_GHZ_1st ; GHZ main patterns
dc.w 0
dc.l Nem_Stalk ; flower stalk
dc.w $6B00
dc.l Nem_PplRock ; purple rock
dc.w $7A00
dc.l Nem_Crabmeat ; crabmeat enemy
dc.w $8000
dc.l Nem_Buzz ; buzz bomber enemy
dc.w $8880
dc.l Nem_Chopper ; chopper enemy
dc.w $8F60
dc.l Nem_Newtron ; newtron enemy
dc.w $9360
dc.l Nem_Motobug ; motobug enemy
dc.w $9E00
dc.l Nem_Spikes ; spikes
dc.w $A360
dc.l Nem_HSpring ; horizontal spring
dc.w $A460
dc.l Nem_VSpring ; vertical spring
dc.w $A660
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


You'll notice there's two PLC's — one loads before the title card fades out, another while the level is faded in already.

Anyways, as you may notice, the first word of the PLC is the number of entries in the PLC, minus one. Followed by that is 6 bytes per pattern entry. The first is a longword pointing to the art, and the second is the word offset into VRAM where it will be loaded. Art must be Nemesis compressed. The rest should be obvious =P
  • 0

#1214 Mike B Berry

Mike B Berry

    The requisite of life

  • Member
  • 324 posts
  • Gender:Male
  • Location:Stanfield Oregon
  • Interests:Studying ASM and editing Sega Genesis roms.

Posted 21 August 2012 - 11:38 PM

I have that already entered and such into the PLC. The art dosent load. I suppose the VRAM adress is not valid. I'll conitnue working on it. Thanks for the information anyway.
  • 0

#1215 rika_chou

rika_chou

    Adopt

  • Pro User
  • 306 posts
  • Gender:Male

Posted 22 August 2012 - 06:42 AM

Remember, to get the right VRAM address you have to multiply your tile number by 20.


So if your object code is using $3CC, like the above code, multiply it by $20 to get $7980 (using a hex calculator).

An easy way to see the VRAM is to make a savestate when your level is loaded, open the savestate in SonED1, read the 8x8 tiles from the savestate, go to the tile editor, then you can see where everything is loaded. This helps when trying to find some free VRAM space.
  • 0

#1216 Mike B Berry

Mike B Berry

    The requisite of life

  • Member
  • 324 posts
  • Gender:Male
  • Location:Stanfield Oregon
  • Interests:Studying ASM and editing Sega Genesis roms.

Posted 23 August 2012 - 02:52 AM

I have object 5C loaded in GHZ but it is not loading the art set specifically for it and the PLC has the code of the object I want loaded. But it loads nothing more than a hunk of garbage. So I know that it isn't loading anything but the object its'self. The code has been changed a bit and the new VRAM pointers are set, but it still dosen't load. It'd be the best option to post the actual object code to be sure if I made a mistake:


; ---------------------------------------------------------------------------

; Object 5C - metal girders in foreground (SLZ)

; ---------------------------------------------------------------------------

Obj5C:	 ; XREF: Obj_Index

moveq #0,d0

move.b $24(a0),d0

move.w Obj5C_Index(pc,d0.w),d1

jmp Obj5C_Index(pc,d1.w)

; ===========================================================================

Obj5C_Index: dc.w Obj5C_Main-Obj5C_Index

dc.w Obj5C_Display-Obj5C_Index

; ===========================================================================

Obj5C_Main: ; XREF: Obj5C_Index

move.w #$7980,2(a0) ; set offest for SLZ

tst.b ($FFFFFE10).w ; is level GHZ?

bne.s Obj5C_NotGHZ ; if not, branch

move.w #$8555,2(a0) ; set offset for GHZ

Obj5C_NotGHZ:

addq.b #2,$24(a0)

move.l #Map_obj5C,4(a0)

move.w #$83CC,2(a0)

move.b #$10,$19(a0)

Obj5C_Display: ; XREF: Obj5C_Index

move.l ($FFFFF700).w,d1

add.l d1,d1

swap d1

neg.w d1

move.w d1,8(a0)

move.l ($FFFFF704).w,d1

add.l d1,d1

swap d1

andi.w #$3F,d1

neg.w d1

addi.w #$100,d1

move.w d1,$A(a0)

bra.w DisplaySprite

; ===========================================================================

; ---------------------------------------------------------------------------

; Sprite mappings - metal girders in foreground (SLZ)

; ---------------------------------------------------------------------------

Map_obj5C: include "_mapsobj5C.asm"

Map_obj5Cghz: include "_mapsghztotem.asm"

even

Nem_OBJ5c: incbin "artnemghztotem.bin" ; large totem pole in GHZ

even

...

Is the code just incomplete or is it that nothing is leading to the projection of the art its'self?

Edited by Mike B Berry, 23 August 2012 - 02:52 AM.

  • 0

#1217 Malevolence

Malevolence

    2 Chaos Emeralds

  • Pro User
  • 94 posts
  • Gender:Male

Posted 23 August 2012 - 03:27 AM

You know that code is continuous right?

Obj5C_Main: ; XREF: Obj5C_Index
move.w #$7980,2(a0) ; set offest for SLZ
tst.b ($FFFFFE10).w ; is level GHZ?
bne.s Obj5C_NotGHZ ; if not, branch
move.w #$8555,2(a0) ; set offset for GHZ
Obj5C_NotGHZ:
addq.b #2,$24(a0)
move.l #Map_obj5C,4(a0)
move.w #$83CC,2(a0)
move.b #$10,$19(a0)


If it's ghz it's going through the not ghz code too, you want

Obj5C_Main: ; XREF: Obj5C_Index
move.w #$7980,2(a0) ; set offest for SLZ
tst.b ($FFFFFE10).w ; is level GHZ?
bne.s Obj5C_NotGHZ ; if not, branch
move.w #$8555,2(a0) ; set offset for GHZ
addq.b #2,$24(a0)
move.w #$83CC,2(a0)
move.b #$10,$19(a0)
bra.s Obj5C_Display
Obj5C_NotGHZ:
addq.b #2,$24(a0)
move.l #Map_obj5C,4(a0)

or something
  • 0

#1218 Mike B Berry

Mike B Berry

    The requisite of life

  • Member
  • 324 posts
  • Gender:Male
  • Location:Stanfield Oregon
  • Interests:Studying ASM and editing Sega Genesis roms.

Posted 23 August 2012 - 03:49 AM

I did notice this, and changed the lines. It still loads incorrectly:
Posted Image

Edited by Mike B Berry, 23 August 2012 - 03:58 AM.

  • 0

#1219 rika_chou

rika_chou

    Adopt

  • Pro User
  • 306 posts
  • Gender:Male

Posted 23 August 2012 - 05:19 AM

You have to free up some VRAM or find and unused space, you can see that the tiles you are trying to use are already being used by the rock.
  • 0

#1220 Mike B Berry

Mike B Berry

    The requisite of life

  • Member
  • 324 posts
  • Gender:Male
  • Location:Stanfield Oregon
  • Interests:Studying ASM and editing Sega Genesis roms.

Posted 23 August 2012 - 06:14 AM

Well this will be a new hight. Since I never changed or have attmpted to free VRAM space. Thanks for the assistance.
  • 0

#1221 Mike B Berry

Mike B Berry

    The requisite of life

  • Member
  • 324 posts
  • Gender:Male
  • Location:Stanfield Oregon
  • Interests:Studying ASM and editing Sega Genesis roms.

Posted 07 September 2012 - 06:02 AM

I suppose this would count either as a double post or bump, and sorry if it is; but I might need this for future purposes.

Where can I find a clearly visible rendition of the full 32 bit palette entry point list?

Edited by Mike B Berry, 07 September 2012 - 06:03 AM.

  • 0

#1222 Sonic master

Sonic master

    4 Chaos Emeralds

  • Member
  • 226 posts
  • Gender:Male
  • Interests:Homebrew games for retro systems.

Posted 07 September 2012 - 08:39 PM

I suppose this would count either as a double post or bump, and sorry if it is; but I might need this for future purposes.

Where can I find a clearly visible rendition of the full 32 bit palette entry point list?

Are you talking about a pointer table
If so it looks like this

pointers:

 dc.l data1

 dc.l data2

;and so on


  • 0

#1223 Mike B Berry

Mike B Berry

    The requisite of life

  • Member
  • 324 posts
  • Gender:Male
  • Location:Stanfield Oregon
  • Interests:Studying ASM and editing Sega Genesis roms.

Posted 07 September 2012 - 11:21 PM

Nope. I'm talking about the entire 32 bit pallet system. Not the 16 bit pallet listings. I'm going to implement it into my fan game as provided as my signature below because I'm too lazy to type it up. I would like to release it before Febuary 2013. But I can't seem to find the actual listing anywhere.

Edited by Mike B Berry, 07 September 2012 - 11:23 PM.

  • 0

#1224 MarkeyJester

MarkeyJester

    A word in your shell-like, pal

  • Pro User
  • 1334 posts
  • Gender:Male

Posted 08 September 2012 - 02:32 PM

You will need to give us more information, for example "32 bit palette entry point list" ...of what? A bitmap file? And what do you mean by "clearly visible rendition"? A documentation about it?

You're doing it again, leaving us out on information we need to know, in order to answer your question.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users