Here's a little snippet of code I was using to test the Hadamard transform. Code is sometimes hard to find in it's most basic form - this is as basic as it gets, showing how you do a 1D transform over the data array horizontally, then vertically. If you add up the operations, it does exactly 384 ADDs and SUBs.
Code:#include <stdio.h> int data[8][8] = { { 0, 1, 2, 3, 4, 5, 6, 7 }, { 1, 2, 3, 4, 5, 6, 7, 8 }, { 2, 3, 4, 5, 6, 7, 8, 9 }, { 3, 4, 5, 6, 7, 8, 9, 10 }, { 4, 5, 6, 7, 8, 9, 10, 11 }, { 5, 6, 7, 8, 9, 10, 11, 12 }, { 6, 7, 8, 9, 10, 11, 12, 13 }, { 7, 8, 9, 10, 11, 12, 13, 14 } }; // 1D Hadamard #define SA8D_1D {\ const int a0 = SRC(0) + SRC(4);\ const int a4 = SRC(0) - SRC(4);\ const int a1 = SRC(1) + SRC(5);\ const int a5 = SRC(1) - SRC(5);\ const int a2 = SRC(2) + SRC(6);\ const int a6 = SRC(2) - SRC(6);\ const int a3 = SRC(3) + SRC(7);\ const int a7 = SRC(3) - SRC(7);\ const int b0 = a0 + a2;\ const int b2 = a0 - a2;\ const int b1 = a1 + a3;\ const int b3 = a1 - a3;\ const int b4 = a4 + a6;\ const int b6 = a4 - a6;\ const int b5 = a5 + a7;\ const int b7 = a5 - a7;\ DST(0, b0 + b1);\ DST(1, b0 - b1);\ DST(2, b2 + b3);\ DST(3, b2 - b3);\ DST(4, b4 + b5);\ DST(5, b4 - b5);\ DST(6, b6 + b7);\ DST(7, b6 - b7);\ } // 8x8 fast Hadamard test main () { int i, j; // compute forward Hadamard #define SRC(x) data[i][x] #define DST(x,rhs) data[i][x] = (rhs) for (i=0; i<8; i++) SA8D_1D #undef SRC #undef DST #define SRC(x) data[x][i] #define DST(x,rhs) data[x][i] = (rhs) for (i=0; i<8; i++) SA8D_1D #undef SRC #undef DST for (i=0; i<8; i++) printf ("%d %d %d %d %d %d %d %d\n", data[i][0], data[i][1], data[i][2], data[i][3], data[i][4], data[i][5], data[i][6], data[i][7]); printf ("\n"); // compute inverse Hadamard #define SRC(x) data[i][x] #define DST(x,rhs) data[i][x] = (rhs) for (i=0; i<8; i++) SA8D_1D #undef SRC #undef DST #define SRC(x) data[x][i] #define DST(x,rhs) data[x][i] = (rhs) >> 6 for (i=0; i<8; i++) SA8D_1D #undef SRC #undef DST for (i=0; i<8; i++) printf ("%d %d %d %d %d %d %d %d\n", data[i][0], data[i][1], data[i][2], data[i][3], data[i][4], data[i][5], data[i][6], data[i][7]); }
It's your avatar.
I'm sure many people have been thinking about a movie player on the 32X - you just posted the first thread on it here (that I'm aware of). How people think about it will vary by the person - as you've seen, my thoughts have been more program oriented, with special emphasis on the core of the video codec.
Hey now, I absolutely Love Sewer Shark. The game is awesome!
Awsome in a campy way, just like Night Trap (and maybe double switch depending on your prefrence).
Nowhere near the awsome campy humor of Retrun to Zork though (granted a higher quality game in general), which could probably be included in the FMV genre (though technically a graphic adventure with digitized actors and lots of cutscenes, probably closer to FMV than Myst, at least in some ways) Weird to think that it was among the few such games to not initially be released on CD, but rather 12 floppy disks!
Anyway, back on topic.
On the earlier Fm SFX comment, Chilly Willy, why is using a real OPL2 (or compatible) chip necessary? Wouldn't Adlib/SB emulation in DOSBox give high enough sound quality?
Last edited by CMA Death Adder; 08-25-2009 at 05:43 AM. Reason: C:\WHY\NOT>
- Brandon Cobb
President, Super Fighter Team
Check out Star Odyssey, the new RPG for Sega Genesis / Mega Drive!
Follow us on Facebook - http://www.facebook.com/superfighterteam
I prefer DOSbox over real OPLx chip, mainly because real chip sounds so unclean...
Death To MP3,
:3
Mida sa loed ? Nagunii aru ei saa"Gnirts test is a shit" New and growing website of total jawusumness !
Unclean? I dunno, I have a Sound Blaster 16 in one of my old computers and the OPL3 part of it is one of the clearest, cleanest sounds it can make... it definitely blows DOSBox's quality out the window. (Plus, DOSBox doesn't emulate it completely accurately, making some sounds off. Just like a Genesis emulator compared to hardware)
{Interesting stuff: | Monochrome Nightmares (self-made games) | Exploding Jellyfish (self-made music)}
Maybe, but he's already got me most of the sound effects.
The PSP version of Wolf32X (and some other versions for the PC) use the MAME AdLib FM emulation for the FM sounds and music... and it's the number one complaint from users - the FM sound is wrong/bad. SpritesMind has been researching the YM2612 in the Genesis to make emulated Genesis audio perfect - something similar needs to be done for the old PC FM chips. No matter what the MAME changelog says, PC FM audio is NOT very good. People who think it sounds better are simply used to listening to wrong FM; anyone who grew up listening to the real FM will tell you it's MAME/Dosbox that sounds wrong, not reality.No. Listening to DOSBox try to emulate the Ad Lib card makes me disgusted.Originally Posted by kool kitty89
![]()
Death To MP3,
:3
Mida sa loed ? Nagunii aru ei saa"Gnirts test is a shit" New and growing website of total jawusumness !
There are currently 1 users browsing this thread. (0 members and 1 guests)