Changing Sonic 2's level format
#31
Posted 16 January 2006 - 11:09 AM
Why are you not a techie yet? I've seen enough from that screenshot. Good Job!
#32
Posted 16 January 2006 - 05:15 PM
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?
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
Posted 16 January 2006 - 06:04 PM
Tech demo is good enough for me. Now run along and start 0wning everyone plz =P
#34
Posted 16 January 2006 - 06:18 PM
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
Posted 16 January 2006 - 10:42 PM
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?
Just asking, but you sure it isn't a problem with the disassembly itself?
#36
Posted 16 January 2006 - 11:53 PM
reminds me of sonic 3 kind of. Where you hit the sign post and then move on without a new level.
#37
Posted 17 January 2006 - 09:18 AM
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?
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
Posted 17 January 2006 - 09:42 AM
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
Posted 17 January 2006 - 10:49 AM
Nice work!
I like the way you pass trough one act to another.
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.
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
Posted 17 January 2006 - 11:50 AM
Great stuff, even with those graphic bugs that happen on real hardware (and Kega Fusion).
#41
Posted 17 January 2006 - 12:07 PM
Sonic Hachelle-Bee, on Jan 17 2006, 07:49 AM, said:
Nice work!
I like the way you pass trough one act to another.
I'm absolutely certain (100% sure) that you can reload all the art and all the whole level to switch to another quickly.
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
Posted 17 January 2006 - 05:38 PM
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
Posted 17 January 2006 - 06:03 PM
nvm - New ROM uploaded
This post has been edited by jman2050: 17 January 2006 - 06:36 PM
#44
Posted 17 January 2006 - 06:25 PM
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
Posted 21 January 2006 - 07:21 PM
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?


00