Skip to content

Commit

Permalink
gpu.c use opcode in...
Browse files Browse the repository at this point in the history
Signed-off-by: Joseph Mattello <[email protected]>
  • Loading branch information
JoeMatt committed Nov 4, 2021
1 parent 08100b5 commit 60bcb66
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/gpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -300,10 +300,11 @@ INLINE uint16_t GPUReadWord(uint32_t offset, uint32_t who/*=UNKNOWN*/)
{
if ((offset >= GPU_WORK_RAM_BASE) && (offset < GPU_WORK_RAM_BASE+0x1000))
{
uint16_t data;
offset &= 0xFFF;
data = ((uint16_t)gpu_ram_8[offset] << 8) | (uint16_t)gpu_ram_8[offset+1];
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];
return data.WORD;
}
else if ((offset >= GPU_CONTROL_RAM_BASE) && (offset < GPU_CONTROL_RAM_BASE+0x20))
{
Expand Down

0 comments on commit 60bcb66

Please sign in to comment.