Skip to content

Commit

Permalink
Fix for register byte access #127
Browse files Browse the repository at this point in the history
  • Loading branch information
leecher1337 committed Apr 10, 2021
1 parent d4973c1 commit e387370
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions ntvdmpatch/patches/common/ccpu_regs.patch
Expand Up @@ -63,6 +63,38 @@
> return c_getEBP();
> }
>
258c318
< setAX( (getAX() & 0xFF00) | (val & 0xFF) );
---
> c_setAL(val);
266c326
< setCX( (getCX() & 0xFF00) | (val & 0xFF) );
---
> c_setCL(val);
274c334
< setDX( (getDX() & 0xFF00) | (val & 0xFF) );
---
> c_setDL(val);
282c342
< setBX( (getBX() & 0xFF00) | (val & 0xFF) );
---
> c_setBX(val);

This comment has been minimized.

Copy link
@Nable80

Nable80 Apr 10, 2021

Should it be c_setBX or c_setBL here? This line looks suspicious compared to its neighbors.

This comment has been minimized.

Copy link
@leecher1337

leecher1337 Apr 10, 2021

Author Owner

Should it be c_setBX or c_setBL here? This line looks suspicious compared to its neighbors.

You are absolutely correct, c_setDL fixes the date bug, that's why I didn't notice

290c350
< setAX( getAL() | ((val & 0xFF) << 8) );
---
> c_setAH(val);
298c358
< setCX( getCL() | ((val & 0xFF) << 8) );
---
> c_setCH(val);
306c366
< setDX( getDL() | ((val & 0xFF) << 8) );
---
> c_setDH(val);
314c374
< setBX( getBL() | ((val & 0xFF) << 8) );
---
> c_setBH(val);
418a479,491
> #undef setGS
> GLOBAL setGS(val)
Expand Down

0 comments on commit e387370

Please sign in to comment.