I can't remember exactly the numbers but I recall that they are 4 digits and they sort of sum up in a fashion like, 0002 increments red, 0020 green and 0200 blue. Then when the numbers overlap, you end up with an odd digit so it doesn't mess up with the info. If you toy around a little with Knuckles Chaotix debug menu, you can alter palettes in real time so you can figure out how they work.
Not sure about the tiles, but you can edit palettes with this palette editor I wrote some time ago. I made it for Varion, he knows how to 32x, I'll see if I can get him to reply here.
32X doesn't have tiles, it has a framebuffer. Graphics data can be stored in any format the developers want. There's an editor for the Chaotix sprite format in SonLVL.
Does anyone know how Sonic 1 loads object palettes in its code? I'm making a character hack base, and I don't want to change the object mappings unless I need to
One thing i have wondered about the Neon Cowgirl sign from Sonic Adventure 1 that was censored was if it's "Moan" Sound Effect is still in the sound test, If so which Number?
Since I have no idea if and when this question was ever answered here, I must ask: In 68000 assembly programming, when is it better to use a clr command versus a move command with a source operand that resolves to 0? I'm curious why some functions use one and not the other.
Sup people are there any sonic1,2 or 3 hacks that show different character behavior, like castlevania or contra?
I've tried to see if I could replace the SEGA sound in Sonic 1 following this tutorial: https://forums.sonicretro.org/index.php?threads/editing-sonic-1s-sega-sound.36957/ However, in-game the sound I use almost sounds like a corrupted version of itself. It's similar to a problem mentioned in this tutorial: http://info.sonicretro.org/SCHG_How-to:Fix_the_SEGA_Sound, but, since I use the latest disassembly, I couldn't figure out how if it actually has the same cause or how to fix it.
Is there any particular reason why the Special Stages in Sonic CD make the sound engine chug balls? It happens on real hardware and on an emulator. I'd almost say it's due to the plane scaling/rotation effects running alongside game code, but the fact that there's no audio issues in the US CD BIOS screens could rule that out. Poor optimization of code perhaps?
Using ASM68k, is it possible to redefine an existing instruction with a macro? For example if I wanted nop to be $1234 instead of $4e75.
I don't think you can redefine the 68k mnemonics with ASM68K, I think they get priority over macro definitions. Two possible alternatives; 1. create a macro with a unique name similar say "mnop" or whatever, 2. alter the exe at offset A7BF and change the two bytes from 4E 71 to 12 34.
That does give me the idea of changing "nop" in the exe to "bop" or something, then I'd be free to use nop however I wanted. It's not stored as an ascii string though.
Actually, it sorta is... The way ASM68K deals with processing mnemonics is by indexing the first letter against a jump table from a to z. It has a subroutine for each valid letter, so there's a subroutine specifically for instructions that start with "n": "neg" "negx" "nop" "not" "nbcd". It checks the next two letters as a word (comparing for "eg", "op", "ot", and finally "bc", for instructions such as "neg" and "negx" the conditional jump for "eg" will then check for "x" in the subsequent routine. So effectively, all you need to do is nop out (ironically) the comparison and conditional jump for "op" in this subroutine. Goto offset A655 and replace 66 3D 6F 70 0F 84 4A 01 00 00 with 90's. The "nop" is now not recognised as a valid instruction by ASM68K. You can now create a macro for nop to do something totally different, and create a macro for bop to place in 4E71 to your liking.
Very interesting, thanks. I notice "op" and the others conveniently have an = sign before them, which makes it really easy to find any instruction. In case you were wondering, I'm going to add Z80 support to ASM68k with macros.
Ahhh, you probably should have said, AURORA☆FIELDS has already done this here (link on the post appears to be down, so have a mirror). For opcodes which are shared with 68k (add, sub, or, and, nop, etc), she prefixed the Z80 versions with a z (e.g. zadd, zsub, and znop and so on...). You should probably consider contacting her, she is very knowledgeable of ASM68K as an assembler, and has a fair number of tricks up her sleeve. Out of interest; if I'm understanding rightly, it seems you're favouring nop for Z80 rather than 68k, is there a particular reason for this? How comes not the other way around, i.e. "bop" for Z80?
I did see that, but I want to do it a bit differently. nop will be used by both Z80 and 68k. Which version is used depends on whether a Z80 flag has been set by another macro, sort of like how it works in AS. It'll look something like this: nop: macro if z80 = true dc.b 0 else bop endc endm Preserving the original instruction with a different name keeps the macros simple.
Ahhh, awesome idea! That would be absolutely delightful if you can pull it off~ Still not entirely sure why you need "bop" specifically, couldn't you use: nop: macro if z80 = true dc.b 0 else dc.w $4E71 endc endm Directly? I assume there must be an alternative reason. At any rate, I'll stop with the questions, but I am certainly interested in progress on this. Feel free to shoot me a PM if you need a bit of help.
Yes, I'd actually just use $4e75 for nop. The nop/bop thing was an example. I mainly had this method in mind for more complicated instructions where I don't want to manually reconstruct the 68k versions. Inevitably I'll run into more problems so I'll let you know if I need help.
So far so good, except for this: Code (Text): ex af,af' ASM68k fails on this line because the apostrophe makes it think there's a string: Code (Text): Error : No closing quote on string ex af,af I was hoping there'd be an option to disable/change quote characters, but I can't find one in the manual.
When I have a macro that sets a variable, that variable appears to be the same throughout the program, even though the macro is used multiple times with different values for the variable. How do I use a variable that varies? This is what I'm doing: Code (Text): getzreg: macro ; convert register to numerical value if strcmp("\1","a") zreg: = 7 elseif strcmp("\1","b") zreg: = 0 elseif strcmp("\1","c") zreg: = 1 elseif strcmp("\1","d") zreg: = 2 elseif strcmp("\1","e") zreg: = 3 elseif strcmp("\1","h") zreg: = 4 elseif strcmp("\1","l") zreg: = 5 elseif strcmp("\1","(hl)") zreg: = 6 else endc endm