View Single Post
Old 30 March 2010, 18:53   #1
ara
Registered User
 
Join Date: Oct 2009
Location: Belgium
Age: 50
Posts: 42
access emulated memory

Hi,

Actually I have a question, not really a problem. The question is quite technical...

I would like to access the emulated Amiga memory from the x86 side as efficiently as possible. Is the following piece of code okay?
Quote:
// Read a byte from (a0). Just an example!
uae_u8 b ;
if(canbang)
b=NATMEM_OFFSET[m68k_areg(regs,0)] ;
else
b=get_byte(m68k_areg(regs,0)) ;
Seems to work here for "ordinary" memory accesses. But what about accesses to custom chip registers, etc? The code generated by the JIT compiler seems to simply read and write the "real" x86 memory without further checks but I have to admit that I don't understand every detail (for example, the test of the "special_mem" flag in "compemu_support/readbyte.cpp").
ara is offline  
 
Page generated in 0.04421 seconds with 11 queries