Skip to content

Commit 84f36d8

Browse files
committed
gpu.c use opcode in...
Signed-off-by: Joseph Mattello <[email protected]>
1 parent 7bd6fc9 commit 84f36d8

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

src/gpu.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -300,10 +300,11 @@ INLINE uint16_t GPUReadWord(uint32_t offset, uint32_t who/*=UNKNOWN*/)
300300
{
301301
if ((offset >= GPU_WORK_RAM_BASE) && (offset < GPU_WORK_RAM_BASE+0x1000))
302302
{
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;
303+
offset &= 0xFFF;
304+
OpCode data;
305+
data.Bytes.UBYTE = (uint16_t)gpu_ram_8[offset];
306+
data.Bytes.LBYTE = (uint16_t)gpu_ram_8[offset+1];
307+
return data.WORD;
307308
}
308309
else if ((offset >= GPU_CONTROL_RAM_BASE) && (offset < GPU_CONTROL_RAM_BASE+0x20))
309310
{

0 commit comments

Comments
 (0)