Sonic the Hedgehog: A true port.

A place where you can keep others updated about your NES-related projects through screenshots, videos or information in general.

Moderator: Moderators

DoubbleTheFun
Posts: 9
Joined: Wed Mar 29, 2023 5:24 pm

Sonic the Hedgehog: A true port.

Post by DoubbleTheFun »

Sonic the Hedgehog: A true port is a work in progress port of the SEGA Genesis game Sonic the Hedgehog from 1991, if this sounds familiar, that's because this project is inspired by Somari and it's hack Sonic the Hedgehog Improvement Vol. 2 This is not meant to replace Sonic Vol. 2, but instead be my own take on Sonic on the NES. A true port is meant to be, gameplay wise, as close to the original Sonic the Hedgehog as possible, using resources such as the Sonic 1 disassembly and the Sonic Physics Guide on Sonic Retro. The music will be recreated using the Konami VRC7 to get it sounding as close as possible, though a patch will be available to replace it with simpler tracks that don't use the VRC7. I don't have a ROM download yet, I want to finish Sonic's sprites and all the music before I start working on the port itself. I currently have the Title Screen, Green Hill Zone (Glitched), Marble Zone, Spring Yard Zone, and Labyrinth Zone music tracks, and I am working on Sonic's sprites, being a direct edit of Sonic 1's sprites, though I am not the best at NES art so they probably won't look the best.

Below is a sample of music (the glitched GHZ) to prove this project does exist.
https://drive.google.com/file/d/1kGu-pb ... sp=sharing
DoubbleTheFun
Posts: 9
Joined: Wed Mar 29, 2023 5:24 pm

Re: Sonic the Hedgehog: A true port.

Post by DoubbleTheFun »

Some Sonic sprites
Attachments
Sonic Sprites
Sonic Sprites
User avatar
tokumaru
Posts: 12427
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Sonic the Hedgehog: A true port.

Post by tokumaru »

I'm not gonna lie, this is not gonna be easy! I've wanted to make a good Sonic game on the NES for a good while myself, so I'm interested to see where this goes.

Sonic physics aren't particularly complex, and since only Sonic himself actually makes use of the 360 degree physics, the NES CPU might just be able to handle it if you're clever with the multiplications and divisions.

I doubt that a 1:1 (gameplay) port is possible, due to memory and CPU constraints, and you may have to cut down on things like the number of active objects. The sprite limitations of the NES are also a big concern, and you might have to resort to using the background to render big objects like Marble Zone's moving pillars, if you plan on keeping everything.

Personally, I'd prefer to make an original game with Sonic-like worlds and physics, because when you're going for a 1:1 convertion to a less capable system, the result is always gonna be inferior to the original, giving people little reason to play the port besides the morbid curiosity of checking out how much got lost in the translation. An original game with new levels and gameplay elements, on the other hand, brings the general feel of the game to a new platform, while also offering new content to keep players engaged. That's just me, though... others might find direct ports more interesting.

Good luck!

EDIT: The sprites look okay, but you could try making the shoes a bit more orange so you can use the same color for Sonic's tan areas (ears, snout, arms and belly). They did this on the Master System version (even though sprites can be much more colorful there!), and IMO it's better to have 1 slightly miscolored thing (the shoes) than all those areas of his body.
User avatar
Gilbert
Posts: 564
Joined: Sun Dec 12, 2010 10:27 pm
Location: Hong Kong
Contact:

Re: Sonic the Hedgehog: A true port.

Post by Gilbert »

As tokumaru pointed out, some things are inevitably scaled down.

Flickering/stuff disappearing would be one of the main obstacles. Not only because of the movable stage objects and enemies, having loads of rings spilling out after you get hit would also be something hard to get right.

Maybe try to base the game on the SMS/GG versions and try to add features in the original 16-bit version wherever feasible?
In this way, you may even have something better than Sega can offer officially.
(OK, having good music using VRC7 or even the barebones Famicom soundchip could already be something that can be better than the PSG of SMS/GG.)
User avatar
Individualised
Posts: 310
Joined: Mon Sep 05, 2022 6:46 am

Re: Sonic the Hedgehog: A true port.

Post by Individualised »

This is definitely something I'd be excited for, but do keep in mind that "port" has a very specific meaning, even if it's often used to describe any type of game conversion, and using the phrase "true port" implies that you really mean it's a port. I know it's probably irrelevant but I wanted to make sure you were aware of the difference as this isn't really a ROM-hacking community and people here might be thinking of something different when you use that phrase. I think expecting a 1:1 port of the original game logic is a bit too much for the NES.

I'm really excited to see what you do with this though. Have you done any NES homebrew in the past? Sprites look cool, though they could do with a bit of shading and/or dithering. I've always wanted to have a go at porting (as in; the original game logic) the game to SNES in the far future.
User avatar
Goose2k
Posts: 320
Joined: Wed May 13, 2020 8:31 am
Contact:

Re: Sonic the Hedgehog: A true port.

Post by Goose2k »

DoubbleTheFun wrote: Wed Mar 29, 2023 6:26 pm A true port is meant to be, gameplay wise, as close to the original Sonic the Hedgehog as possible, using resources such as the Sonic 1 disassembly and the Sonic Physics Guide on Sonic Retro.
Sounds cool! Is the plan to go line-by-line of the disassembly and convert to 6502?

Have you considered using a Sonic SMS disassembly rather than Genesis? I think those game's aren't well regarded, but I wonder if it would be a better starting point for the NES?

Anyway, good luck!
Last edited by Goose2k on Fri Apr 07, 2023 10:55 am, edited 1 time in total.
User avatar
Individualised
Posts: 310
Joined: Mon Sep 05, 2022 6:46 am

Re: Sonic the Hedgehog: A true port.

Post by Individualised »

Goose2k wrote: Thu Mar 30, 2023 9:58 am
DoubbleTheFun wrote: Wed Mar 29, 2023 6:26 pm A true port is meant to be, gameplay wise, as close to the original Sonic the Hedgehog as possible, using resources such as the Sonic 1 disassembly and the Sonic Physics Guide on Sonic Retro.
Sounds cool! Is the plan to go line-by-line of the disassembly and convert to 6502?

Have you considered using a Sonic SMS disassembly rather than Genesis? I think those game's aren't well regarded, but I wonder if it would be a better starting point for the NES?

Anyway, good luck!
The 8-bit Sonic games are well regarded, they're just completely different games from their 16-bit counterparts, that's all. Sonic 1 8-bit has already been ported to 6502, on the Commodore 64, so it's feasible.

While a conversion of the Mega Drive game would be feasible (Hummer Team's attempt shows the NES is fine at handling long, sprawling levels that scroll in all 4 directions, something most official games couldn't pull off), porting it line-by-line would likely be too much for the NES - it was almost too much for the SNES even, hence why TiagoSC's SNES demo had major refactoring to the code. It would have to be an original codebase. Interested to see what OP will do with this.
DoubbleTheFun
Posts: 9
Joined: Wed Mar 29, 2023 5:24 pm

Re: Sonic the Hedgehog: A true port.

Post by DoubbleTheFun »

tokumaru wrote: Wed Mar 29, 2023 9:33 pm I doubt that a 1:1 (gameplay) port is possible, due to memory and CPU constraints, and you may have to cut down on things like the number of active objects. The sprite limitations of the NES are also a big concern, and you might have to resort to using the background to render big objects like Marble Zone's moving pillars, if you plan on keeping everything.
Yeah, fair, a 1:1 gameplay port is probably not possible, and most of Sonic's player code (Like three or four files in the original game!), has been entirely rewritten from the ground up. I'm 100% sure there will be things that are not ported over, like zone specific objects that are not crucial to the game, (e.g. Those unused balls in Green Hill Zone, Those fire shooters in Marble Zone, That one floating platform in Labyrinth Zone Act 1.) Along side that, I do plan on splitting this into two parts if I need to for storage reasons, GHZ-SYZ and LZ-FZ.
Gilbert wrote: Thu Mar 30, 2023 9:58 am
Flickering/stuff disappearing would be one of the main obstacles. Not only because of the movable stage objects and enemies, having loads of rings spilling out after you get hit would also be something hard to get right.

Maybe try to base the game on the SMS/GG versions and try to add features in the original 16-bit version wherever feasible?
In this way, you may even have something better than Sega can offer officially.
(OK, having good music using VRC7 or even the barebones Famicom soundchip could already be something that can be better than the PSG of SMS/GG.)
Flickering stuff would be an issue, but I'm trying to do my best to minimize that, by doing things like putting static objects "in the background", taking the ring drop mechanic from Sonic 1 SMS, (Which means you can't re-grab lost rings.)

For the SMS/GG suggestion, sadly I've already gone to far into the soundtrack (At this point I've made some progress on most tracks) and a lot of sprites for that to be feasible, some actual code too, but that's too early to really care about right now, though I will take from Sonic 1 SMS/GG when needed
Individualised wrote: Thu Mar 30, 2023 1:52 am This is definitely something I'd be excited for, but do keep in mind that "port" has a very specific meaning, even if it's often used to describe any type of game conversion, and using the phrase "true port" implies that you really mean it's a port. I know it's probably irrelevant but I wanted to make sure you were aware of the difference as this isn't really a ROM-hacking community and people here might be thinking of something different when you use that phrase. I think expecting a 1:1 port of the original game logic is a bit too much for the NES.

I'm really excited to see what you do with this though. Have you done any NES homebrew in the past? Sprites look cool, though they could do with a bit of shading and/or dithering. I've always wanted to have a go at porting (as in; the original game logic) the game to SNES in the far future.
The name "A true port" was more of a joking light jab twords Somari and how at some points it's barely recognizable as Sonic the Hedgehog (Spring Yard Zone, anyone?), though I do see your point and probably should of named it differently. Sorry for any confusion.

I have done some projects on the NES that I've kept to myself so I could get really comfortable with 6502, mainly so I could make this project to the best of my abilities, but some were for fun, as for the Sonic sprites, I'm not the best with graphics on the NES, so these will probably be what I stick with until I eventually get confident enough to replace them, though thanks for the ideas, and also, as for your idea, go for it, the longer the idea sits there, the more pressure you have, or the more it fades, at least for me. :/
Individualised wrote: Thu Mar 30, 2023 11:11 am While a conversion of the Mega Drive game would be feasible (Hummer Team's attempt shows the NES is fine at handling long, sprawling levels that scroll in all 4 directions, something most official games couldn't pull off), porting it line-by-line would likely be too much for the NES - it was almost too much for the SNES even, hence why TiagoSC's SNES demo had major refactoring to the code. It would have to be an original codebase. Interested to see what OP will do with this.
It will be an original codebase, just using the Sonic 1 disasm and Sonic Retro as a guide, (And sometimes borrowing things from Sonic 1 Disasm if possible.) I'm excited to show you all my progress.

EDIT: Original post was a broken unreadable mess.
EDIT 2: "that are not be" -Doubble, 2023
User avatar
Individualised
Posts: 310
Joined: Mon Sep 05, 2022 6:46 am

Re: Sonic the Hedgehog: A true port.

Post by Individualised »

Sounds like you have a plan! Good luck, looking forward to seeing your progress! :D
DoubbleTheFun
Posts: 9
Joined: Wed Mar 29, 2023 5:24 pm

Re: Sonic the Hedgehog: A true port.

Post by DoubbleTheFun »

One thing that will save my ass when it comes to storage space is Sonic's chunk system. Yes that system the Classic Sonic games used that made their levels feel repetitive sometimes. Except for Sonic 3 & Knuckles, 3K was really good with making it's levels feel fluid and unique- er- Chunks. They are REALLY good for compression, which is no surprise considering that's why they were used in the first place. I'm pretty sure most people who check this thread know what chunks are and how they work, but under the "it's better to assume everyone knows nothing and risk being annoying then to assume everyone knows and leave people who don't in the dark" logic, Sonic 1 levels are all about parts. Acts are a collection of 256x256 pixel Chunks, Chunks are split into 16x16 Tiles, 16x16 Tiles are split into 8x8 Tiles. But wait, 256x256 pixel chunks? That takes a LOT of RAM, so I'm taking the Sonic 2 approach, 128x128 chunks, while yes, each level will still effectively be split into 256x256 areas, the chunks themself take up less RAM, but levels will be twice as large compressed. It's a trade off but it's necessary.
User avatar
Individualised
Posts: 310
Joined: Mon Sep 05, 2022 6:46 am

Re: Sonic the Hedgehog: A true port.

Post by Individualised »

Hummer Team's Sonic uses the chunk system too. This carried over into their later conversions of platforming games, including Super Mario World oddly enough. I don't recall how big they are but I can check. The mapper that Hummer Team usually used did not have any PRG-RAM (this is why you couldn't break blocks in Super Mario World even though they tried to stay faithful to other parts of the game - it wasn't due to a lack of effort or programming skill, it was literally impossible without more ram/a better mapper. I believe I may have mentioned this on here before but whoever did the engine programming for Hummer Team's games was really talented and knew what they were doing. They did a lot of stuff that was only normal for games on 16-bit consoles and most official NES developers couldn't pull off. It's just that the "front-end" stuff; i.e. physics, sound, etc, was janky.)
Last edited by Individualised on Tue Apr 04, 2023 10:39 am, edited 1 time in total.
User avatar
tokumaru
Posts: 12427
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Sonic the Hedgehog: A true port.

Post by tokumaru »

IIRC, Somari has its 256x256 chunks uncompressed in ROM, which limits the number of possible unique chunks, making level layouts significantly more repetitive than in the original Sonic 1.
DoubbleTheFun
Posts: 9
Joined: Wed Mar 29, 2023 5:24 pm

Re: Sonic the Hedgehog: A true port.

Post by DoubbleTheFun »

tokumaru wrote: Tue Apr 04, 2023 7:16 am IIRC, Somari has its 256x256 chunks uncompressed in ROM, which limits the number of possible unique chunks, making level layouts significantly more repetitive than in the original Sonic 1.
The way I'm making chunks is by combining 8x8 tiles into 16x16 tiles with extra data (collison? semisolid?), and then building them up into chunks (like in the original Genesis/Mega Drive game), and compressing the chunks similarly to how the levels are compressed. I'm not entirely sure if that's how Somari does it, but if it does, thats neat.

Theoretically, that would free up enough room to have enough chunks to recreate the levels.
User avatar
tokumaru
Posts: 12427
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Sonic the Hedgehog: A true port.

Post by tokumaru »

Somari does not compress the chunks, because it doesn't have enough RAM to hold the decompressed data.

How much extra RAM are you using in your project? The 8KB commonly found in NES cartridges is not nearly enough to hold Sonic 1's chunks (IIRC it supports up to 82 chunks at a time) and level layouts, so I'm wondering what your plan is regarding all the RAM needed for levels and object states.
DoubbleTheFun
Posts: 9
Joined: Wed Mar 29, 2023 5:24 pm

Re: Sonic the Hedgehog: A true port.

Post by DoubbleTheFun »

tokumaru wrote: Tue Apr 04, 2023 8:52 am How much extra RAM are you using in your project? The 8KB commonly found in NES cartridges is not nearly enough to hold Sonic 1's chunks (IIRC it supports up to 82 chunks at a time) and level layouts, so I'm wondering what your plan is regarding all the RAM needed for levels and object states.
I'm trying to keep it at 8KB for real hardware compatibility (specifically flashcarts with only 8KB, same reason there will be two soundtracks)
The way I want to do this is by loading only the chunk data for nine screens (screens of course being a grid where each box is the size of the screen) into RAM at a time (the current screen, one above, one below, one left, one right, and four on the diagonal), and cutting "unnecessary" chunks, (chunks that are either duplicates, or have no real reason for existing other than slight variation) and replacing them with something else, and loading object data into RAM on the same nine screen area, while having the level data (the thing that tells the game where to place the chunks and objects) is loaded in full.

EDIT: To clarify, the level data will also swap chunk data in RAM when needed, as chunks would be numbered.
Post Reply