Sonic Clean Engine (S.C.E.) Extended version with the returned the Sonic & Tails, Tails and Knuckles characters, Life/Continue count, Continue screen, Super/Hyper transformation.
Heavily modified and improved Sonic 3 & Knuckles engine.
Please read the license before using this project.
-
Cleaned up and optimized disassembly of Sonic 3 & Knuckles:
- There are no hardcoded things as there were in the original Sonic 3 & Knuckles. Complete freedom in your work;
-
Changed level layout format. Now there are two bytes for chunk IDs:
- This will allow you to create more chunks for levels because there will be no one-byte limit here. This will allow you to port levels even from Sonic CD;
-
All current level settings in one file:
- No more searching through the entire Sonic disassembly to replace chunks, layout, palette, music, and other things. Just open Pointer.asm located in each level folder;
-
Many original subroutines have been replaced with faster equivalents. These new subroutines do not break compatibility with the original Sonic 3 & Knuckles. Therefore, there is no need to worry about this:
- Updated Ultra DMA Queue subroutines and compression algorithms(Kosinski Plus, Kosinski Plus Module, Updated Enigma) have optimized S3K's performance very well;
-
I rewrote the code of all the screens, objects, and other things to get maximum performance:
- Poorly written object code can significantly reduce game performance, regardless of whether other subroutines have been optimized very well. All code has been rewritten in S3K style. If you are familiar with Sonic 3 & Knuckles disassembly, you will have no problems with the S1S3/SCE code;
-
The size of the object slots is now 0x50 bytes:
- Additional free bytes will facilitate work on complex objects;
-
Various sound drivers:
- There are Z80 Sound Flamedriver and M68K Sonic 2 Clone Driver v2 (Mega PCM 2.0 version). It all depends on your tasks.
If you are interested in the Sonic Clean Engine (S.C.E.) Extended version with the Z80 Sound Driver:
To build this, use build.bat if you're a Windows user, or build.sh if you're a Linux user. The built ROM will be called 'S3CE.gen'. Use build_debug for debug things. The built ROM will be called 'S3CE.debug.gen'.
-
For editing sprites you can use SonMapEd, ClownMapEd or Flex2 (Read the issues).
-
For editing levels you can use official SonLVL or SonLVL-64x64-Compatible. Unfortunately, SonED2 is no longer supported.
-
To convert SMPS music to asm format you can use smps2asm.
-
For counting instruction cycles you can use 68kCounter.
-
Recommended emulators for debugging: BizHawk, BlastEm, ClownMDEmu, Exodus, Gens KMod, Regen.
- S.C.E. uses Kosinski Plus algorithm, but Flex2 program does not support Kosinski Plus Module. Therefore, Flex2.json project file is partially useless. SonMapEd program does not support Kosinski Plus at all. You can only open uncompressed graphics.
- If you want to convert levels from previous Sonic games, you have to use LevelConverter from SonLVL. Then change the layout format using Layout converter.
- If you want to make a different text for Title Card, you need to create a file of letters from List.unc. This will be loaded before the level starts. You don't have to add the letters 'ENOZ' (ZONE) because those letters are already in VRAM. Then you have to create a mapping of your zone name in Map - Title Card.asm.
Now you can use a Python script to create Title Card mappings S3TCG.
- If you want to use other SMPS music you can use Valley Bell's SMPS Research or vgm2smps.
- Unfortunately, not all programs support MapMacros, so I wanted to maintain compatibility with older programs. I don't want to just throw away SonMapEd. But there is support for MapMacros here, and you can use it if you want.
-
The speed of the ROM build process depends entirely on the power of your computer. A high-performance machine will build the ROM quickly, while a slower one will take significantly more time. If you're a Linux user and you're using Wine and Windows batch script, that will affect build speed too.
-
Always specify jump sizes for instructions. Writing code without specifying jump sizes will significantly slow down the ROM build. The Macro Assembler AS will perform multiple passes until it can successfully build the ROM, which increases build time.
Example of problematic code:
beq sub_1234 ; and any other branch instructions
bsr sub_1234
bra sub_1234
jsr sub_1234
jmp sub_1234
lea sub_1234,a1
pea sub_1234
Example of correct code:
beq.s sub_1234 ; and any other branch instructions
bsr.s sub_1234
bra.s sub_1234
jsr (sub_1234).l
jmp (sub_1234).l
lea (sub_1234).l,a1
pea (sub_1234).l
Warning
Please always specify the jump sizes for instructions. Macro Assembler AS may display random and misleading errors if the jump size is not specified. You will try to fix something that wasn’t actually broken, but these errors are caused only because you didn’t specify the jump size in the instruction.
I've added console messages about Macro AS passes.
Try to keep 2 passes at all times. If you see 3, 4 or more passes, you should figure out what's causing the extra passes and try to fix it. This will save you a lot of time during the ROM build.
- TheBlad768 — Project lead, sole programmer, S.C.E. Game Engine
- Nichloya — Technical and other support.
- pixelcat — New smooth ring graphics, act 3 and 4 numbers graphics.
- FoxConED — Level Select font graphics.
- Dolphman — Robotnik Head graphics.
- In the past I made the Sonic Clean Engine (S.C.E.) specifically for this project (: