We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7bd6fc9 commit 84f36d8Copy full SHA for 84f36d8
1 file changed
src/gpu.c
@@ -300,10 +300,11 @@ INLINE uint16_t GPUReadWord(uint32_t offset, uint32_t who/*=UNKNOWN*/)
300
{
301
if ((offset >= GPU_WORK_RAM_BASE) && (offset < GPU_WORK_RAM_BASE+0x1000))
302
303
- uint16_t data;
304
- offset &= 0xFFF;
305
- data = ((uint16_t)gpu_ram_8[offset] << 8) | (uint16_t)gpu_ram_8[offset+1];
306
- return data;
+ offset &= 0xFFF;
+ OpCode data;
+ data.Bytes.UBYTE = (uint16_t)gpu_ram_8[offset];
+ data.Bytes.LBYTE = (uint16_t)gpu_ram_8[offset+1];
307
+ return data.WORD;
308
}
309
else if ((offset >= GPU_CONTROL_RAM_BASE) && (offset < GPU_CONTROL_RAM_BASE+0x20))
310
0 commit comments