trunk/src/mess/machine/mos8722.c
| r18453 | r18454 | |
| 168 | 168 | |
| 169 | 169 | m_p0l_written = false; |
| 170 | 170 | m_p1l_written = false; |
| 171 | |
| 172 | m_out_z80en_func(MCR_8500); |
| 173 | m_out_fsdir_func(MCR_FSDIR); |
| 171 | 174 | } |
| 172 | 175 | |
| 173 | 176 | |
| r18453 | r18454 | |
| 220 | 223 | { |
| 221 | 224 | if (!CR_IO && offset >= 0xd500 && offset < 0xd50c) |
| 222 | 225 | { |
| 226 | if (LOG) logerror("MOS8722 '%s' Write %01x : %02x\n", tag(), offset & 0x0f, data); |
| 227 | |
| 223 | 228 | m_reg[offset & 0x0f] = data; |
| 224 | 229 | |
| 225 | 230 | switch (offset & 0x0f) |
| r18453 | r18454 | |
| 248 | 253 | } |
| 249 | 254 | else if (offset >= 0xff00 && offset < 0xff05) |
| 250 | 255 | { |
| 256 | if (LOG) logerror("MOS8722 '%s' Write %01x : %02x\n", tag(), offset & 0x0f, data); |
| 257 | |
| 251 | 258 | switch (offset & 0x0f) |
| 252 | 259 | { |
| 253 | 260 | case CR: |
| r18453 | r18454 | |
| 279 | 286 | |
| 280 | 287 | offs_t mos8722_device::ta_r(offs_t offset, int aec, int *ms0, int *ms1, int *ms2, int *ms3, int *cas0, int *cas1) |
| 281 | 288 | { |
| 282 | | offs_t ta = offset; |
| 289 | offs_t ta = offset & 0xff00; |
| 283 | 290 | |
| 291 | if (!aec) |
| 292 | { |
| 293 | ta = 0xf000 | (offset & 0xf00); |
| 294 | } |
| 295 | |
| 284 | 296 | if (!MCR_C64) |
| 285 | 297 | { |
| 286 | 298 | *ms0 = 1; |
| r18453 | r18454 | |
| 289 | 301 | |
| 290 | 302 | if (offset < 0x1000 && !MCR_8500) |
| 291 | 303 | { |
| 292 | | ta = 0xd000 | (offset & 0xfff); |
| 304 | ta = 0xd000 | (offset & 0xf00); |
| 293 | 305 | |
| 294 | 306 | *ms0 = 0; |
| 295 | 307 | *ms1 = 0; |
| r18453 | r18454 | |
| 321 | 333 | { |
| 322 | 334 | if (m_p0l_written && m_reg[P0L]) |
| 323 | 335 | { |
| 324 | | ta = (m_reg[P0L] << 8) | (offset & 0xff); |
| 336 | ta = m_reg[P0L] << 8; |
| 325 | 337 | |
| 326 | 338 | *cas0 = P0H_A16 ? 1 : 0; |
| 327 | 339 | *cas1 = P0H_A16 ? 0 : 1; |
| r18453 | r18454 | |
| 331 | 343 | { |
| 332 | 344 | if (m_p1l_written && m_reg[P1L]) |
| 333 | 345 | { |
| 334 | | ta = (m_reg[P1L] << 8) | (offset & 0xff); |
| 346 | ta = m_reg[P1L] << 8; |
| 335 | 347 | |
| 336 | 348 | *cas0 = P1H_A16 ? 1 : 0; |
| 337 | 349 | *cas1 = P1H_A16 ? 0 : 1; |
trunk/src/mess/machine/mos8722.h
| r18453 | r18454 | |
| 79 | 79 | public mos8722_interface |
| 80 | 80 | { |
| 81 | 81 | public: |
| 82 | | // construction/destruction |
| 83 | | mos8722_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 82 | // construction/destruction |
| 83 | mos8722_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 84 | 84 | |
| 85 | | UINT8 read(offs_t offset, UINT8 data); |
| 86 | | DECLARE_WRITE8_MEMBER( write ); |
| 85 | UINT8 read(offs_t offset, UINT8 data); |
| 86 | DECLARE_WRITE8_MEMBER( write ); |
| 87 | 87 | |
| 88 | | DECLARE_READ_LINE_MEMBER( fsdir_r ); |
| 88 | DECLARE_READ_LINE_MEMBER( fsdir_r ); |
| 89 | 89 | |
| 90 | | offs_t ta_r(offs_t offset, int aec, int *ms0, int *ms1, int *ms2, int *ms3, int *cas0, int *cas1); |
| 90 | offs_t ta_r(offs_t offset, int aec, int *ms0, int *ms1, int *ms2, int *ms3, int *cas0, int *cas1); |
| 91 | 91 | |
| 92 | 92 | protected: |
| 93 | | // device-level overrides |
| 93 | // device-level overrides |
| 94 | 94 | virtual void device_config_complete(); |
| 95 | | virtual void device_start(); |
| 96 | | virtual void device_reset(); |
| 95 | virtual void device_start(); |
| 96 | virtual void device_reset(); |
| 97 | 97 | |
| 98 | 98 | private: |
| 99 | 99 | devcb_resolved_write_line m_out_z80en_func; |