Sonic and Sega Retro Message Board: Changing Sonic 2's level format - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help
  • 4 Pages +
  • 1
  • 2
  • 3
  • 4
    Locked
    Locked Forum

Changing Sonic 2's level format

#31 User is offline Caitlin 

Posted 16 January 2006 - 11:09 AM

  • Burning with revenge
  • Posts: 4406
  • Joined: 07-May 05
  • Gender:Female
  • Wiki edits:35
Why are you not a techie yet? I've seen enough from that screenshot. Good Job!

#32 User is offline jman2050 

Posted 16 January 2006 - 05:15 PM

  • Teh Sonik Haker
  • Posts: 625
  • Joined: 10-December 05
  • Wiki edits:4
On Tweaker's suggestion, I'm releasing a rough, unfinished, but working proof-of-concept rom.

http://www.cgi101.co...2050/bullet.bin

ONLY EHZ 1 1P works. Don't try anything else on this rom, as very bad things will probably happen. It's pretty much the exact same zone as before, but with a twist (hint: read my previous posts). You can't complete the level per se (there'll be a sign, but it's garbled and you won't be able to exit the level), but it is a full zone. My editor isn't far enough along to demonstrate the 64x64 tile format fully, but you can dump the RAM with KMod to see how much space has been freed up. Plus, there is a tiny, almost unnoticable section of the level that is quite impossible to draw using 128x128 tiles :)

Tell me what you think. You want to see a fully expanded level to demonstrate the changed level format, or should I get around to actually implementing this into something great?

#33 User is offline Ultima 

Posted 16 January 2006 - 06:04 PM

  • Games Publisher
  • Posts: 2394
  • Joined: 26-January 03
  • Gender:Male
  • Location:London, England
  • Project:Publishing mobile games!
Tech demo is good enough for me. Now run along and start 0wning everyone plz =P

#34 User is offline LocalH 

Posted 16 January 2006 - 06:18 PM

  • roxoring your soxors
  • Posts: 3210
  • Joined: 11-January 03
  • Gender:Male
  • Location:wouldn't you like to know
  • Project:Guitar Hero II: Rhythm Games Community Edition aka Pizza Hero II: Electric Pizza
  • Wiki edits:3
It works on hardware, but there's the same bug I saw in Cinossu's hack and mentioned here, regarding VRAM. Other than that, I didn't notice any problems that you didn't already mention (like what happens when you hit the end sign).
This post has been edited by LocalH: 16 January 2006 - 06:18 PM

#35 User is offline jman2050 

Posted 16 January 2006 - 10:42 PM

  • Teh Sonik Haker
  • Posts: 625
  • Joined: 10-December 05
  • Wiki edits:4
That's actually kind fo odd. The only thing I remember changing as far as loading level art loading is concerned is making two passes to the routine instead of one (soit doesn't decompress beyond address $4000 of ram). Don't know why that would trigger the bug.

Just asking, but you sure it isn't a problem with the disassembly itself?

#36 User is offline Hez 

Posted 16 January 2006 - 11:53 PM

  • Asshole
  • Posts: 2701
  • Joined: 11-January 03
  • Gender:Male
  • Location:Hell
  • Project:Your mother
  • Wiki edits:27
reminds me of sonic 3 kind of. Where you hit the sign post and then move on without a new level.

#37 User is offline Qjimbo 

Posted 17 January 2006 - 09:18 AM

  • Your friendly neighbourhood lemming.
  • Posts: 4385
  • Joined: 17-February 03
  • Gender:Male
  • Location:Vancouver, BC
  • Wiki edits:69

jman2050, on Jan 16 2006, 10:15 PM, said:

On Tweaker's suggestion, I'm releasing a rough, unfinished, but working proof-of-concept rom.

http://www.cgi101.co...2050/bullet.bin

ONLY EHZ 1 1P works. Don't try anything else on this rom, as very bad things will probably happen. It's pretty much the exact same zone as before, but with a twist (hint: read my previous posts). You can't complete the level per se (there'll be a sign, but it's garbled and you won't be able to exit the level), but it is a full zone. My editor isn't far enough along to demonstrate the 64x64 tile format fully, but you can dump the RAM with KMod to see how much space has been freed up. Plus, there is a tiny, almost unnoticable section of the level that is quite impossible to draw using 128x128 tiles :)

Tell me what you think. You want to see a fully expanded level to demonstrate the changed level format, or should I get around to actually implementing this into something great?

Very Cool :)

I wonder if you could make it dynamically reload levels as well, so suddenly you're in CPZ at the end of EHZ.
This post has been edited by QJimbo: 17 January 2006 - 09:22 AM

#38 User is offline LocalH 

Posted 17 January 2006 - 09:42 AM

  • roxoring your soxors
  • Posts: 3210
  • Joined: 11-January 03
  • Gender:Male
  • Location:wouldn't you like to know
  • Project:Guitar Hero II: Rhythm Games Community Edition aka Pizza Hero II: Electric Pizza
  • Wiki edits:3
That might be a bit harder since you pretty much have to reload with the new art. You could have the pallet fade to black, load new art, and fade back up. Or, you could do something like AIZ where you run through a small tunnel and the pallet changes, although this way you couldn't reload all the art, but only part of it.
This post has been edited by LocalH: 17 January 2006 - 09:43 AM

#39 User is offline Sonic Hachelle-Bee 

Posted 17 January 2006 - 10:49 AM

  • Lost in Wood zone
  • Posts: 720
  • Joined: 03-March 04
  • Gender:Male
  • Location:Paris, France
  • Project:Sonic 2 Long Version
Nice work!
I like the way you pass trough one act to another.

Quote

although this way you couldn't reload all the art, but only part of it.

I'm absolutely certain (100% sure) that you can reload all the art and all the whole level to switch to another quickly. :)

I was going to do something similar than this hack to test (without 64x64 tiles obviously), but with all levels linked. I scrapped the idea, because I tested by doing something else, and then, this was more wasted time than anything else.

#40 User is offline ICEknight 

Posted 17 January 2006 - 11:50 AM

  • Posts: 10011
  • Joined: 11-January 03
  • Gender:Male
  • Location:Spain
  • Wiki edits:18
Great stuff, even with those graphic bugs that happen on real hardware (and Kega Fusion).

#41 User is offline jman2050 

Posted 17 January 2006 - 12:07 PM

  • Teh Sonik Haker
  • Posts: 625
  • Joined: 10-December 05
  • Wiki edits:4

Sonic Hachelle-Bee, on Jan 17 2006, 07:49 AM, said:

Nice work!
I like the way you pass trough one act to another.

Quote

although this way you couldn't reload all the art, but only part of it.

I'm absolutely certain (100% sure) that you can reload all the art and all the whole level to switch to another quickly. :)


I think he meant logically. Obviously, it's technically possible as it only takes a single VBlank to DMA all the art over before refreshing the screen, but it would look weird in-game if EHZ suddenly shifted to CPZ instantly :P

EDIT - Oh, and btw, I fixed the VRAM bug LocalH was talking about. Turns out it wasn't a VRAM issue at all; it was a DMA issue. More specifically, a bug in the game itself. Basically, in order to load level art into VRAM, it does it backwards. It uses the ending address of the decompressed data in RAM and derives the length in words of the first DMA transfer. It does this by using the lower 12 bits (if the ending address were $6C00, it uses $C00, and right shifts it to get the DMA length). Then after the initial transfer it loads the rest of the art backwards by $1000 byte chunks until it reaches $0000.

The problem with this code is that it assumes it's going to find a length. If the decompressed art ends at an address divisible by $1000 (as it does in my case), what happens is that the game uses a length of 0 for the first DMA transfer. Gens apparantly ignores DMA transfers of zero length, but the Genesis (and Kega) don't, and it screws everything up as a result. It's an easy fix too: Right before the call to the subroutine $144E around offset 4F1A, just test d3 for zero, and skip the call to $144E if that's the case. Bug fixed, problem solved.

And a new rom to be uploaded for testing just for you LocalH :)
This post has been edited by jman2050: 17 January 2006 - 05:46 PM

#42 User is offline LocalH 

Posted 17 January 2006 - 05:38 PM

  • roxoring your soxors
  • Posts: 3210
  • Joined: 11-January 03
  • Gender:Male
  • Location:wouldn't you like to know
  • Project:Guitar Hero II: Rhythm Games Community Edition aka Pizza Hero II: Electric Pizza
  • Wiki edits:3
Yeah, that's pretty much what I meant. Using the method #2 I mentioned, you couldn't reload all the art because some of it would be used on-screen at that moment.

#43 User is offline jman2050 

Posted 17 January 2006 - 06:03 PM

  • Teh Sonik Haker
  • Posts: 625
  • Joined: 10-December 05
  • Wiki edits:4
nvm - New ROM uploaded
This post has been edited by jman2050: 17 January 2006 - 06:36 PM

#44 User is offline Sonic Hachelle-Bee 

Posted 17 January 2006 - 06:25 PM

  • Lost in Wood zone
  • Posts: 720
  • Joined: 03-March 04
  • Gender:Male
  • Location:Paris, France
  • Project:Sonic 2 Long Version

Quote

Yeah, that's pretty much what I meant. Using the method #2 I mentioned, you couldn't reload all the art because some of it would be used on-screen at that moment.

Yes, it's obvious... You are right. =P

#45 User is offline Varion Icaria 

Posted 21 January 2006 - 07:21 PM

  • He's waiting....
  • Posts: 1004
  • Joined: 26-August 03
  • Gender:Male
  • Project:S4: Cybernetic Outbreak
  • Wiki edits:1
Sorry for the bump but since the topic currently is on DMA's I have a question, How would I get the DMA to load art that gets decompressed by one of the decompression routines? There should be a way to do it [S3 does it somehow] so I was wondering if any of you know how?

  • 4 Pages +
  • 1
  • 2
  • 3
  • 4
    Locked
    Locked Forum

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users