trunk/src/emu/cpu/drcbex86.h
r18266 | r18267 | |
111 | 111 | // getters |
112 | 112 | be_parameter_type type() const { return m_type; } |
113 | 113 | UINT64 immediate() const { assert(m_type == PTYPE_IMMEDIATE); return m_value; } |
114 | | int ireg() const { assert(m_type == PTYPE_INT_REGISTER); assert(m_value >= 0 && m_value < x86emit::REG_MAX); return m_value; } |
115 | | int freg() const { assert(m_type == PTYPE_FLOAT_REGISTER); assert(m_value >= 0 && m_value < x86emit::REG_MAX); return m_value; } |
116 | | int vreg() const { assert(m_type == PTYPE_VECTOR_REGISTER); assert(m_value >= 0 && m_value < x86emit::REG_MAX); return m_value; } |
| 114 | int ireg() const { assert(m_type == PTYPE_INT_REGISTER); assert(m_value < x86emit::REG_MAX); return m_value; } |
| 115 | int freg() const { assert(m_type == PTYPE_FLOAT_REGISTER); assert(m_value < x86emit::REG_MAX); return m_value; } |
| 116 | int vreg() const { assert(m_type == PTYPE_VECTOR_REGISTER); assert(m_value < x86emit::REG_MAX); return m_value; } |
117 | 117 | void *memory(UINT32 offset = 0) const { assert(m_type == PTYPE_MEMORY); return reinterpret_cast<void *>(m_value + offset); } |
118 | 118 | |
119 | 119 | // type queries |
trunk/src/emu/cpu/drcbex64.h
r18266 | r18267 | |
111 | 111 | // getters |
112 | 112 | be_parameter_type type() const { return m_type; } |
113 | 113 | UINT64 immediate() const { assert(m_type == PTYPE_IMMEDIATE); return m_value; } |
114 | | int ireg() const { assert(m_type == PTYPE_INT_REGISTER); assert(m_value >= 0 && m_value < x64emit::REG_MAX); return m_value; } |
115 | | int freg() const { assert(m_type == PTYPE_FLOAT_REGISTER); assert(m_value >= 0 && m_value < x64emit::REG_MAX); return m_value; } |
116 | | int vreg() const { assert(m_type == PTYPE_VECTOR_REGISTER); assert(m_value >= 0 && m_value < x64emit::REG_MAX); return m_value; } |
| 114 | int ireg() const { assert(m_type == PTYPE_INT_REGISTER); assert(m_value < x64emit::REG_MAX); return m_value; } |
| 115 | int freg() const { assert(m_type == PTYPE_FLOAT_REGISTER); assert(m_value < x64emit::REG_MAX); return m_value; } |
| 116 | int vreg() const { assert(m_type == PTYPE_VECTOR_REGISTER); assert(m_value < x64emit::REG_MAX); return m_value; } |
117 | 117 | void *memory() const { assert(m_type == PTYPE_MEMORY); return reinterpret_cast<void *>(m_value); } |
118 | 118 | |
119 | 119 | // type queries |
trunk/src/mess/video/thomson.c
r18266 | r18267 | |
1215 | 1215 | /* write to video memory through addresses 0x4000-0x5fff */ |
1216 | 1216 | WRITE8_HANDLER ( to7_vram_w ) |
1217 | 1217 | { |
1218 | | assert( offset >= 0 && offset < 0x2000 ); |
| 1218 | assert( offset < 0x2000 ); |
1219 | 1219 | /* force two topmost color bits to 1 */ |
1220 | 1220 | if ( thom_mode_point ) |
1221 | 1221 | data |= 0xc0; |
r18266 | r18267 | |
1254 | 1254 | or 0x0000-0x1fff (MO) */ |
1255 | 1255 | WRITE8_HANDLER ( to770_vram_w ) |
1256 | 1256 | { |
1257 | | assert( offset >= 0 && offset < 0x2000 ); |
| 1257 | assert( offset < 0x2000 ); |
1258 | 1258 | if ( thom_vram[ offset + thom_mode_point ] == data ) |
1259 | 1259 | return; |
1260 | 1260 | thom_vram[ offset + thom_mode_point ] = data; |
r18266 | r18267 | |
1274 | 1274 | WRITE8_HANDLER ( to8_sys_lo_w ) |
1275 | 1275 | { |
1276 | 1276 | UINT8* dst = thom_vram + offset + 0x6000; |
1277 | | assert( offset >= 0 && offset < 0x2000 ); |
| 1277 | assert( offset < 0x2000 ); |
1278 | 1278 | if ( *dst == data ) |
1279 | 1279 | return; |
1280 | 1280 | *dst = data; |
r18266 | r18267 | |
1287 | 1287 | WRITE8_HANDLER ( to8_sys_hi_w ) |
1288 | 1288 | { |
1289 | 1289 | UINT8* dst = thom_vram + offset + 0x4000; |
1290 | | assert( offset >= 0 && offset < 0x2000 ); |
| 1290 | assert( offset < 0x2000 ); |
1291 | 1291 | if ( *dst == data ) return; |
1292 | 1292 | *dst = data; |
1293 | 1293 | /* dirty whole scanline */ |
r18266 | r18267 | |
1301 | 1301 | WRITE8_HANDLER ( to8_data_lo_w ) |
1302 | 1302 | { |
1303 | 1303 | UINT8* dst = thom_vram + offset + 0x4000 * to8_data_vpage + 0x2000; |
1304 | | assert( offset >= 0 && offset < 0x2000 ); |
| 1304 | assert( offset < 0x2000 ); |
1305 | 1305 | if ( *dst == data ) |
1306 | 1306 | return; |
1307 | 1307 | *dst = data; |
r18266 | r18267 | |
1316 | 1316 | WRITE8_HANDLER ( to8_data_hi_w ) |
1317 | 1317 | { |
1318 | 1318 | UINT8* dst = thom_vram + offset + 0x4000 * to8_data_vpage; |
1319 | | assert( offset >= 0 && offset < 0x2000 ); |
| 1319 | assert( offset < 0x2000 ); |
1320 | 1320 | if ( *dst == data ) |
1321 | 1321 | return; |
1322 | 1322 | *dst = data; |
r18266 | r18267 | |
1332 | 1332 | WRITE8_HANDLER ( to8_vcart_w ) |
1333 | 1333 | { |
1334 | 1334 | UINT8* dst = thom_vram + offset + 0x4000 * to8_cart_vpage; |
1335 | | assert( offset>=0 && offset < 0x4000 ); |
| 1335 | assert( offset < 0x4000 ); |
1336 | 1336 | if ( *dst == data ) |
1337 | 1337 | return; |
1338 | 1338 | *dst = data; |