It works fine for me with xCHM. I had it installed already for perusing some other chm file a while back, so I was quite surprised when you mentioned it. The only thing is that in xCHM it seems to use a non-mono font for everything by default which borks the formatting. Changing the regular font to ...
This is caused by the exit barrel for the first bonus being in the wrong place. It's slightly above and to the right of where the exit barrel for the second bonus is. The game expects to grab the player and animate the barrel exit, but that doesn't happen because the barrel isn't there. When you app...
Oh, apparently we noticed the binary thing at the same time. :scratch: I've never actually done all that much with sprites in the games. I would image the way you would assemble them is the same as typical image composition, just decode individual tiles and composite them together after the fact. Th...
The various file functions provided by C and C++ will do newline substitution (0A <-> 0D 0A) if a file doesn't explicitly specify binary mode. Your BMP code uses CreateFile and WriteFile which are part of the Windows API and binary-only, so that wouldn't be an issue for them. With files you should h...
Bitmaps are a bit unusual in that they order pixels from left to right starting from the bottom row, whereas most other formats start from the top. Mathematical plotting is like that too, where you go up the Y-axis as Y increases. In other words, to flip it vertically you'd have to reverse the order...
On the top are the letters generated by the program, montaged together, and on the bottom is the same letter configuration produced by the text generator thing we have here. letters.png http://dkc-atlas.com/projects/kingizor/textgen/image.png?t=abcdefghijklm%0Anopqrstuvwxyz&f=k&w=8&c=%23...
I've spent a a while going over it and I can't find anything very obvious. I wrote a simple bitmap writer function that doesn't require Windows and it seems to produce the correct output. With C and C++, if something unexplainable is happening at a certain point, it's quite often due to some kind of...
Do you mean the 8x8 tiles? Those ones are the raw, decompressed tiles before they get combined with any metatile, tilemap or palette data. You can think of them as building blocks for all of the other graphics. They don't have any colour information associated with them yet, so we use different grey...
I don't know the precise algorithm but it's largely related to your current position and speed, with the time between strikes being based on some sort of counter. After last strike there will be a number of frames until it's time for a new strike. At that point the game will prepare for the next str...
SNES uses 5-bits per component, so 5+5+5 = 15 bits giving a total of 32768 possible colours. The data is stored as 16-bit words and the layout is: FEDCBA98 76543210 -BBBBBGG GGGRRRRR SNES is little-endian, so the low byte comes before the high byte. Be careful not to read the bytes in the wrong orde...
Most graphics we'd encounter are made up of different types of RGB. A 24-bit BMP image would have a 8-bit (R)ed component, a 8-bit (G)reen component and a 8-bit (B)lue component. For all of these 8-bit R/G/B components, their intensity has a range of 0-255, and different combinations of R/G/B will p...
There is the normal "post a reply" page as well as the "quick reply" button, the latter of which is far more minimal. If your internet had a brief hiccup it's possible that a stylesheet or the smilies didn't load properly, but a refresh should fix that. Things might also appear d...
std::bitset? You're well into C++ territory now. It should do the same thing, but I was personally hoping for one of these: int index = ((Bitplane0_ROW[p] >> N) & 1) | (((Bitplane1_ROW[p] >> N) & 1) << 1) | (((Bitplane2_ROW[p] >> N) & 1) << 2) | (((Bitplane3_ROW[p] >> N) & 1) << 3); ...
A 4-bit version is a very similar process. To construct the 4-bit index value you'd need to extract the four different bits and shift them into place as necessary. There isn't really anything new to cover at this stage, so maybe just try and think over how your 2-bit version works at each point and ...
That didn't work when I tried that. Ah, my fault. I must have glanced at the shifts which were looking fine and ignored everything else that was missing. You did manage it with shifts which is one of the ways to do it. The other way would have been something like this: b = (!!(Bitplane0_ROW[p] &...
We put individual bits at the correct places to form a value. An important point is that powers of two are each made up of a single bit at different positions: 0x01 == 1 == 0b00000001 0x02 == 2 == 0b00000010 0x04 == 4 == 0b00000100 0x08 == 8 == 0b00001000 0x10 == 16 == 0b00010000 0x20 == 32 == 0b001...
Got some better code now. thanks for the tips. You seem to have an extra if hiding in there! :bashmaster: This version is a tiny bit farther from what we want compared to the previous version though. You know that (Bitplane0_ROW[p] & (1 << N)) and (Bitplane0_ROW[p] & (1 << N)) get us the tw...
As for what that lines does... :mrgreen: Come on, man! Come to think of it, I don't think I'm being 100% accurate (as far as the generally accepted way to do this is. Still good enough by SNES standards) This is color. I'm leaving the lowest 3 bits empty, so my "white" is really 248x248x2...
Shifts have higher precedence than AND, so I don't think you can reduce that as-is without also changing the value you're ANDing with. Without that limitation you could reduce it to: int g = (raw >> 2) & 0xF8; int g = raw >> 2 & 0xF8; Compilers for compiled languages should be able to recogn...
Ah, you are correct there. == has higher precedence than & which has higher precedence than &&. I think I was getting mixed up with the last two. if ( a & b && c & d ) { ... if ((a & b) && (c & d)) { ... if ( a == b && c == d ) { ... if ((a == b) &...
How do you check if a bit not set? I'm sure its something obvious. sorry. If a bit is not set, the result of the expression would be zero. You can therefore check for that by comparing against zero: if ((a & bit) == 0) { ... if (!(a & bit)) { ... The extra parentheses can be helpful, but th...
That should work. Here are a few small suggestions: You've got eight loops that are very similar. The first loop operates on the ROW7 and NH variables, the second on ROW6 and HG, and so on. If you put all your ROW7 variables into an array and your N# variables into another array you could loop over ...
Try to get a bit more familiar with binary and using bitwise operators to manipulate binary numbers. Remember that all integers can be represented as a sequence of bits. Bitwise operators are fundamental for computers so almost all programming languages have some means of using them. Languages deriv...
The way the SNES stores graphics is confusing. Did they make it that way to keep people from tinkering with the system? Like with creating their own games? :parry: There could be a lot of reasons, and we can only really speculate. Most capabilities of the SNES PPU are extensions of the functionalit...
The idea is that bitplane data is decoded into a value that is an index corresponding to a colour in the associated palette. The SNES palette (CGRAM) is a block of data containing 512 colours. Sprite and background tiles have some extra data that tells the SNES what section of CGRAM to use. 2bpp, 4b...
The SNES has blending capabilities but they're not used for this. Instead, all the backgrounds and sprites for each level use completely different palettes from the normal ones. To get things exactly right all the backgrounds and sprites would have to be re-ripped with the adjusted palettes, althoug...
The tools are capable of modifying parameters relating to different objects, in other words how objects behave. The idea is that when an object is loaded it copies this list of data into RAM and runs different actions using that data each frame or so. "pointer" refers to the ID of each obj...
A long time ago I wrote a program to extract background graphics from DKC3. I added support for DKC2, then DKC, then all the handheld games and just about everything else I could think of. I hadn't thought about it for a long time but I've spent a while this year adding graphical interfaces and brus...
The versions in this thread are now obsolete. The big data format is now available with improved compression ratios along with other new and exciting formats, see here for more thrilling details!
I am not aware of Mesen-S having any considerable problems, but I haven't used it much myself. It might be good to try a few different debuggers. They'll all have different strengths and it wouldn't hurt to get a bit more familiar with some of the different tools. I had a glance at that memory viewe...
The page for it on rhdn has this note: Note: If GSD refuses to run, and posts a side-by-side or application “configuration” error, the system can’t find DLLs it needs to run the program. Install the redistributable linked in the release notes. The readme links to a file on Geiger's site, but his sit...
Small data this time. This is an encoder and decoder for DKC3's tilemap format. It's a bit tricky the way it packs bits, but there is no variable compression going on like with the other schemes. I was hoping to have a title screen hack or something but that turned out to be more of a headache than ...
Well this is where it starts getting tricky. The best way to tackle it depends on how the game handles it. Usually when data is stored sequentially like that, there can be something called a pointer table. This would contain a list of addresses that point to the start of each string. The idea is tha...
We have numbers. In binary, a bit is either 1 (set) or 0 (not set). A single bit can therefore represent the numbers 0 or 1. We can represent bigger numbers by using multiple bits at once. If we have two bits, we have: 00 = 0 01 = 1 10 = 2 11 = 3 Here the bit on the right represents 1, while the one...
The encoding is similar to ASCII which is usually seven bits. DKC and DKC2 use the spare high bit to indicate that a certain character is the last character in a string. Jungle Hijinxs = 4A 75 6E 67 6C 65 20 48 69 6A 69 6E 78 F3 01110011 = 0x73 = 's' (normal ASCII value) 11110011 = 0xF3 = 's' (high ...
I've written a new compressor and decompressor for the big data segments in DKC2 and DKC3. I've packaged it as a library, but I've also included standalone command line utilities too. These might not be too useful on their own, but it might make it a bit easier to do other things. The general proces...
I got more of an Great-American-West vibe from DKC3 than anything to do with Canada. That region has the rocky mountains which is fitting for the cliff levels, and there is plenty of snow-tops in there too. Further west you have the great redwood forests which gives you not only the tree levels but ...
That's a fun solution, but if everything weren't compressed you'd quickly run out of room. :krool: I remember Mattrizzle modifying the title screen for the "DKC Reloaded" hack. Different game of course, but I think those tiles were compressed too, but with a different method. I wonder if h...
Most of the map pages should have them. Right click and "view image" ought to be enough. Might have to disable some of the foreground layers first in some cases though. Some of them seem to have quite a bit of padding for reasons I can never remember. The maps for the sequels were switched...
Seems to be complaining about a missing "MSVCP140D.dll". You can fix that by changing the profile setting in MSVC from "debug" to "release" and recompiling. The idea is that there are normal versions of those DLLs that most people will have anyway, and special debug one...
Ahem, turns out there was at least one small bug in that code preventing it from working. I think I made a small change before I posted it that looked as though it wouldn't make any difference but it actually did. I could have sworn it was working at that point, but oh well. Should be fine now, mayb...