Herr Otto Partz says you're all nothing but pipsqueaks!
Quote from: Cas on October 10, 2025, 04:52:28 PMthere are tons of SDL-based 3D graphics engines out there already.
Quotebut when talking about graphics code, since C does not include that,
QuoteThe version above uses SDL for graphics, but the version for DOS/DOSBox, which is available below, uses some graphical functions available with Open Watcom, as SDL has no support for DOS.
int16_t a;
__asm{
mov ax,0
push ax
push ax
mov ax,1234
call int_atan2_asm
add sp,4
mov a,ax
}
printf("a:%d\n", a);
return 0;
const int16_t min = -2;
const int16_t max = +2;
for(int i = min; i < max; ++i)
{
printf("[%d](x=0,y=0) a: %d, c: %d\n", i, int_atan2_asm(0, 0),int_atan2(0, 0));
}
for (int16_t x = min; x < max; ++x)
{
for (int16_t y = min; y < max; ++y)
{
int16_t a = int_atan2_asm(x, y);
int16_t c = int_atan2(x, y);
printf("x=%d, y=%d -> C=%d, ASM=%d\n", x, y, c, a);
}
}
[-2](x=0,y=0) a: 0, c: 0
[-1](x=0,y=0) a: 0, c: 0
[0](x=0,y=0) a: 0, c: 0
[1](x=0,y=0) a: 0, c: 0
x=-2, y=-2 -> C=-384, ASM=-384
x=-2, y=-1 -> C=-332, ASM=-332
x=-2, y=0 -> C=-256, ASM=-256
x=-2, y=1 -> C=-180, ASM=-180
x=-1, y=-2 -> C=-436, ASM=-436
x=-1, y=-1 -> C=-384, ASM=-384
x=-1, y=0 -> C=-256, ASM=-256
x=-1, y=1 -> C=-128, ASM=-128
x=0, y=-2 -> C=512, ASM=512
x=0, y=-1 -> C=512, ASM=512
x=0, y=0 -> C=0, ASM=28 <======= ???
x=0, y=1 -> C=0, ASM=0
x=1, y=-2 -> C=436, ASM=436
x=1, y=-1 -> C=384, ASM=384
x=1, y=0 -> C=256, ASM=256
x=1, y=1 -> C=128, ASM=128
int16_t c = int_atan2(x, y);
int16_t a = int_atan2_asm(x, y);
Quote from: dstien on October 09, 2025, 07:44:31 PMQuotecompile with current Watcom V2 on Windows for DOS 16bit Model small exe using wcl+wasm
the test run was done on a real DOS 6.22 on VMWare Player (because dosbox failed to run the complete test without hanging)
Does this include the fix I pushed the other day? Strangely I can't reproduce it on my end with dosemu2 or DOSBox. Could you attach the exe file? I'm keen to have a look.
Quotepeak values crashes both implementations
mkfs.msdos -C myfloppy.img 1440
mcopy -i myfloppy.img test16.exe ::/
mdir -i myfloppy.img ::/
Quote from: Cas on October 06, 2025, 11:33:59 PMIs it possible to isolate the physical engine for analysis?
// ...initialisations...
while (gameconfig.game_recordedframes > state.game_frame) {
input = td16_rpl_buffer[state.game_frame];
state.game_frame++;
player_op(input);
}
repldump is slightly more complicated because we want it to create the exact same game state as the original code, so it also handles the movement of an opponent, the cameras, explosions and FPS smoothing.Quote from: llm on October 07, 2025, 10:08:55 AMQuoteParticularly the database from the program whose vendor has a history of refusing to sell to people outside the infosec clique.
isn't that like the myth that IDA dropped DOS support (which is only true for IDA freeware versions)
i know serveral private people that bought an IDA license - like me - without any infosec background
Quote from: llm on October 08, 2025, 11:04:26 AMwill you also try to compare to the original implementation - something like int_atan2 disassembly + C port over the complete integer range or is something like that too much?
Quote from: llm on October 08, 2025, 11:04:26 AMcompile with current Watcom V2 on Windows for DOS 16bit Model small exe using wcl+wasm
the test run was done on a real DOS 6.22 on VMWare Player (because dosbox failed to run the complete test without hanging)