trunk/hash/a7800.xml
r248551 | r248552 | |
2370 | 2370 | </software> |
2371 | 2371 | |
2372 | 2372 | <!-- XM board enhanced --> |
2373 | | <!-- from http://atariage.com/forums/topic/204250-donkey-kong-xm-pre-order-and-demo/ --> |
| 2373 | <!-- from http://atariage.com/forums/topic/204250-donkey-kong-xm-pre-order-and-demo/ --> |
2374 | 2374 | |
2375 | | <!-- these ones are listed as 'working in MESS' but are apparently the only images that work on real hardware too --> |
2376 | | <software name="dkongxm"> |
2377 | | <description>Donkey Kong (PAL, Demo, XM enhanced, V1.2)</description> |
2378 | | <year>2012</year> |
2379 | | <publisher><homebrew></publisher> |
2380 | | <info name="programmer" value="TEP392" /> |
2381 | | <sharedfeat name="compatibility" value="PAL"/> |
2382 | | <part name="cart" interface="a7800_cart"> |
2383 | | <feature name="slot" value="a78_sg9" /> |
2384 | | <dataarea name="rom" size="147456"> |
2385 | | <rom name="dkxm_demo_v12_pal.bin" size="147456" crc="9f6c0600" sha1="18409eace880dda3646792f9ec050a87a3b1b382" offset="0" /> |
2386 | | </dataarea> |
2387 | | </part> |
2388 | | </software> |
| 2375 | <!-- these ones are listed as 'working in MESS' but are apparently the only images that work on real hardware too --> |
| 2376 | <software name="dkongxm"> |
| 2377 | <description>Donkey Kong (PAL, Demo, XM enhanced, V1.2)</description> |
| 2378 | <year>2012</year> |
| 2379 | <publisher><homebrew></publisher> |
| 2380 | <info name="programmer" value="TEP392" /> |
| 2381 | <sharedfeat name="compatibility" value="PAL"/> |
| 2382 | <part name="cart" interface="a7800_cart"> |
| 2383 | <feature name="slot" value="a78_sg9" /> |
| 2384 | <dataarea name="rom" size="147456"> |
| 2385 | <rom name="dkxm_demo_v12_pal.bin" size="147456" crc="9f6c0600" sha1="18409eace880dda3646792f9ec050a87a3b1b382" offset="0" /> |
| 2386 | </dataarea> |
| 2387 | </part> |
| 2388 | </software> |
2389 | 2389 | |
2390 | | <software name="dkongxmu" cloneof="dkongxm"> |
2391 | | <description>Donkey Kong (NTSC, Demo, XM enhanced, V1.2)</description> |
2392 | | <year>2012</year> |
2393 | | <publisher><homebrew></publisher> |
2394 | | <info name="programmer" value="TEP392" /> |
2395 | | <sharedfeat name="compatibility" value="NTSC"/> |
2396 | | <part name="cart" interface="a7800_cart"> |
2397 | | <feature name="slot" value="a78_sg9" /> |
2398 | | <dataarea name="rom" size="147456"> |
2399 | | <rom name="dkxm_demo_v12_ntsc.bin" size="147456" crc="8b06bb4b" sha1="3129cbc91dc8f223f00db5c3273a4a330320be99" offset="0" /> |
2400 | | </dataarea> |
2401 | | </part> |
2402 | | </software> |
| 2390 | <software name="dkongxmu" cloneof="dkongxm"> |
| 2391 | <description>Donkey Kong (NTSC, Demo, XM enhanced, V1.2)</description> |
| 2392 | <year>2012</year> |
| 2393 | <publisher><homebrew></publisher> |
| 2394 | <info name="programmer" value="TEP392" /> |
| 2395 | <sharedfeat name="compatibility" value="NTSC"/> |
| 2396 | <part name="cart" interface="a7800_cart"> |
| 2397 | <feature name="slot" value="a78_sg9" /> |
| 2398 | <dataarea name="rom" size="147456"> |
| 2399 | <rom name="dkxm_demo_v12_ntsc.bin" size="147456" crc="8b06bb4b" sha1="3129cbc91dc8f223f00db5c3273a4a330320be99" offset="0" /> |
| 2400 | </dataarea> |
| 2401 | </part> |
| 2402 | </software> |
2403 | 2403 | |
2404 | | <!-- these are listed as 'with HSC emulation' and are designed for the prosystem emulator, they simulate some of the HSC features --> |
2405 | | <!-- remove them? --> |
2406 | | |
2407 | | <software name="dkongxmps" cloneof="dkongxm" supported="no"> |
2408 | | <description>Donkey Kong (PAL, Demo, XM enhanced, V1.2, for prosystem emulator)</description> |
2409 | | <year>2012</year> |
2410 | | <publisher><homebrew></publisher> |
2411 | | <info name="programmer" value="TEP392" /> |
2412 | | <sharedfeat name="compatibility" value="PAL"/> |
2413 | | <part name="cart" interface="a7800_cart"> |
2414 | | <feature name="slot" value="a78_sg9" /> |
2415 | | <dataarea name="rom" size="147456"> |
2416 | | <rom name="dkxm_final_demo_pal_hsc.bin" size="147456" crc="6510b674" sha1="65b723b470d287af51e9888813149c43fb11ac26" offset="0" /> |
2417 | | </dataarea> |
2418 | | </part> |
2419 | | </software> |
| 2404 | <!-- these are listed as 'with HSC emulation' and are designed for the prosystem emulator, they simulate some of the HSC features --> |
| 2405 | <!-- remove them? --> |
2420 | 2406 | |
2421 | | <software name="dkongxmups" cloneof="dkongxm" supported="no"> |
2422 | | <description>Donkey Kong (NTSC, Demo, XM enhanced, V1.2, for prosystem emulator)</description> |
2423 | | <year>2012</year> |
2424 | | <publisher><homebrew></publisher> |
2425 | | <info name="programmer" value="TEP392" /> |
2426 | | <sharedfeat name="compatibility" value="NTSC"/> |
2427 | | <part name="cart" interface="a7800_cart"> |
2428 | | <feature name="slot" value="a78_sg9" /> |
2429 | | <dataarea name="rom" size="147456"> |
2430 | | <rom name="dkxm_final_demo_ntsc_hsc.bin" size="147456" crc="2c67fea7" sha1="7825c1946e3c7492fa9bbfae33029cd68c0d1135" offset="0" /> |
2431 | | </dataarea> |
2432 | | </part> |
2433 | | </software> |
2434 | | |
| 2407 | <software name="dkongxmps" cloneof="dkongxm" supported="no"> |
| 2408 | <description>Donkey Kong (PAL, Demo, XM enhanced, V1.2, for prosystem emulator)</description> |
| 2409 | <year>2012</year> |
| 2410 | <publisher><homebrew></publisher> |
| 2411 | <info name="programmer" value="TEP392" /> |
| 2412 | <sharedfeat name="compatibility" value="PAL"/> |
| 2413 | <part name="cart" interface="a7800_cart"> |
| 2414 | <feature name="slot" value="a78_sg9" /> |
| 2415 | <dataarea name="rom" size="147456"> |
| 2416 | <rom name="dkxm_final_demo_pal_hsc.bin" size="147456" crc="6510b674" sha1="65b723b470d287af51e9888813149c43fb11ac26" offset="0" /> |
| 2417 | </dataarea> |
| 2418 | </part> |
| 2419 | </software> |
2435 | 2420 | |
| 2421 | <software name="dkongxmups" cloneof="dkongxm" supported="no"> |
| 2422 | <description>Donkey Kong (NTSC, Demo, XM enhanced, V1.2, for prosystem emulator)</description> |
| 2423 | <year>2012</year> |
| 2424 | <publisher><homebrew></publisher> |
| 2425 | <info name="programmer" value="TEP392" /> |
| 2426 | <sharedfeat name="compatibility" value="NTSC"/> |
| 2427 | <part name="cart" interface="a7800_cart"> |
| 2428 | <feature name="slot" value="a78_sg9" /> |
| 2429 | <dataarea name="rom" size="147456"> |
| 2430 | <rom name="dkxm_final_demo_ntsc_hsc.bin" size="147456" crc="2c67fea7" sha1="7825c1946e3c7492fa9bbfae33029cd68c0d1135" offset="0" /> |
| 2431 | </dataarea> |
| 2432 | </part> |
| 2433 | </software> |
2436 | 2434 | |
2437 | | <!-- an older version? sound is broken, did it work on the real hardware? --> |
2438 | | <software name="dkongxmo" cloneof="dkongxm" supported="no"> |
2439 | | <description>Donkey Kong (PAL, Demo, XM enhanced, older)</description> |
2440 | | <year>2012</year> |
2441 | | <publisher><homebrew></publisher> |
2442 | | <info name="programmer" value="TEP392" /> |
2443 | | <sharedfeat name="compatibility" value="PAL"/> |
2444 | | <part name="cart" interface="a7800_cart"> |
2445 | | <feature name="slot" value="a78_sg9" /> |
2446 | | <dataarea name="rom" size="147456"> |
2447 | | <rom name="dkxm_final_demo_pal.bin" size="147456" crc="d362712e" sha1="118c462d6698bd23c378785f80062fdd7d65ca00" offset="0" /> |
2448 | | </dataarea> |
2449 | | </part> |
2450 | | </software> |
2451 | 2435 | |
2452 | | <software name="dkongxmou" cloneof="dkongxm" supported="no" > |
2453 | | <description>Donkey Kong (NTSC, Demo, XM enhanced, older)</description> |
2454 | | <year>2012</year> |
2455 | | <publisher><homebrew></publisher> |
2456 | | <info name="programmer" value="TEP392" /> |
2457 | | <sharedfeat name="compatibility" value="NTSC"/> |
2458 | | <part name="cart" interface="a7800_cart"> |
2459 | | <feature name="slot" value="a78_sg9" /> |
2460 | | <dataarea name="rom" size="147456"> |
2461 | | <rom name="dkxm_final_demo_ntsc.bin" size="147456" crc="6e170055" sha1="f4da231312da06ff9e8af5681b5013b14886b455" offset="0" /> |
2462 | | </dataarea> |
2463 | | </part> |
2464 | | </software> |
2465 | | |
2466 | | <!-- this one is meant to detect PAL / NTSC and runs on an A7800 CC2 development board, without sound? based off older code? --> |
2467 | | <software name="dkongxmcc" cloneof="dkongxm" supported="no"> |
2468 | | <description>Donkey Kong (PAL/NTSC, Demo, XM enhanced, older, for CC2 board)</description> |
2469 | | <year>2012</year> |
2470 | | <publisher><homebrew></publisher> |
2471 | | <info name="programmer" value="TEP392" /> |
2472 | | <part name="cart" interface="a7800_cart"> |
2473 | | <feature name="slot" value="a78_sg9" /> |
2474 | | <dataarea name="rom" size="147456"> |
2475 | | <rom name="dkxm_final_demo.bin" size="0x20000" crc="fd503bd4" sha1="454d754a0c4603323e476d9418f343a6a1a0d017" offset="0x4000" /> |
2476 | | <rom size="0x4000" offset="0x0000" loadflag="continue" /> |
2477 | | </dataarea> |
2478 | | </part> |
2479 | | </software> |
2480 | | |
| 2436 | |
| 2437 | <!-- an older version? sound is broken, did it work on the real hardware? --> |
| 2438 | <software name="dkongxmo" cloneof="dkongxm" supported="no"> |
| 2439 | <description>Donkey Kong (PAL, Demo, XM enhanced, older)</description> |
| 2440 | <year>2012</year> |
| 2441 | <publisher><homebrew></publisher> |
| 2442 | <info name="programmer" value="TEP392" /> |
| 2443 | <sharedfeat name="compatibility" value="PAL"/> |
| 2444 | <part name="cart" interface="a7800_cart"> |
| 2445 | <feature name="slot" value="a78_sg9" /> |
| 2446 | <dataarea name="rom" size="147456"> |
| 2447 | <rom name="dkxm_final_demo_pal.bin" size="147456" crc="d362712e" sha1="118c462d6698bd23c378785f80062fdd7d65ca00" offset="0" /> |
| 2448 | </dataarea> |
| 2449 | </part> |
| 2450 | </software> |
| 2451 | |
| 2452 | <software name="dkongxmou" cloneof="dkongxm" supported="no" > |
| 2453 | <description>Donkey Kong (NTSC, Demo, XM enhanced, older)</description> |
| 2454 | <year>2012</year> |
| 2455 | <publisher><homebrew></publisher> |
| 2456 | <info name="programmer" value="TEP392" /> |
| 2457 | <sharedfeat name="compatibility" value="NTSC"/> |
| 2458 | <part name="cart" interface="a7800_cart"> |
| 2459 | <feature name="slot" value="a78_sg9" /> |
| 2460 | <dataarea name="rom" size="147456"> |
| 2461 | <rom name="dkxm_final_demo_ntsc.bin" size="147456" crc="6e170055" sha1="f4da231312da06ff9e8af5681b5013b14886b455" offset="0" /> |
| 2462 | </dataarea> |
| 2463 | </part> |
| 2464 | </software> |
| 2465 | |
| 2466 | <!-- this one is meant to detect PAL / NTSC and runs on an A7800 CC2 development board, without sound? based off older code? --> |
| 2467 | <software name="dkongxmcc" cloneof="dkongxm" supported="no"> |
| 2468 | <description>Donkey Kong (PAL/NTSC, Demo, XM enhanced, older, for CC2 board)</description> |
| 2469 | <year>2012</year> |
| 2470 | <publisher><homebrew></publisher> |
| 2471 | <info name="programmer" value="TEP392" /> |
| 2472 | <part name="cart" interface="a7800_cart"> |
| 2473 | <feature name="slot" value="a78_sg9" /> |
| 2474 | <dataarea name="rom" size="147456"> |
| 2475 | <rom name="dkxm_final_demo.bin" size="0x20000" crc="fd503bd4" sha1="454d754a0c4603323e476d9418f343a6a1a0d017" offset="0x4000" /> |
| 2476 | <rom size="0x4000" offset="0x0000" loadflag="continue" /> |
| 2477 | </dataarea> |
| 2478 | </part> |
| 2479 | </software> |
| 2480 | |
2481 | 2481 | </softwarelist> |
trunk/src/emu/cpu/hphybrid/hphybrid.c
r248551 | r248552 | |
6 | 6 | #include "hphybrid.h" |
7 | 7 | |
8 | 8 | enum { |
9 | | HPHYBRID_A, |
10 | | HPHYBRID_B, |
11 | | HPHYBRID_C, |
12 | | HPHYBRID_D, |
13 | | HPHYBRID_P, |
14 | | HPHYBRID_R, |
15 | | HPHYBRID_IV, |
16 | | HPHYBRID_PA, |
17 | | HPHYBRID_DMAPA, |
18 | | HPHYBRID_DMAMA, |
19 | | HPHYBRID_DMAC, |
20 | | HPHYBRID_I |
| 9 | HPHYBRID_A, |
| 10 | HPHYBRID_B, |
| 11 | HPHYBRID_C, |
| 12 | HPHYBRID_D, |
| 13 | HPHYBRID_P, |
| 14 | HPHYBRID_R, |
| 15 | HPHYBRID_IV, |
| 16 | HPHYBRID_PA, |
| 17 | HPHYBRID_DMAPA, |
| 18 | HPHYBRID_DMAMA, |
| 19 | HPHYBRID_DMAC, |
| 20 | HPHYBRID_I |
21 | 21 | }; |
22 | 22 | |
23 | 23 | #define BIT_MASK(n) (1U << (n)) |
r248551 | r248552 | |
51 | 51 | |
52 | 52 | WRITE_LINE_MEMBER(hp_hybrid_cpu_device::dmar_w) |
53 | 53 | { |
54 | | if (state) { |
55 | | BIT_SET(m_flags , HPHYBRID_DMAR_BIT); |
56 | | } else { |
57 | | BIT_CLR(m_flags , HPHYBRID_DMAR_BIT); |
58 | | } |
| 54 | if (state) { |
| 55 | BIT_SET(m_flags , HPHYBRID_DMAR_BIT); |
| 56 | } else { |
| 57 | BIT_CLR(m_flags , HPHYBRID_DMAR_BIT); |
| 58 | } |
59 | 59 | } |
60 | 60 | |
61 | 61 | hp_hybrid_cpu_device::hp_hybrid_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname) |
62 | 62 | : cpu_device(mconfig, type, name, tag, owner, clock, shortname, __FILE__), |
63 | | m_program_config("program", ENDIANNESS_BIG, 16, 16, -1), |
64 | | m_io_config("io", ENDIANNESS_BIG, 16, 6, -1) |
| 63 | m_program_config("program", ENDIANNESS_BIG, 16, 16, -1), |
| 64 | m_io_config("io", ENDIANNESS_BIG, 16, 6, -1) |
65 | 65 | { |
66 | 66 | } |
67 | 67 | |
68 | 68 | void hp_hybrid_cpu_device::device_start() |
69 | 69 | { |
70 | | m_reg_A = 0; |
71 | | m_reg_B = 0; |
72 | | m_reg_P = HP_RESET_ADDR; |
73 | | m_reg_R = 0; |
74 | | m_reg_C = 0; |
75 | | m_reg_D = 0; |
76 | | m_reg_IV = 0; |
77 | | m_reg_PA[ 0 ] = 0; |
78 | | m_reg_PA[ 1 ] = 0; |
79 | | m_reg_PA[ 2 ] = 0; |
80 | | m_flags = 0; |
81 | | m_dmapa = 0; |
82 | | m_dmama = 0; |
83 | | m_dmac = 0; |
84 | | m_reg_I = 0; |
| 70 | m_reg_A = 0; |
| 71 | m_reg_B = 0; |
| 72 | m_reg_P = HP_RESET_ADDR; |
| 73 | m_reg_R = 0; |
| 74 | m_reg_C = 0; |
| 75 | m_reg_D = 0; |
| 76 | m_reg_IV = 0; |
| 77 | m_reg_PA[ 0 ] = 0; |
| 78 | m_reg_PA[ 1 ] = 0; |
| 79 | m_reg_PA[ 2 ] = 0; |
| 80 | m_flags = 0; |
| 81 | m_dmapa = 0; |
| 82 | m_dmama = 0; |
| 83 | m_dmac = 0; |
| 84 | m_reg_I = 0; |
85 | 85 | |
86 | | { |
87 | | state_add(HPHYBRID_A, "A", m_reg_A); |
88 | | state_add(HPHYBRID_B, "B", m_reg_B); |
89 | | state_add(HPHYBRID_C, "C", m_reg_C); |
90 | | state_add(HPHYBRID_D, "D", m_reg_D); |
91 | | state_add(HPHYBRID_P, "P", m_reg_P); |
92 | | state_add(STATE_GENPC, "GENPC", m_reg_P).noshow(); |
93 | | state_add(HPHYBRID_R, "R", m_reg_R); |
94 | | state_add(STATE_GENSP, "GENSP", m_reg_R).noshow(); |
95 | | state_add(HPHYBRID_IV, "IV", m_reg_IV); |
96 | | state_add(HPHYBRID_PA, "PA", m_reg_PA[ 0 ]); |
97 | | state_add(STATE_GENFLAGS, "GENFLAGS", m_flags).noshow().formatstr("%9s"); |
98 | | state_add(HPHYBRID_DMAPA , "DMAPA" , m_dmapa).noshow(); |
99 | | state_add(HPHYBRID_DMAMA , "DMAMA" , m_dmama).noshow(); |
100 | | state_add(HPHYBRID_DMAC , "DMAC" , m_dmac).noshow(); |
101 | | state_add(HPHYBRID_I , "I" , m_reg_I).noshow(); |
102 | | } |
| 86 | { |
| 87 | state_add(HPHYBRID_A, "A", m_reg_A); |
| 88 | state_add(HPHYBRID_B, "B", m_reg_B); |
| 89 | state_add(HPHYBRID_C, "C", m_reg_C); |
| 90 | state_add(HPHYBRID_D, "D", m_reg_D); |
| 91 | state_add(HPHYBRID_P, "P", m_reg_P); |
| 92 | state_add(STATE_GENPC, "GENPC", m_reg_P).noshow(); |
| 93 | state_add(HPHYBRID_R, "R", m_reg_R); |
| 94 | state_add(STATE_GENSP, "GENSP", m_reg_R).noshow(); |
| 95 | state_add(HPHYBRID_IV, "IV", m_reg_IV); |
| 96 | state_add(HPHYBRID_PA, "PA", m_reg_PA[ 0 ]); |
| 97 | state_add(STATE_GENFLAGS, "GENFLAGS", m_flags).noshow().formatstr("%9s"); |
| 98 | state_add(HPHYBRID_DMAPA , "DMAPA" , m_dmapa).noshow(); |
| 99 | state_add(HPHYBRID_DMAMA , "DMAMA" , m_dmama).noshow(); |
| 100 | state_add(HPHYBRID_DMAC , "DMAC" , m_dmac).noshow(); |
| 101 | state_add(HPHYBRID_I , "I" , m_reg_I).noshow(); |
| 102 | } |
103 | 103 | |
104 | | m_program = &space(AS_PROGRAM); |
105 | | m_direct = &m_program->direct(); |
106 | | m_io = &space(AS_IO); |
| 104 | m_program = &space(AS_PROGRAM); |
| 105 | m_direct = &m_program->direct(); |
| 106 | m_io = &space(AS_IO); |
107 | 107 | |
108 | | save_item(NAME(m_reg_A)); |
109 | | save_item(NAME(m_reg_B)); |
110 | | save_item(NAME(m_reg_C)); |
111 | | save_item(NAME(m_reg_D)); |
112 | | save_item(NAME(m_reg_P)); |
113 | | save_item(NAME(m_reg_R)); |
114 | | save_item(NAME(m_reg_IV)); |
115 | | save_item(NAME(m_reg_PA[0])); |
116 | | save_item(NAME(m_reg_PA[1])); |
117 | | save_item(NAME(m_reg_PA[2])); |
118 | | save_item(NAME(m_flags)); |
119 | | save_item(NAME(m_dmapa)); |
120 | | save_item(NAME(m_dmama)); |
121 | | save_item(NAME(m_dmac)); |
122 | | save_item(NAME(m_reg_I)); |
| 108 | save_item(NAME(m_reg_A)); |
| 109 | save_item(NAME(m_reg_B)); |
| 110 | save_item(NAME(m_reg_C)); |
| 111 | save_item(NAME(m_reg_D)); |
| 112 | save_item(NAME(m_reg_P)); |
| 113 | save_item(NAME(m_reg_R)); |
| 114 | save_item(NAME(m_reg_IV)); |
| 115 | save_item(NAME(m_reg_PA[0])); |
| 116 | save_item(NAME(m_reg_PA[1])); |
| 117 | save_item(NAME(m_reg_PA[2])); |
| 118 | save_item(NAME(m_flags)); |
| 119 | save_item(NAME(m_dmapa)); |
| 120 | save_item(NAME(m_dmama)); |
| 121 | save_item(NAME(m_dmac)); |
| 122 | save_item(NAME(m_reg_I)); |
123 | 123 | |
124 | | m_icountptr = &m_icount; |
| 124 | m_icountptr = &m_icount; |
125 | 125 | } |
126 | 126 | |
127 | 127 | void hp_hybrid_cpu_device::device_reset() |
128 | 128 | { |
129 | | m_reg_P = HP_RESET_ADDR; |
130 | | m_reg_I = RM(m_reg_P); |
131 | | m_flags = 0; |
| 129 | m_reg_P = HP_RESET_ADDR; |
| 130 | m_reg_I = RM(m_reg_P); |
| 131 | m_flags = 0; |
132 | 132 | } |
133 | 133 | |
134 | 134 | void hp_hybrid_cpu_device::execute_run() |
135 | 135 | { |
136 | | do { |
137 | | if (BIT(m_flags , HPHYBRID_DMAEN_BIT) && BIT(m_flags , HPHYBRID_DMAR_BIT)) { |
138 | | handle_dma(); |
139 | | } else { |
140 | | debugger_instruction_hook(this, m_reg_P); |
| 136 | do { |
| 137 | if (BIT(m_flags , HPHYBRID_DMAEN_BIT) && BIT(m_flags , HPHYBRID_DMAR_BIT)) { |
| 138 | handle_dma(); |
| 139 | } else { |
| 140 | debugger_instruction_hook(this, m_reg_P); |
141 | 141 | |
142 | | // Check for interrupts |
143 | | check_for_interrupts(); |
| 142 | // Check for interrupts |
| 143 | check_for_interrupts(); |
144 | 144 | |
145 | | m_reg_I = execute_one(m_reg_I); |
146 | | } |
147 | | } while (m_icount > 0); |
| 145 | m_reg_I = execute_one(m_reg_I); |
| 146 | } |
| 147 | } while (m_icount > 0); |
148 | 148 | } |
149 | 149 | |
150 | 150 | void hp_hybrid_cpu_device::execute_set_input(int inputnum, int state) |
151 | 151 | { |
152 | | if (inputnum < HPHYBRID_INT_LVLS) { |
153 | | if (state) { |
154 | | BIT_SET(m_flags , HPHYBRID_IRH_BIT + inputnum); |
155 | | } else { |
156 | | BIT_CLR(m_flags , HPHYBRID_IRH_BIT + inputnum); |
157 | | } |
158 | | } |
| 152 | if (inputnum < HPHYBRID_INT_LVLS) { |
| 153 | if (state) { |
| 154 | BIT_SET(m_flags , HPHYBRID_IRH_BIT + inputnum); |
| 155 | } else { |
| 156 | BIT_CLR(m_flags , HPHYBRID_IRH_BIT + inputnum); |
| 157 | } |
| 158 | } |
159 | 159 | } |
160 | 160 | |
161 | 161 | /** |
r248551 | r248552 | |
167 | 167 | */ |
168 | 168 | UINT16 hp_hybrid_cpu_device::execute_one(UINT16 opcode) |
169 | 169 | { |
170 | | if ((opcode & 0x7fe0) == 0x7000) { |
171 | | // EXE |
172 | | m_icount -= 8; |
173 | | return RM(opcode & 0x1f); |
174 | | } else { |
175 | | m_reg_P = execute_one_sub(opcode); |
176 | | return RM(m_reg_P); |
177 | | } |
| 170 | if ((opcode & 0x7fe0) == 0x7000) { |
| 171 | // EXE |
| 172 | m_icount -= 8; |
| 173 | return RM(opcode & 0x1f); |
| 174 | } else { |
| 175 | m_reg_P = execute_one_sub(opcode); |
| 176 | return RM(m_reg_P); |
| 177 | } |
178 | 178 | } |
179 | 179 | |
180 | 180 | /** |
r248551 | r248552 | |
186 | 186 | */ |
187 | 187 | UINT16 hp_hybrid_cpu_device::execute_one_sub(UINT16 opcode) |
188 | 188 | { |
189 | | UINT16 ea; |
190 | | UINT16 tmp; |
| 189 | UINT16 ea; |
| 190 | UINT16 tmp; |
191 | 191 | |
192 | | switch (opcode & 0x7800) { |
193 | | case 0x0000: |
194 | | // LDA |
195 | | m_icount -= 13; |
196 | | m_reg_A = RM(get_ea(opcode)); |
197 | | break; |
| 192 | switch (opcode & 0x7800) { |
| 193 | case 0x0000: |
| 194 | // LDA |
| 195 | m_icount -= 13; |
| 196 | m_reg_A = RM(get_ea(opcode)); |
| 197 | break; |
198 | 198 | |
199 | | case 0x0800: |
200 | | // LDB |
201 | | m_icount -= 13; |
202 | | m_reg_B = RM(get_ea(opcode)); |
203 | | break; |
| 199 | case 0x0800: |
| 200 | // LDB |
| 201 | m_icount -= 13; |
| 202 | m_reg_B = RM(get_ea(opcode)); |
| 203 | break; |
204 | 204 | |
205 | | case 0x1000: |
206 | | // CPA |
207 | | m_icount -= 16; |
208 | | if (m_reg_A != RM(get_ea(opcode))) { |
209 | | // Skip next instruction |
210 | | return m_reg_P + 2; |
211 | | } |
212 | | break; |
| 205 | case 0x1000: |
| 206 | // CPA |
| 207 | m_icount -= 16; |
| 208 | if (m_reg_A != RM(get_ea(opcode))) { |
| 209 | // Skip next instruction |
| 210 | return m_reg_P + 2; |
| 211 | } |
| 212 | break; |
213 | 213 | |
214 | | case 0x1800: |
215 | | // CPB |
216 | | m_icount -= 16; |
217 | | if (m_reg_B != RM(get_ea(opcode))) { |
218 | | // Skip next instruction |
219 | | return m_reg_P + 2; |
220 | | } |
221 | | break; |
| 214 | case 0x1800: |
| 215 | // CPB |
| 216 | m_icount -= 16; |
| 217 | if (m_reg_B != RM(get_ea(opcode))) { |
| 218 | // Skip next instruction |
| 219 | return m_reg_P + 2; |
| 220 | } |
| 221 | break; |
222 | 222 | |
223 | | case 0x2000: |
224 | | // ADA |
225 | | m_icount -= 13; |
226 | | do_add(m_reg_A , RM(get_ea(opcode))); |
227 | | break; |
| 223 | case 0x2000: |
| 224 | // ADA |
| 225 | m_icount -= 13; |
| 226 | do_add(m_reg_A , RM(get_ea(opcode))); |
| 227 | break; |
228 | 228 | |
229 | | case 0x2800: |
230 | | // ADB |
231 | | m_icount -= 13; |
232 | | do_add(m_reg_B , RM(get_ea(opcode))); |
233 | | break; |
| 229 | case 0x2800: |
| 230 | // ADB |
| 231 | m_icount -= 13; |
| 232 | do_add(m_reg_B , RM(get_ea(opcode))); |
| 233 | break; |
234 | 234 | |
235 | | case 0x3000: |
236 | | // STA |
237 | | m_icount -= 13; |
238 | | WM(get_ea(opcode) , m_reg_A); |
239 | | break; |
| 235 | case 0x3000: |
| 236 | // STA |
| 237 | m_icount -= 13; |
| 238 | WM(get_ea(opcode) , m_reg_A); |
| 239 | break; |
240 | 240 | |
241 | | case 0x3800: |
242 | | // STB |
243 | | m_icount -= 13; |
244 | | WM(get_ea(opcode) , m_reg_B); |
245 | | break; |
| 241 | case 0x3800: |
| 242 | // STB |
| 243 | m_icount -= 13; |
| 244 | WM(get_ea(opcode) , m_reg_B); |
| 245 | break; |
246 | 246 | |
247 | | case 0x4000: |
248 | | // JSM |
249 | | m_icount -= 17; |
250 | | WM(++m_reg_R , m_reg_P); |
251 | | return get_ea(opcode); |
| 247 | case 0x4000: |
| 248 | // JSM |
| 249 | m_icount -= 17; |
| 250 | WM(++m_reg_R , m_reg_P); |
| 251 | return get_ea(opcode); |
252 | 252 | |
253 | | case 0x4800: |
254 | | // ISZ |
255 | | m_icount -= 19; |
256 | | ea = get_ea(opcode); |
257 | | tmp = RM(ea) + 1; |
258 | | WM(ea , tmp); |
259 | | if (tmp == 0) { |
260 | | // Skip next instruction |
261 | | return m_reg_P + 2; |
262 | | } |
263 | | break; |
| 253 | case 0x4800: |
| 254 | // ISZ |
| 255 | m_icount -= 19; |
| 256 | ea = get_ea(opcode); |
| 257 | tmp = RM(ea) + 1; |
| 258 | WM(ea , tmp); |
| 259 | if (tmp == 0) { |
| 260 | // Skip next instruction |
| 261 | return m_reg_P + 2; |
| 262 | } |
| 263 | break; |
264 | 264 | |
265 | | case 0x5000: |
266 | | // AND |
267 | | m_icount -= 13; |
268 | | m_reg_A &= RM(get_ea(opcode)); |
269 | | break; |
| 265 | case 0x5000: |
| 266 | // AND |
| 267 | m_icount -= 13; |
| 268 | m_reg_A &= RM(get_ea(opcode)); |
| 269 | break; |
270 | 270 | |
271 | | case 0x5800: |
272 | | // DSZ |
273 | | m_icount -= 19; |
274 | | ea = get_ea(opcode); |
275 | | tmp = RM(ea) - 1; |
276 | | WM(ea , tmp); |
277 | | if (tmp == 0) { |
278 | | // Skip next instruction |
279 | | return m_reg_P + 2; |
280 | | } |
281 | | break; |
| 271 | case 0x5800: |
| 272 | // DSZ |
| 273 | m_icount -= 19; |
| 274 | ea = get_ea(opcode); |
| 275 | tmp = RM(ea) - 1; |
| 276 | WM(ea , tmp); |
| 277 | if (tmp == 0) { |
| 278 | // Skip next instruction |
| 279 | return m_reg_P + 2; |
| 280 | } |
| 281 | break; |
282 | 282 | |
283 | | case 0x6000: |
284 | | // IOR |
285 | | m_icount -= 13; |
286 | | m_reg_A |= RM(get_ea(opcode)); |
287 | | break; |
| 283 | case 0x6000: |
| 284 | // IOR |
| 285 | m_icount -= 13; |
| 286 | m_reg_A |= RM(get_ea(opcode)); |
| 287 | break; |
288 | 288 | |
289 | | case 0x6800: |
290 | | // JMP |
291 | | m_icount -= 8; |
292 | | return get_ea(opcode); |
| 289 | case 0x6800: |
| 290 | // JMP |
| 291 | m_icount -= 8; |
| 292 | return get_ea(opcode); |
293 | 293 | |
294 | | default: |
295 | | switch (opcode & 0xfec0) { |
296 | | case 0x7400: |
297 | | // RZA |
298 | | // SZA |
299 | | m_icount -= 14; |
300 | | return get_skip_addr(opcode , m_reg_A == 0); |
| 294 | default: |
| 295 | switch (opcode & 0xfec0) { |
| 296 | case 0x7400: |
| 297 | // RZA |
| 298 | // SZA |
| 299 | m_icount -= 14; |
| 300 | return get_skip_addr(opcode , m_reg_A == 0); |
301 | 301 | |
302 | | case 0x7440: |
303 | | // RIA |
304 | | // SIA |
305 | | m_icount -= 14; |
306 | | return get_skip_addr(opcode , m_reg_A++ == 0); |
| 302 | case 0x7440: |
| 303 | // RIA |
| 304 | // SIA |
| 305 | m_icount -= 14; |
| 306 | return get_skip_addr(opcode , m_reg_A++ == 0); |
307 | 307 | |
308 | | case 0x7480: |
309 | | // SFS |
310 | | // SFC |
311 | | m_icount -= 14; |
312 | | // TODO: read flag bit |
313 | | return get_skip_addr(opcode , true); |
| 308 | case 0x7480: |
| 309 | // SFS |
| 310 | // SFC |
| 311 | m_icount -= 14; |
| 312 | // TODO: read flag bit |
| 313 | return get_skip_addr(opcode , true); |
314 | 314 | |
315 | | case 0x7C00: |
316 | | // RZB |
317 | | // SZB |
318 | | m_icount -= 14; |
319 | | return get_skip_addr(opcode , m_reg_B == 0); |
| 315 | case 0x7C00: |
| 316 | // RZB |
| 317 | // SZB |
| 318 | m_icount -= 14; |
| 319 | return get_skip_addr(opcode , m_reg_B == 0); |
320 | 320 | |
321 | | case 0x7C40: |
322 | | // RIB |
323 | | // SIB |
324 | | m_icount -= 14; |
325 | | return get_skip_addr(opcode , m_reg_B++ == 0); |
| 321 | case 0x7C40: |
| 322 | // RIB |
| 323 | // SIB |
| 324 | m_icount -= 14; |
| 325 | return get_skip_addr(opcode , m_reg_B++ == 0); |
326 | 326 | |
327 | | case 0x7c80: |
328 | | // SSS |
329 | | // SSC |
330 | | m_icount -= 14; |
331 | | // TODO: read status bit |
332 | | return get_skip_addr(opcode , true); |
| 327 | case 0x7c80: |
| 328 | // SSS |
| 329 | // SSC |
| 330 | m_icount -= 14; |
| 331 | // TODO: read status bit |
| 332 | return get_skip_addr(opcode , true); |
333 | 333 | |
334 | | case 0x7cc0: |
335 | | // SHS |
336 | | // SHC |
337 | | m_icount -= 14; |
338 | | return get_skip_addr(opcode , !BIT(m_flags , HPHYBRID_HALT_BIT)); |
| 334 | case 0x7cc0: |
| 335 | // SHS |
| 336 | // SHC |
| 337 | m_icount -= 14; |
| 338 | return get_skip_addr(opcode , !BIT(m_flags , HPHYBRID_HALT_BIT)); |
339 | 339 | |
340 | | default: |
341 | | switch (opcode & 0xfe00) { |
342 | | case 0x7600: |
343 | | // SLA |
344 | | // RLA |
345 | | m_icount -= 14; |
346 | | return get_skip_addr_sc(opcode , m_reg_A , 0); |
| 340 | default: |
| 341 | switch (opcode & 0xfe00) { |
| 342 | case 0x7600: |
| 343 | // SLA |
| 344 | // RLA |
| 345 | m_icount -= 14; |
| 346 | return get_skip_addr_sc(opcode , m_reg_A , 0); |
347 | 347 | |
348 | | case 0x7e00: |
349 | | // SLB |
350 | | // RLB |
351 | | m_icount -= 14; |
352 | | return get_skip_addr_sc(opcode , m_reg_B , 0); |
| 348 | case 0x7e00: |
| 349 | // SLB |
| 350 | // RLB |
| 351 | m_icount -= 14; |
| 352 | return get_skip_addr_sc(opcode , m_reg_B , 0); |
353 | 353 | |
354 | | case 0xf400: |
355 | | // SAP |
356 | | // SAM |
357 | | m_icount -= 14; |
358 | | return get_skip_addr_sc(opcode , m_reg_A , 15); |
| 354 | case 0xf400: |
| 355 | // SAP |
| 356 | // SAM |
| 357 | m_icount -= 14; |
| 358 | return get_skip_addr_sc(opcode , m_reg_A , 15); |
359 | 359 | |
360 | | case 0xf600: |
361 | | // SOC |
362 | | // SOS |
363 | | m_icount -= 14; |
364 | | return get_skip_addr_sc(opcode , m_flags , HPHYBRID_O_BIT); |
| 360 | case 0xf600: |
| 361 | // SOC |
| 362 | // SOS |
| 363 | m_icount -= 14; |
| 364 | return get_skip_addr_sc(opcode , m_flags , HPHYBRID_O_BIT); |
365 | 365 | |
366 | | case 0xfc00: |
367 | | // SBP |
368 | | // SBM |
369 | | m_icount -= 14; |
370 | | return get_skip_addr_sc(opcode , m_reg_B , 15); |
| 366 | case 0xfc00: |
| 367 | // SBP |
| 368 | // SBM |
| 369 | m_icount -= 14; |
| 370 | return get_skip_addr_sc(opcode , m_reg_B , 15); |
371 | 371 | |
372 | | case 0xfe00: |
373 | | // SEC |
374 | | // SES |
375 | | m_icount -= 14; |
376 | | return get_skip_addr_sc(opcode , m_flags , HPHYBRID_C_BIT); |
| 372 | case 0xfe00: |
| 373 | // SEC |
| 374 | // SES |
| 375 | m_icount -= 14; |
| 376 | return get_skip_addr_sc(opcode , m_flags , HPHYBRID_C_BIT); |
377 | 377 | |
378 | | default: |
379 | | switch (opcode & 0xfff0) { |
380 | | case 0xf100: |
381 | | // AAR |
382 | | tmp = (opcode & 0xf) + 1; |
383 | | m_icount -= (9 + tmp); |
384 | | // A shift by 16 positions is equivalent to a shift by 15 |
385 | | tmp = tmp > 15 ? 15 : tmp; |
386 | | m_reg_A = ((m_reg_A ^ 0x8000) >> tmp) - (0x8000 >> tmp); |
387 | | break; |
| 378 | default: |
| 379 | switch (opcode & 0xfff0) { |
| 380 | case 0xf100: |
| 381 | // AAR |
| 382 | tmp = (opcode & 0xf) + 1; |
| 383 | m_icount -= (9 + tmp); |
| 384 | // A shift by 16 positions is equivalent to a shift by 15 |
| 385 | tmp = tmp > 15 ? 15 : tmp; |
| 386 | m_reg_A = ((m_reg_A ^ 0x8000) >> tmp) - (0x8000 >> tmp); |
| 387 | break; |
388 | 388 | |
389 | | case 0xf900: |
390 | | // ABR |
391 | | tmp = (opcode & 0xf) + 1; |
392 | | m_icount -= (9 + tmp); |
393 | | tmp = tmp > 15 ? 15 : tmp; |
394 | | m_reg_B = ((m_reg_B ^ 0x8000) >> tmp) - (0x8000 >> tmp); |
395 | | break; |
| 389 | case 0xf900: |
| 390 | // ABR |
| 391 | tmp = (opcode & 0xf) + 1; |
| 392 | m_icount -= (9 + tmp); |
| 393 | tmp = tmp > 15 ? 15 : tmp; |
| 394 | m_reg_B = ((m_reg_B ^ 0x8000) >> tmp) - (0x8000 >> tmp); |
| 395 | break; |
396 | 396 | |
397 | | case 0xf140: |
398 | | // SAR |
399 | | tmp = (opcode & 0xf) + 1; |
400 | | m_icount -= (9 + tmp); |
401 | | m_reg_A >>= tmp; |
402 | | break; |
| 397 | case 0xf140: |
| 398 | // SAR |
| 399 | tmp = (opcode & 0xf) + 1; |
| 400 | m_icount -= (9 + tmp); |
| 401 | m_reg_A >>= tmp; |
| 402 | break; |
403 | 403 | |
404 | | case 0xf940: |
405 | | // SBR |
406 | | tmp = (opcode & 0xf) + 1; |
407 | | m_icount -= (9 + tmp); |
408 | | m_reg_B >>= tmp; |
409 | | break; |
| 404 | case 0xf940: |
| 405 | // SBR |
| 406 | tmp = (opcode & 0xf) + 1; |
| 407 | m_icount -= (9 + tmp); |
| 408 | m_reg_B >>= tmp; |
| 409 | break; |
410 | 410 | |
411 | | case 0xf180: |
412 | | // SAL |
413 | | tmp = (opcode & 0xf) + 1; |
414 | | m_icount -= (9 + tmp); |
415 | | m_reg_A <<= tmp; |
416 | | break; |
| 411 | case 0xf180: |
| 412 | // SAL |
| 413 | tmp = (opcode & 0xf) + 1; |
| 414 | m_icount -= (9 + tmp); |
| 415 | m_reg_A <<= tmp; |
| 416 | break; |
417 | 417 | |
418 | | case 0xf980: |
419 | | // SBL |
420 | | tmp = (opcode & 0xf) + 1; |
421 | | m_icount -= (9 + tmp); |
422 | | m_reg_B <<= tmp; |
423 | | break; |
| 418 | case 0xf980: |
| 419 | // SBL |
| 420 | tmp = (opcode & 0xf) + 1; |
| 421 | m_icount -= (9 + tmp); |
| 422 | m_reg_B <<= tmp; |
| 423 | break; |
424 | 424 | |
425 | | case 0xf1c0: |
426 | | // RAR |
427 | | tmp = (opcode & 0xf) + 1; |
428 | | m_icount -= (9 + tmp); |
429 | | m_reg_A = (m_reg_A >> tmp) | (m_reg_A << (16 - tmp)); |
430 | | break; |
| 425 | case 0xf1c0: |
| 426 | // RAR |
| 427 | tmp = (opcode & 0xf) + 1; |
| 428 | m_icount -= (9 + tmp); |
| 429 | m_reg_A = (m_reg_A >> tmp) | (m_reg_A << (16 - tmp)); |
| 430 | break; |
431 | 431 | |
432 | | case 0xf9c0: |
433 | | // RBR |
434 | | tmp = (opcode & 0xf) + 1; |
435 | | m_icount -= (9 + tmp); |
436 | | m_reg_B = (m_reg_B >> tmp) | (m_reg_B << (16 - tmp)); |
437 | | break; |
| 432 | case 0xf9c0: |
| 433 | // RBR |
| 434 | tmp = (opcode & 0xf) + 1; |
| 435 | m_icount -= (9 + tmp); |
| 436 | m_reg_B = (m_reg_B >> tmp) | (m_reg_B << (16 - tmp)); |
| 437 | break; |
438 | 438 | |
439 | | default: |
440 | | if ((opcode & 0xf760) == 0x7160) { |
441 | | // Place/withdraw instructions |
442 | | m_icount -= 23; |
443 | | do_pw(opcode); |
444 | | } else if ((opcode & 0xff80) == 0xf080) { |
445 | | // RET |
446 | | m_icount -= 16; |
447 | | if (BIT(opcode , 6)) { |
448 | | // Pop PA stack |
449 | | if (BIT(m_flags , HPHYBRID_IRH_SVC_BIT)) { |
450 | | BIT_CLR(m_flags , HPHYBRID_IRH_SVC_BIT); |
451 | | memmove(&m_reg_PA[ 0 ] , &m_reg_PA[ 1 ] , HPHYBRID_INT_LVLS); |
452 | | } else if (BIT(m_flags , HPHYBRID_IRL_SVC_BIT)) { |
453 | | BIT_CLR(m_flags , HPHYBRID_IRL_SVC_BIT); |
454 | | memmove(&m_reg_PA[ 0 ] , &m_reg_PA[ 1 ] , HPHYBRID_INT_LVLS); |
455 | | } |
456 | | } |
457 | | tmp = RM(m_reg_R--) + (opcode & 0x1f); |
458 | | return BIT(opcode , 5) ? tmp - 0x20 : tmp; |
459 | | } else { |
460 | | switch (opcode) { |
461 | | case 0x7100: |
462 | | // SDO |
463 | | m_icount -= 12; |
464 | | BIT_SET(m_flags , HPHYBRID_DMADIR_BIT); |
465 | | break; |
| 439 | default: |
| 440 | if ((opcode & 0xf760) == 0x7160) { |
| 441 | // Place/withdraw instructions |
| 442 | m_icount -= 23; |
| 443 | do_pw(opcode); |
| 444 | } else if ((opcode & 0xff80) == 0xf080) { |
| 445 | // RET |
| 446 | m_icount -= 16; |
| 447 | if (BIT(opcode , 6)) { |
| 448 | // Pop PA stack |
| 449 | if (BIT(m_flags , HPHYBRID_IRH_SVC_BIT)) { |
| 450 | BIT_CLR(m_flags , HPHYBRID_IRH_SVC_BIT); |
| 451 | memmove(&m_reg_PA[ 0 ] , &m_reg_PA[ 1 ] , HPHYBRID_INT_LVLS); |
| 452 | } else if (BIT(m_flags , HPHYBRID_IRL_SVC_BIT)) { |
| 453 | BIT_CLR(m_flags , HPHYBRID_IRL_SVC_BIT); |
| 454 | memmove(&m_reg_PA[ 0 ] , &m_reg_PA[ 1 ] , HPHYBRID_INT_LVLS); |
| 455 | } |
| 456 | } |
| 457 | tmp = RM(m_reg_R--) + (opcode & 0x1f); |
| 458 | return BIT(opcode , 5) ? tmp - 0x20 : tmp; |
| 459 | } else { |
| 460 | switch (opcode) { |
| 461 | case 0x7100: |
| 462 | // SDO |
| 463 | m_icount -= 12; |
| 464 | BIT_SET(m_flags , HPHYBRID_DMADIR_BIT); |
| 465 | break; |
466 | 466 | |
467 | | case 0x7108: |
468 | | // SDI |
469 | | m_icount -= 12; |
470 | | BIT_CLR(m_flags , HPHYBRID_DMADIR_BIT); |
471 | | break; |
| 467 | case 0x7108: |
| 468 | // SDI |
| 469 | m_icount -= 12; |
| 470 | BIT_CLR(m_flags , HPHYBRID_DMADIR_BIT); |
| 471 | break; |
472 | 472 | |
473 | | case 0x7110: |
474 | | // EIR |
475 | | m_icount -= 12; |
476 | | BIT_SET(m_flags , HPHYBRID_INTEN_BIT); |
477 | | break; |
| 473 | case 0x7110: |
| 474 | // EIR |
| 475 | m_icount -= 12; |
| 476 | BIT_SET(m_flags , HPHYBRID_INTEN_BIT); |
| 477 | break; |
478 | 478 | |
479 | | case 0x7118: |
480 | | // DIR |
481 | | m_icount -= 12; |
482 | | BIT_CLR(m_flags , HPHYBRID_INTEN_BIT); |
483 | | break; |
| 479 | case 0x7118: |
| 480 | // DIR |
| 481 | m_icount -= 12; |
| 482 | BIT_CLR(m_flags , HPHYBRID_INTEN_BIT); |
| 483 | break; |
484 | 484 | |
485 | | case 0x7120: |
486 | | // DMA |
487 | | m_icount -= 12; |
488 | | BIT_SET(m_flags , HPHYBRID_DMAEN_BIT); |
489 | | break; |
| 485 | case 0x7120: |
| 486 | // DMA |
| 487 | m_icount -= 12; |
| 488 | BIT_SET(m_flags , HPHYBRID_DMAEN_BIT); |
| 489 | break; |
490 | 490 | |
491 | | case 0x7138: |
492 | | // DDR |
493 | | m_icount -= 12; |
494 | | BIT_CLR(m_flags , HPHYBRID_DMAEN_BIT); |
495 | | break; |
| 491 | case 0x7138: |
| 492 | // DDR |
| 493 | m_icount -= 12; |
| 494 | BIT_CLR(m_flags , HPHYBRID_DMAEN_BIT); |
| 495 | break; |
496 | 496 | |
497 | | case 0x7140: |
498 | | // DBL |
499 | | m_icount -= 12; |
500 | | BIT_CLR(m_flags , HPHYBRID_DB_BIT); |
501 | | break; |
| 497 | case 0x7140: |
| 498 | // DBL |
| 499 | m_icount -= 12; |
| 500 | BIT_CLR(m_flags , HPHYBRID_DB_BIT); |
| 501 | break; |
502 | 502 | |
503 | | case 0x7148: |
504 | | // CBL |
505 | | m_icount -= 12; |
506 | | BIT_CLR(m_flags , HPHYBRID_CB_BIT); |
507 | | break; |
| 503 | case 0x7148: |
| 504 | // CBL |
| 505 | m_icount -= 12; |
| 506 | BIT_CLR(m_flags , HPHYBRID_CB_BIT); |
| 507 | break; |
508 | 508 | |
509 | | case 0x7150: |
510 | | // DBU |
511 | | m_icount -= 12; |
512 | | BIT_SET(m_flags , HPHYBRID_DB_BIT); |
513 | | break; |
| 509 | case 0x7150: |
| 510 | // DBU |
| 511 | m_icount -= 12; |
| 512 | BIT_SET(m_flags , HPHYBRID_DB_BIT); |
| 513 | break; |
514 | 514 | |
515 | | case 0x7158: |
516 | | // CBU |
517 | | m_icount -= 12; |
518 | | BIT_SET(m_flags , HPHYBRID_CB_BIT); |
519 | | break; |
| 515 | case 0x7158: |
| 516 | // CBU |
| 517 | m_icount -= 12; |
| 518 | BIT_SET(m_flags , HPHYBRID_CB_BIT); |
| 519 | break; |
520 | 520 | |
521 | | case 0xf020: |
522 | | // TCA |
523 | | m_icount -= 9; |
524 | | m_reg_A = ~m_reg_A; |
525 | | do_add(m_reg_A , 1); |
526 | | break; |
| 521 | case 0xf020: |
| 522 | // TCA |
| 523 | m_icount -= 9; |
| 524 | m_reg_A = ~m_reg_A; |
| 525 | do_add(m_reg_A , 1); |
| 526 | break; |
527 | 527 | |
528 | | case 0xf060: |
529 | | // CMA |
530 | | m_icount -= 9; |
531 | | m_reg_A = ~m_reg_A; |
532 | | break; |
| 528 | case 0xf060: |
| 529 | // CMA |
| 530 | m_icount -= 9; |
| 531 | m_reg_A = ~m_reg_A; |
| 532 | break; |
533 | 533 | |
534 | | case 0xf820: |
535 | | // TCB |
536 | | m_icount -= 9; |
537 | | m_reg_B = ~m_reg_B; |
538 | | do_add(m_reg_B , 1); |
539 | | break; |
| 534 | case 0xf820: |
| 535 | // TCB |
| 536 | m_icount -= 9; |
| 537 | m_reg_B = ~m_reg_B; |
| 538 | do_add(m_reg_B , 1); |
| 539 | break; |
540 | 540 | |
541 | | case 0xf860: |
542 | | // CMB |
543 | | m_icount -= 9; |
544 | | m_reg_B = ~m_reg_B; |
545 | | break; |
| 541 | case 0xf860: |
| 542 | // CMB |
| 543 | m_icount -= 9; |
| 544 | m_reg_B = ~m_reg_B; |
| 545 | break; |
546 | 546 | |
547 | | default: |
548 | | // Unrecognized instructions: NOP |
549 | | // Execution time is fictional |
550 | | m_icount -= 6; |
551 | | } |
552 | | } |
553 | | } |
554 | | } |
555 | | } |
556 | | } |
| 547 | default: |
| 548 | // Unrecognized instructions: NOP |
| 549 | // Execution time is fictional |
| 550 | m_icount -= 6; |
| 551 | } |
| 552 | } |
| 553 | } |
| 554 | } |
| 555 | } |
| 556 | } |
557 | 557 | |
558 | | return m_reg_P + 1; |
| 558 | return m_reg_P + 1; |
559 | 559 | } |
560 | 560 | |
561 | 561 | void hp_hybrid_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) |
562 | 562 | { |
563 | | if (entry.index() == STATE_GENFLAGS) { |
564 | | strprintf(str, "%s %s %c %c", |
565 | | BIT(m_flags , HPHYBRID_DB_BIT) ? "Db":"..", |
566 | | BIT(m_flags , HPHYBRID_CB_BIT) ? "Cb":"..", |
567 | | BIT(m_flags , HPHYBRID_O_BIT) ? 'O':'.', |
568 | | BIT(m_flags , HPHYBRID_C_BIT) ? 'E':'.'); |
569 | | } |
| 563 | if (entry.index() == STATE_GENFLAGS) { |
| 564 | strprintf(str, "%s %s %c %c", |
| 565 | BIT(m_flags , HPHYBRID_DB_BIT) ? "Db":"..", |
| 566 | BIT(m_flags , HPHYBRID_CB_BIT) ? "Cb":"..", |
| 567 | BIT(m_flags , HPHYBRID_O_BIT) ? 'O':'.', |
| 568 | BIT(m_flags , HPHYBRID_C_BIT) ? 'E':'.'); |
| 569 | } |
570 | 570 | } |
571 | 571 | |
572 | 572 | offs_t hp_hybrid_cpu_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) |
573 | 573 | { |
574 | | extern CPU_DISASSEMBLE(hp_hybrid); |
575 | | return CPU_DISASSEMBLE_NAME(hp_hybrid)(this, buffer, pc, oprom, opram, options); |
| 574 | extern CPU_DISASSEMBLE(hp_hybrid); |
| 575 | return CPU_DISASSEMBLE_NAME(hp_hybrid)(this, buffer, pc, oprom, opram, options); |
576 | 576 | } |
577 | 577 | |
578 | 578 | UINT16 hp_hybrid_cpu_device::get_ea(UINT16 opcode) |
579 | 579 | { |
580 | | UINT16 base; |
581 | | UINT16 off; |
| 580 | UINT16 base; |
| 581 | UINT16 off; |
582 | 582 | |
583 | | if (BIT(opcode , 10)) { |
584 | | // Current page |
585 | | base = m_reg_P; |
586 | | } else { |
587 | | // Base page |
588 | | base = 0; |
589 | | } |
| 583 | if (BIT(opcode , 10)) { |
| 584 | // Current page |
| 585 | base = m_reg_P; |
| 586 | } else { |
| 587 | // Base page |
| 588 | base = 0; |
| 589 | } |
590 | 590 | |
591 | | off = opcode & 0x3ff; |
592 | | if (off & 0x200) { |
593 | | off -= 0x400; |
594 | | } |
| 591 | off = opcode & 0x3ff; |
| 592 | if (off & 0x200) { |
| 593 | off -= 0x400; |
| 594 | } |
595 | 595 | |
596 | | base += off; |
| 596 | base += off; |
597 | 597 | |
598 | | if (BIT(opcode , 15)) { |
599 | | // Indirect addressing |
600 | | m_icount -= 6; |
601 | | return RM(base); |
602 | | } else { |
603 | | // Direct addressing |
604 | | return base; |
605 | | } |
| 598 | if (BIT(opcode , 15)) { |
| 599 | // Indirect addressing |
| 600 | m_icount -= 6; |
| 601 | return RM(base); |
| 602 | } else { |
| 603 | // Direct addressing |
| 604 | return base; |
| 605 | } |
606 | 606 | } |
607 | 607 | |
608 | 608 | void hp_hybrid_cpu_device::do_add(UINT16& addend1 , UINT16 addend2) |
609 | 609 | { |
610 | | UINT32 tmp = addend1 + addend2; |
| 610 | UINT32 tmp = addend1 + addend2; |
611 | 611 | |
612 | | if (BIT(tmp , 16)) { |
613 | | // Carry |
614 | | BIT_SET(m_flags , HPHYBRID_C_BIT); |
615 | | } |
| 612 | if (BIT(tmp , 16)) { |
| 613 | // Carry |
| 614 | BIT_SET(m_flags , HPHYBRID_C_BIT); |
| 615 | } |
616 | 616 | |
617 | | if (BIT((tmp ^ addend1) & (tmp ^ addend2) , 15)) { |
618 | | // Overflow |
619 | | BIT_SET(m_flags , HPHYBRID_O_BIT); |
620 | | } |
| 617 | if (BIT((tmp ^ addend1) & (tmp ^ addend2) , 15)) { |
| 618 | // Overflow |
| 619 | BIT_SET(m_flags , HPHYBRID_O_BIT); |
| 620 | } |
621 | 621 | |
622 | | addend1 = (UINT16)tmp; |
| 622 | addend1 = (UINT16)tmp; |
623 | 623 | } |
624 | 624 | |
625 | 625 | UINT16 hp_hybrid_cpu_device::get_skip_addr(UINT16 opcode , bool condition) const |
626 | 626 | { |
627 | | bool skip_val = BIT(opcode , 8) != 0; |
| 627 | bool skip_val = BIT(opcode , 8) != 0; |
628 | 628 | |
629 | | if (condition == skip_val) { |
630 | | UINT16 off = opcode & 0x1f; |
| 629 | if (condition == skip_val) { |
| 630 | UINT16 off = opcode & 0x1f; |
631 | 631 | |
632 | | if (BIT(opcode , 5)) { |
633 | | off -= 0x20; |
634 | | } |
635 | | return m_reg_P + off; |
636 | | } else { |
637 | | return m_reg_P + 1; |
638 | | } |
| 632 | if (BIT(opcode , 5)) { |
| 633 | off -= 0x20; |
| 634 | } |
| 635 | return m_reg_P + off; |
| 636 | } else { |
| 637 | return m_reg_P + 1; |
| 638 | } |
639 | 639 | } |
640 | 640 | |
641 | 641 | UINT16 hp_hybrid_cpu_device::get_skip_addr_sc(UINT16 opcode , UINT16& v , unsigned n) |
642 | 642 | { |
643 | | bool val = BIT(v , n); |
| 643 | bool val = BIT(v , n); |
644 | 644 | |
645 | | if (BIT(opcode , 7)) { |
646 | | if (BIT(opcode , 6)) { |
647 | | BIT_SET(v , n); |
648 | | } else { |
649 | | BIT_CLR(v , n); |
650 | | } |
651 | | } |
| 645 | if (BIT(opcode , 7)) { |
| 646 | if (BIT(opcode , 6)) { |
| 647 | BIT_SET(v , n); |
| 648 | } else { |
| 649 | BIT_CLR(v , n); |
| 650 | } |
| 651 | } |
652 | 652 | |
653 | | return get_skip_addr(opcode , val); |
| 653 | return get_skip_addr(opcode , val); |
654 | 654 | } |
655 | 655 | |
656 | 656 | void hp_hybrid_cpu_device::do_pw(UINT16 opcode) |
657 | 657 | { |
658 | | UINT16 tmp; |
659 | | UINT16 reg_addr = opcode & 7; |
660 | | UINT16 *ptr_reg; |
661 | | UINT16 b_mask; |
| 658 | UINT16 tmp; |
| 659 | UINT16 reg_addr = opcode & 7; |
| 660 | UINT16 *ptr_reg; |
| 661 | UINT16 b_mask; |
662 | 662 | |
663 | | if (BIT(opcode , 3)) { |
664 | | ptr_reg = &m_reg_D; |
665 | | b_mask = BIT_MASK(HPHYBRID_DB_BIT); |
666 | | } else { |
667 | | ptr_reg = &m_reg_C; |
668 | | b_mask = BIT_MASK(HPHYBRID_CB_BIT); |
669 | | } |
| 663 | if (BIT(opcode , 3)) { |
| 664 | ptr_reg = &m_reg_D; |
| 665 | b_mask = BIT_MASK(HPHYBRID_DB_BIT); |
| 666 | } else { |
| 667 | ptr_reg = &m_reg_C; |
| 668 | b_mask = BIT_MASK(HPHYBRID_CB_BIT); |
| 669 | } |
670 | 670 | |
671 | | if (BIT(opcode , 4)) { |
672 | | // Withdraw |
673 | | if (BIT(opcode , 11)) { |
674 | | // Byte |
675 | | UINT32 tmp_addr = (UINT32)(*ptr_reg); |
676 | | if (m_flags & b_mask) { |
677 | | tmp_addr |= 0x10000; |
678 | | } |
679 | | tmp = RM((UINT16)(tmp_addr >> 1)); |
680 | | if (BIT(tmp_addr , 0)) { |
681 | | tmp &= 0xff; |
682 | | } else { |
683 | | tmp >>= 8; |
684 | | } |
685 | | } else { |
686 | | // Word |
687 | | tmp = RM(*ptr_reg); |
688 | | } |
689 | | WM(reg_addr , tmp); |
| 671 | if (BIT(opcode , 4)) { |
| 672 | // Withdraw |
| 673 | if (BIT(opcode , 11)) { |
| 674 | // Byte |
| 675 | UINT32 tmp_addr = (UINT32)(*ptr_reg); |
| 676 | if (m_flags & b_mask) { |
| 677 | tmp_addr |= 0x10000; |
| 678 | } |
| 679 | tmp = RM((UINT16)(tmp_addr >> 1)); |
| 680 | if (BIT(tmp_addr , 0)) { |
| 681 | tmp &= 0xff; |
| 682 | } else { |
| 683 | tmp >>= 8; |
| 684 | } |
| 685 | } else { |
| 686 | // Word |
| 687 | tmp = RM(*ptr_reg); |
| 688 | } |
| 689 | WM(reg_addr , tmp); |
690 | 690 | |
691 | | if (BIT(opcode , 7)) { |
692 | | // Post-decrement |
693 | | if ((*ptr_reg)-- == 0) { |
694 | | m_flags ^= b_mask; |
695 | | } |
696 | | } else { |
697 | | // Post-increment |
698 | | if (++(*ptr_reg) == 0) { |
699 | | m_flags ^= b_mask; |
700 | | } |
701 | | } |
702 | | } else { |
703 | | // Place |
704 | | if (BIT(opcode , 7)) { |
705 | | // Pre-decrement |
706 | | if ((*ptr_reg)-- == 0) { |
707 | | m_flags ^= b_mask; |
708 | | } |
709 | | } else { |
710 | | // Pre-increment |
711 | | if (++(*ptr_reg) == 0) { |
712 | | m_flags ^= b_mask; |
713 | | } |
714 | | } |
715 | | tmp = RM(reg_addr); |
716 | | if (BIT(opcode , 11)) { |
717 | | // Byte |
718 | | UINT32 tmp_addr = (UINT32)(*ptr_reg); |
719 | | if (m_flags & b_mask) { |
720 | | tmp_addr |= 0x10000; |
721 | | } |
722 | | WMB(tmp_addr , (UINT8)tmp); |
723 | | } else { |
724 | | // Word |
725 | | WM(*ptr_reg , tmp); |
726 | | } |
727 | | } |
| 691 | if (BIT(opcode , 7)) { |
| 692 | // Post-decrement |
| 693 | if ((*ptr_reg)-- == 0) { |
| 694 | m_flags ^= b_mask; |
| 695 | } |
| 696 | } else { |
| 697 | // Post-increment |
| 698 | if (++(*ptr_reg) == 0) { |
| 699 | m_flags ^= b_mask; |
| 700 | } |
| 701 | } |
| 702 | } else { |
| 703 | // Place |
| 704 | if (BIT(opcode , 7)) { |
| 705 | // Pre-decrement |
| 706 | if ((*ptr_reg)-- == 0) { |
| 707 | m_flags ^= b_mask; |
| 708 | } |
| 709 | } else { |
| 710 | // Pre-increment |
| 711 | if (++(*ptr_reg) == 0) { |
| 712 | m_flags ^= b_mask; |
| 713 | } |
| 714 | } |
| 715 | tmp = RM(reg_addr); |
| 716 | if (BIT(opcode , 11)) { |
| 717 | // Byte |
| 718 | UINT32 tmp_addr = (UINT32)(*ptr_reg); |
| 719 | if (m_flags & b_mask) { |
| 720 | tmp_addr |= 0x10000; |
| 721 | } |
| 722 | WMB(tmp_addr , (UINT8)tmp); |
| 723 | } else { |
| 724 | // Word |
| 725 | WM(*ptr_reg , tmp); |
| 726 | } |
| 727 | } |
728 | 728 | } |
729 | 729 | |
730 | 730 | void hp_hybrid_cpu_device::check_for_interrupts(void) |
731 | 731 | { |
732 | | if (!BIT(m_flags , HPHYBRID_INTEN_BIT) || BIT(m_flags , HPHYBRID_IRH_SVC_BIT)) { |
733 | | return; |
734 | | } |
| 732 | if (!BIT(m_flags , HPHYBRID_INTEN_BIT) || BIT(m_flags , HPHYBRID_IRH_SVC_BIT)) { |
| 733 | return; |
| 734 | } |
735 | 735 | |
736 | | int irqline; |
| 736 | int irqline; |
737 | 737 | |
738 | | if (BIT(m_flags , HPHYBRID_IRH_BIT)) { |
739 | | // Service high-level interrupt |
740 | | BIT_SET(m_flags , HPHYBRID_IRH_SVC_BIT); |
741 | | irqline = HPHYBRID_IRH; |
742 | | } else if (BIT(m_flags , HPHYBRID_IRL_BIT) && !BIT(m_flags , HPHYBRID_IRL_SVC_BIT)) { |
743 | | // Service low-level interrupt |
744 | | BIT_SET(m_flags , HPHYBRID_IRL_SVC_BIT); |
745 | | irqline = HPHYBRID_IRL; |
746 | | } else { |
747 | | return; |
748 | | } |
| 738 | if (BIT(m_flags , HPHYBRID_IRH_BIT)) { |
| 739 | // Service high-level interrupt |
| 740 | BIT_SET(m_flags , HPHYBRID_IRH_SVC_BIT); |
| 741 | irqline = HPHYBRID_IRH; |
| 742 | } else if (BIT(m_flags , HPHYBRID_IRL_BIT) && !BIT(m_flags , HPHYBRID_IRL_SVC_BIT)) { |
| 743 | // Service low-level interrupt |
| 744 | BIT_SET(m_flags , HPHYBRID_IRL_SVC_BIT); |
| 745 | irqline = HPHYBRID_IRL; |
| 746 | } else { |
| 747 | return; |
| 748 | } |
749 | 749 | |
750 | | // Get interrupt vector in low byte |
751 | | UINT8 vector = (UINT8)standard_irq_callback(irqline); |
752 | | UINT8 new_PA; |
| 750 | // Get interrupt vector in low byte |
| 751 | UINT8 vector = (UINT8)standard_irq_callback(irqline); |
| 752 | UINT8 new_PA; |
753 | 753 | |
754 | | // Get highest numbered 1 |
755 | | // Don't know what happens if vector is 0, here we assume bit 7 = 1 |
756 | | if (vector == 0) { |
757 | | new_PA = 7; |
758 | | } else { |
759 | | for (new_PA = 7; new_PA && !BIT(vector , 7); new_PA--, vector <<= 1) { |
760 | | } |
761 | | } |
762 | | if (irqline == HPHYBRID_IRH) { |
763 | | BIT_SET(new_PA , 3); |
764 | | } |
| 754 | // Get highest numbered 1 |
| 755 | // Don't know what happens if vector is 0, here we assume bit 7 = 1 |
| 756 | if (vector == 0) { |
| 757 | new_PA = 7; |
| 758 | } else { |
| 759 | for (new_PA = 7; new_PA && !BIT(vector , 7); new_PA--, vector <<= 1) { |
| 760 | } |
| 761 | } |
| 762 | if (irqline == HPHYBRID_IRH) { |
| 763 | BIT_SET(new_PA , 3); |
| 764 | } |
765 | 765 | |
766 | | // Push PA stack |
767 | | memmove(&m_reg_PA[ 1 ] , &m_reg_PA[ 0 ] , HPHYBRID_INT_LVLS); |
| 766 | // Push PA stack |
| 767 | memmove(&m_reg_PA[ 1 ] , &m_reg_PA[ 0 ] , HPHYBRID_INT_LVLS); |
768 | 768 | |
769 | | CURRENT_PA = new_PA; |
| 769 | CURRENT_PA = new_PA; |
770 | 770 | |
771 | | // Is this correct? Patent @ pg 210 suggests that the whole interrupt recognition sequence |
772 | | // lasts for 32 cycles (6 are already accounted for in get_ea for one indirection) |
773 | | m_icount -= 26; |
| 771 | // Is this correct? Patent @ pg 210 suggests that the whole interrupt recognition sequence |
| 772 | // lasts for 32 cycles (6 are already accounted for in get_ea for one indirection) |
| 773 | m_icount -= 26; |
774 | 774 | |
775 | | // Do a double-indirect JSM IV,I instruction |
776 | | WM(++m_reg_R , m_reg_P); |
777 | | m_reg_P = RM(get_ea(0xc008)); |
778 | | m_reg_I = RM(m_reg_P); |
| 775 | // Do a double-indirect JSM IV,I instruction |
| 776 | WM(++m_reg_R , m_reg_P); |
| 777 | m_reg_P = RM(get_ea(0xc008)); |
| 778 | m_reg_I = RM(m_reg_P); |
779 | 779 | } |
780 | 780 | |
781 | 781 | void hp_hybrid_cpu_device::handle_dma(void) |
782 | 782 | { |
783 | | // Patent hints at the fact that terminal count is detected by bit 15 of dmac being 1 after decrementing |
784 | | bool tc = BIT(--m_dmac , 15) != 0; |
785 | | UINT16 tmp; |
| 783 | // Patent hints at the fact that terminal count is detected by bit 15 of dmac being 1 after decrementing |
| 784 | bool tc = BIT(--m_dmac , 15) != 0; |
| 785 | UINT16 tmp; |
786 | 786 | |
787 | | if (BIT(m_flags , HPHYBRID_DMADIR_BIT)) { |
788 | | // "Outward" DMA: memory -> peripheral |
789 | | tmp = RM(m_dmama++); |
790 | | WIO(m_dmapa , tc ? 2 : 0 , tmp); |
791 | | m_icount -= 10; |
792 | | } else { |
793 | | // "Inward" DMA: peripheral -> memory |
794 | | tmp = RIO(m_dmapa , tc ? 2 : 0); |
795 | | WM(m_dmama++ , tmp); |
796 | | m_icount -= 9; |
797 | | } |
| 787 | if (BIT(m_flags , HPHYBRID_DMADIR_BIT)) { |
| 788 | // "Outward" DMA: memory -> peripheral |
| 789 | tmp = RM(m_dmama++); |
| 790 | WIO(m_dmapa , tc ? 2 : 0 , tmp); |
| 791 | m_icount -= 10; |
| 792 | } else { |
| 793 | // "Inward" DMA: peripheral -> memory |
| 794 | tmp = RIO(m_dmapa , tc ? 2 : 0); |
| 795 | WM(m_dmama++ , tmp); |
| 796 | m_icount -= 9; |
| 797 | } |
798 | 798 | |
799 | | // This is the one of the biggest question marks: is the DMA automatically disabled on TC? |
800 | | // Here we assume it is. After all it would make no difference because there is no way |
801 | | // to read the DMA enable flag back, so each time the DMA is needed it has to be enabled again. |
802 | | if (tc) { |
803 | | BIT_CLR(m_flags , HPHYBRID_DMAEN_BIT); |
804 | | } |
| 799 | // This is the one of the biggest question marks: is the DMA automatically disabled on TC? |
| 800 | // Here we assume it is. After all it would make no difference because there is no way |
| 801 | // to read the DMA enable flag back, so each time the DMA is needed it has to be enabled again. |
| 802 | if (tc) { |
| 803 | BIT_CLR(m_flags , HPHYBRID_DMAEN_BIT); |
| 804 | } |
805 | 805 | } |
806 | 806 | |
807 | 807 | UINT16 hp_hybrid_cpu_device::RM(UINT16 addr) |
808 | 808 | { |
809 | | UINT16 tmp; |
| 809 | UINT16 tmp; |
810 | 810 | |
811 | | if (addr <= HP_REG_LAST_ADDR) { |
812 | | // Memory mapped registers |
813 | | switch (addr) { |
814 | | case HP_REG_A_ADDR: |
815 | | return m_reg_A; |
| 811 | if (addr <= HP_REG_LAST_ADDR) { |
| 812 | // Memory mapped registers |
| 813 | switch (addr) { |
| 814 | case HP_REG_A_ADDR: |
| 815 | return m_reg_A; |
816 | 816 | |
817 | | case HP_REG_B_ADDR: |
818 | | return m_reg_B; |
| 817 | case HP_REG_B_ADDR: |
| 818 | return m_reg_B; |
819 | 819 | |
820 | | case HP_REG_P_ADDR: |
821 | | return m_reg_P; |
| 820 | case HP_REG_P_ADDR: |
| 821 | return m_reg_P; |
822 | 822 | |
823 | | case HP_REG_R_ADDR: |
824 | | return m_reg_R; |
| 823 | case HP_REG_R_ADDR: |
| 824 | return m_reg_R; |
825 | 825 | |
826 | | case HP_REG_R4_ADDR: |
827 | | case HP_REG_R5_ADDR: |
828 | | case HP_REG_R6_ADDR: |
829 | | case HP_REG_R7_ADDR: |
830 | | return RIO(CURRENT_PA , addr - HP_REG_R4_ADDR); |
| 826 | case HP_REG_R4_ADDR: |
| 827 | case HP_REG_R5_ADDR: |
| 828 | case HP_REG_R6_ADDR: |
| 829 | case HP_REG_R7_ADDR: |
| 830 | return RIO(CURRENT_PA , addr - HP_REG_R4_ADDR); |
831 | 831 | |
832 | | case HP_REG_IV_ADDR: |
833 | | // Correct? |
834 | | if (!BIT(m_flags , HPHYBRID_IRH_SVC_BIT) && !BIT(m_flags , HPHYBRID_IRL_SVC_BIT)) { |
835 | | return m_reg_IV; |
836 | | } else { |
837 | | return m_reg_IV | CURRENT_PA; |
838 | | } |
| 832 | case HP_REG_IV_ADDR: |
| 833 | // Correct? |
| 834 | if (!BIT(m_flags , HPHYBRID_IRH_SVC_BIT) && !BIT(m_flags , HPHYBRID_IRL_SVC_BIT)) { |
| 835 | return m_reg_IV; |
| 836 | } else { |
| 837 | return m_reg_IV | CURRENT_PA; |
| 838 | } |
839 | 839 | |
840 | | case HP_REG_PA_ADDR: |
841 | | return CURRENT_PA; |
| 840 | case HP_REG_PA_ADDR: |
| 841 | return CURRENT_PA; |
842 | 842 | |
843 | | case HP_REG_DMAPA_ADDR: |
844 | | tmp = m_dmapa & HP_REG_PA_MASK; |
845 | | if (BIT(m_flags , HPHYBRID_CB_BIT)) { |
846 | | BIT_SET(tmp , 15); |
847 | | } |
848 | | if (BIT(m_flags , HPHYBRID_DB_BIT)) { |
849 | | BIT_SET(tmp , 14); |
850 | | } |
851 | | return tmp; |
| 843 | case HP_REG_DMAPA_ADDR: |
| 844 | tmp = m_dmapa & HP_REG_PA_MASK; |
| 845 | if (BIT(m_flags , HPHYBRID_CB_BIT)) { |
| 846 | BIT_SET(tmp , 15); |
| 847 | } |
| 848 | if (BIT(m_flags , HPHYBRID_DB_BIT)) { |
| 849 | BIT_SET(tmp , 14); |
| 850 | } |
| 851 | return tmp; |
852 | 852 | |
853 | | case HP_REG_DMAMA_ADDR: |
854 | | return m_dmama; |
| 853 | case HP_REG_DMAMA_ADDR: |
| 854 | return m_dmama; |
855 | 855 | |
856 | | case HP_REG_DMAC_ADDR: |
857 | | return m_dmac; |
| 856 | case HP_REG_DMAC_ADDR: |
| 857 | return m_dmac; |
858 | 858 | |
859 | | case HP_REG_C_ADDR: |
860 | | return m_reg_C; |
| 859 | case HP_REG_C_ADDR: |
| 860 | return m_reg_C; |
861 | 861 | |
862 | | case HP_REG_D_ADDR: |
863 | | return m_reg_D; |
| 862 | case HP_REG_D_ADDR: |
| 863 | return m_reg_D; |
864 | 864 | |
865 | | default: |
866 | | // Unknown registers are returned as 0 |
867 | | return 0; |
868 | | } |
869 | | } else { |
870 | | return m_direct->read_word((offs_t)addr << 1); |
871 | | } |
| 865 | default: |
| 866 | // Unknown registers are returned as 0 |
| 867 | return 0; |
| 868 | } |
| 869 | } else { |
| 870 | return m_direct->read_word((offs_t)addr << 1); |
| 871 | } |
872 | 872 | } |
873 | 873 | |
874 | 874 | void hp_hybrid_cpu_device::WM(UINT16 addr , UINT16 v) |
875 | 875 | { |
876 | | if (addr <= HP_REG_LAST_ADDR) { |
877 | | // Memory mapped registers |
878 | | switch (addr) { |
879 | | case HP_REG_A_ADDR: |
880 | | m_reg_A = v; |
881 | | break; |
| 876 | if (addr <= HP_REG_LAST_ADDR) { |
| 877 | // Memory mapped registers |
| 878 | switch (addr) { |
| 879 | case HP_REG_A_ADDR: |
| 880 | m_reg_A = v; |
| 881 | break; |
882 | 882 | |
883 | | case HP_REG_B_ADDR: |
884 | | m_reg_B = v; |
885 | | break; |
| 883 | case HP_REG_B_ADDR: |
| 884 | m_reg_B = v; |
| 885 | break; |
886 | 886 | |
887 | | case HP_REG_P_ADDR: |
888 | | m_reg_P = v; |
889 | | break; |
| 887 | case HP_REG_P_ADDR: |
| 888 | m_reg_P = v; |
| 889 | break; |
890 | 890 | |
891 | | case HP_REG_R_ADDR: |
892 | | m_reg_R = v; |
893 | | break; |
| 891 | case HP_REG_R_ADDR: |
| 892 | m_reg_R = v; |
| 893 | break; |
894 | 894 | |
895 | | case HP_REG_R4_ADDR: |
896 | | case HP_REG_R5_ADDR: |
897 | | case HP_REG_R6_ADDR: |
898 | | case HP_REG_R7_ADDR: |
899 | | WIO(CURRENT_PA , addr - HP_REG_R4_ADDR , v); |
900 | | break; |
| 895 | case HP_REG_R4_ADDR: |
| 896 | case HP_REG_R5_ADDR: |
| 897 | case HP_REG_R6_ADDR: |
| 898 | case HP_REG_R7_ADDR: |
| 899 | WIO(CURRENT_PA , addr - HP_REG_R4_ADDR , v); |
| 900 | break; |
901 | 901 | |
902 | | case HP_REG_IV_ADDR: |
903 | | m_reg_IV = v & HP_REG_IV_MASK; |
904 | | break; |
| 902 | case HP_REG_IV_ADDR: |
| 903 | m_reg_IV = v & HP_REG_IV_MASK; |
| 904 | break; |
905 | 905 | |
906 | | case HP_REG_PA_ADDR: |
907 | | CURRENT_PA = v & HP_REG_PA_MASK; |
908 | | break; |
| 906 | case HP_REG_PA_ADDR: |
| 907 | CURRENT_PA = v & HP_REG_PA_MASK; |
| 908 | break; |
909 | 909 | |
910 | | case HP_REG_DMAPA_ADDR: |
911 | | m_dmapa = v & HP_REG_PA_MASK; |
912 | | break; |
| 910 | case HP_REG_DMAPA_ADDR: |
| 911 | m_dmapa = v & HP_REG_PA_MASK; |
| 912 | break; |
913 | 913 | |
914 | | case HP_REG_DMAMA_ADDR: |
915 | | m_dmama = v; |
916 | | break; |
| 914 | case HP_REG_DMAMA_ADDR: |
| 915 | m_dmama = v; |
| 916 | break; |
917 | 917 | |
918 | | case HP_REG_DMAC_ADDR: |
919 | | m_dmac = v; |
920 | | break; |
| 918 | case HP_REG_DMAC_ADDR: |
| 919 | m_dmac = v; |
| 920 | break; |
921 | 921 | |
922 | | case HP_REG_C_ADDR: |
923 | | m_reg_C = v; |
924 | | break; |
| 922 | case HP_REG_C_ADDR: |
| 923 | m_reg_C = v; |
| 924 | break; |
925 | 925 | |
926 | | case HP_REG_D_ADDR: |
927 | | m_reg_D = v; |
928 | | break; |
| 926 | case HP_REG_D_ADDR: |
| 927 | m_reg_D = v; |
| 928 | break; |
929 | 929 | |
930 | | default: |
931 | | // Unknown registers are silently discarded |
932 | | break; |
933 | | } |
934 | | } else { |
935 | | m_program->write_word((offs_t)addr << 1 , v); |
936 | | } |
| 930 | default: |
| 931 | // Unknown registers are silently discarded |
| 932 | break; |
| 933 | } |
| 934 | } else { |
| 935 | m_program->write_word((offs_t)addr << 1 , v); |
| 936 | } |
937 | 937 | } |
938 | 938 | |
939 | 939 | void hp_hybrid_cpu_device::WMB(UINT32 addr , UINT8 v) |
940 | 940 | { |
941 | | if (addr <= (HP_REG_LAST_ADDR * 2 + 1)) { |
942 | | // Cannot write bytes to registers |
943 | | } else { |
944 | | m_program->write_byte(addr , v); |
945 | | } |
| 941 | if (addr <= (HP_REG_LAST_ADDR * 2 + 1)) { |
| 942 | // Cannot write bytes to registers |
| 943 | } else { |
| 944 | m_program->write_byte(addr , v); |
| 945 | } |
946 | 946 | } |
947 | 947 | |
948 | 948 | UINT16 hp_hybrid_cpu_device::RIO(UINT8 pa , UINT8 ic) |
949 | 949 | { |
950 | | return m_io->read_word(HP_MAKE_IOADDR(pa, ic) << 1); |
| 950 | return m_io->read_word(HP_MAKE_IOADDR(pa, ic) << 1); |
951 | 951 | } |
952 | 952 | |
953 | 953 | void hp_hybrid_cpu_device::WIO(UINT8 pa , UINT8 ic , UINT16 v) |
954 | 954 | { |
955 | | m_io->write_word(HP_MAKE_IOADDR(pa, ic) << 1 , v); |
| 955 | m_io->write_word(HP_MAKE_IOADDR(pa, ic) << 1 , v); |
956 | 956 | } |
957 | 957 | |
958 | 958 | hp_5061_3011_cpu_device::hp_5061_3011_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
trunk/src/emu/cpu/rsp/rspcp2.c
r248551 | r248552 | |
206 | 206 | { 0xffff, 0xffff, 0x0000, 0x0000 }, // L |
207 | 207 | { 0xffff, 0xffff, 0xffff, 0xffff } // D |
208 | 208 | }, |
209 | | { // word_reverse |
210 | | 0x0203, 0x0001, 0x0607, 0x0405, 0x0a0b, 0x0809, 0x0e0f, 0x0c0d |
211 | | } |
| 209 | { // word_reverse |
| 210 | 0x0203, 0x0001, 0x0607, 0x0405, 0x0a0b, 0x0809, 0x0e0f, 0x0c0d |
| 211 | } |
212 | 212 | }; |
213 | 213 | |
214 | 214 | #if !(defined(__SSSE3__) || defined(_MSC_VER)) |
r248551 | r248552 | |
322 | 322 | dqm = _mm_shuffle_epi8(dqm, ekey); |
323 | 323 | #endif |
324 | 324 | |
325 | | // Align the data to the DQM so we can mask it in. |
| 325 | // Align the data to the DQM so we can mask it in. |
326 | 326 | #if !(defined(__SSSE3__) || defined(_MSC_VER)) |
327 | 327 | data = sse2_pshufb(data, m_vec_helpers.ror_b2l_keys[ror & 0xF]); |
328 | 328 | #else |
r248551 | r248552 | |
330 | 330 | data = _mm_shuffle_epi8(data, ekey); |
331 | 331 | #endif |
332 | 332 | |
333 | | // Mask and mux in the data. |
| 333 | // Mask and mux in the data. |
334 | 334 | #if (defined(__SSE4_1__) || defined(_MSC_VER)) |
335 | 335 | reg = _mm_blendv_epi8(reg, data, dqm); |
336 | 336 | #else |
r248551 | r248552 | |
377 | 377 | } |
378 | 378 | |
379 | 379 | // "Unpack" the data. |
380 | | rsp_vec_t zero = _mm_setzero_si128(); |
| 380 | rsp_vec_t zero = _mm_setzero_si128(); |
381 | 381 | data = _mm_unpacklo_epi8(zero, data); |
382 | 382 | |
383 | 383 | if (request_type != RSP_MEM_REQUEST_PACK) |
r248551 | r248552 | |
385 | 385 | data = _mm_srli_epi16(data, 1); |
386 | 386 | } |
387 | 387 | |
388 | | data = _mm_shufflehi_epi16(data, _MM_SHUFFLE(0, 1, 2, 3)); |
389 | | data = _mm_shufflelo_epi16(data, _MM_SHUFFLE(0, 1, 2, 3)); |
| 388 | data = _mm_shufflehi_epi16(data, _MM_SHUFFLE(0, 1, 2, 3)); |
| 389 | data = _mm_shufflelo_epi16(data, _MM_SHUFFLE(0, 1, 2, 3)); |
390 | 390 | |
391 | | _mm_store_si128((rsp_vec_t *) regp, data); |
| 391 | _mm_store_si128((rsp_vec_t *) regp, data); |
392 | 392 | } |
393 | 393 | |
394 | 394 | // |
r248551 | r248552 | |
403 | 403 | { |
404 | 404 | UINT32 aligned_addr = addr & 0xFF0; |
405 | 405 | UINT32 offset = addr & 0xF; |
406 | | static UINT32 call_count = 0; |
| 406 | static UINT32 call_count = 0; |
407 | 407 | |
408 | 408 | rsp_vec_t data = _mm_load_si128((rsp_vec_t *) (m_rsp.get_dmem() + aligned_addr)); |
409 | 409 | |
r248551 | r248552 | |
439 | 439 | |
440 | 440 | _mm_store_si128((rsp_vec_t *) regp, data); |
441 | 441 | |
442 | | call_count++; |
| 442 | call_count++; |
443 | 443 | } |
444 | 444 | |
445 | 445 | // |
r248551 | r248552 | |
542 | 542 | reg = _mm_shuffle_epi8(reg, dkey); |
543 | 543 | #endif |
544 | 544 | |
545 | | // TODO: Always store in 8-byte chunks to emulate wraparound. |
| 545 | // TODO: Always store in 8-byte chunks to emulate wraparound. |
546 | 546 | _mm_storel_epi64((rsp_vec_t *) (m_rsp.get_dmem() + addr), reg); |
547 | 547 | } |
548 | 548 | |
r248551 | r248552 | |
574 | 574 | reg = _mm_shuffle_epi8(reg, ekey); |
575 | 575 | #endif |
576 | 576 | |
577 | | // Mask and mux out the data, write. |
| 577 | // Mask and mux out the data, write. |
578 | 578 | #if (defined(__SSE4_1__) || defined(_MSC_VER)) |
579 | 579 | data = _mm_blendv_epi8(data, reg, dqm); |
580 | 580 | #else |
r248551 | r248552 | |
702 | 702 | memset(m_vflag, 0, sizeof(m_vflag)); |
703 | 703 | memset(m_accum, 0, sizeof(m_accum)); |
704 | 704 | #if USE_SIMD |
705 | | memset(&m_acc, 0, sizeof(m_acc)); |
706 | | memset(&m_flags, 0, sizeof(aligned_rsp_2vect_t) * 3); |
707 | | m_div_out = 0; |
708 | | m_div_in = 0; |
| 705 | memset(&m_acc, 0, sizeof(m_acc)); |
| 706 | memset(&m_flags, 0, sizeof(aligned_rsp_2vect_t) * 3); |
| 707 | m_div_out = 0; |
| 708 | m_div_in = 0; |
709 | 709 | #endif |
710 | 710 | m_rspcop2_state = (internal_rspcop2_state *)rsp.m_cache.alloc_near(sizeof(internal_rspcop2_state)); |
711 | 711 | } |
r248551 | r248552 | |
877 | 877 | // |
878 | 878 | // Load 1 byte to vector byte index |
879 | 879 | |
880 | | //printf("LBV "); |
| 880 | //printf("LBV "); |
881 | 881 | #if USE_SIMD |
882 | 882 | vec_lbdlsv_sbdlsv(op, m_rsp.m_rsp_state->r[base]); |
883 | 883 | #else |
r248551 | r248552 | |
896 | 896 | // |
897 | 897 | // Loads 2 bytes starting from vector byte index |
898 | 898 | |
899 | | //printf("LSV "); |
| 899 | //printf("LSV "); |
900 | 900 | #if USE_SIMD |
901 | 901 | vec_lbdlsv_sbdlsv(op, m_rsp.m_rsp_state->r[base]); |
902 | 902 | #else |
r248551 | r248552 | |
922 | 922 | // |
923 | 923 | // Loads 4 bytes starting from vector byte index |
924 | 924 | |
925 | | //printf("LLV "); |
| 925 | //printf("LLV "); |
926 | 926 | #if USE_SIMD |
927 | 927 | vec_lbdlsv_sbdlsv(op, m_rsp.m_rsp_state->r[base]); |
928 | 928 | #else |
r248551 | r248552 | |
948 | 948 | // |
949 | 949 | // Loads 8 bytes starting from vector byte index |
950 | 950 | |
951 | | //printf("LDV "); |
| 951 | //printf("LDV "); |
952 | 952 | #if USE_SIMD |
953 | 953 | vec_lbdlsv_sbdlsv(op, m_rsp.m_rsp_state->r[base]); |
954 | 954 | #else |
r248551 | r248552 | |
974 | 974 | // |
975 | 975 | // Loads up to 16 bytes starting from vector byte index |
976 | 976 | |
977 | | //printf("LQV "); |
| 977 | //printf("LQV "); |
978 | 978 | #if USE_SIMD |
979 | 979 | vec_lqrv_sqrv(op, m_rsp.m_rsp_state->r[base]); |
980 | 980 | #else |
r248551 | r248552 | |
1001 | 1001 | // |
1002 | 1002 | // Stores up to 16 bytes starting from right side until 16-byte boundary |
1003 | 1003 | |
1004 | | //printf("LRV "); |
| 1004 | //printf("LRV "); |
1005 | 1005 | #if USE_SIMD |
1006 | 1006 | vec_lqrv_sqrv(op, m_rsp.m_rsp_state->r[base]); |
1007 | 1007 | #else |
r248551 | r248552 | |
1029 | 1029 | // |
1030 | 1030 | // Loads a byte as the upper 8 bits of each element |
1031 | 1031 | |
1032 | | //printf("LPV "); |
| 1032 | //printf("LPV "); |
1033 | 1033 | #if USE_SIMD |
1034 | 1034 | vec_lfhpuv_sfhpuv(op, m_rsp.m_rsp_state->r[base]); |
1035 | 1035 | #else |
r248551 | r248552 | |
1052 | 1052 | // |
1053 | 1053 | // Loads a byte as the bits 14-7 of each element |
1054 | 1054 | |
1055 | | //printf("LUV "); |
| 1055 | //printf("LUV "); |
1056 | 1056 | #if USE_SIMD |
1057 | 1057 | vec_lfhpuv_sfhpuv(op, m_rsp.m_rsp_state->r[base]); |
1058 | 1058 | #else |
r248551 | r248552 | |
1075 | 1075 | // |
1076 | 1076 | // Loads a byte as the bits 14-7 of each element, with 2-byte stride |
1077 | 1077 | |
1078 | | //printf("LHV "); |
| 1078 | //printf("LHV "); |
1079 | 1079 | #if USE_SIMD |
1080 | 1080 | vec_lfhpuv_sfhpuv(op, m_rsp.m_rsp_state->r[base]); |
1081 | 1081 | #else |
r248551 | r248552 | |
1098 | 1098 | // |
1099 | 1099 | // Loads a byte as the bits 14-7 of upper or lower quad, with 4-byte stride |
1100 | 1100 | |
1101 | | //printf("LFV "); |
| 1101 | //printf("LFV "); |
1102 | 1102 | #if USE_SIMD |
1103 | 1103 | vec_lfhpuv_sfhpuv(op, m_rsp.m_rsp_state->r[base]); |
1104 | 1104 | #else |
r248551 | r248552 | |
1127 | 1127 | // Loads the full 128-bit vector starting from vector byte index and wrapping to index 0 |
1128 | 1128 | // after byte index 15 |
1129 | 1129 | |
1130 | | //printf("LWV "); |
| 1130 | //printf("LWV "); |
1131 | 1131 | #if USE_SIMD |
1132 | 1132 | #else |
1133 | 1133 | ea = (base) ? m_rsp.m_rsp_state->r[base] + (offset * 16) : (offset * 16); |
r248551 | r248552 | |
1154 | 1154 | |
1155 | 1155 | // FIXME: has a small problem with odd indices |
1156 | 1156 | |
1157 | | //printf("LTV "); |
| 1157 | //printf("LTV "); |
1158 | 1158 | #if 0 |
1159 | 1159 | #else |
1160 | | INT32 index = (op >> 7) & 0xf; |
1161 | | INT32 offset = (op & 0x7f); |
1162 | | if (offset & 0x40) |
1163 | | offset |= 0xffffffc0; |
| 1160 | INT32 index = (op >> 7) & 0xf; |
| 1161 | INT32 offset = (op & 0x7f); |
| 1162 | if (offset & 0x40) |
| 1163 | offset |= 0xffffffc0; |
1164 | 1164 | |
1165 | | INT32 vs = (op >> 16) & 0x1f; |
| 1165 | INT32 vs = (op >> 16) & 0x1f; |
1166 | 1166 | INT32 ve = vs + 8; |
1167 | 1167 | if (ve > 32) |
1168 | 1168 | ve = 32; |
r248551 | r248552 | |
1225 | 1225 | // |
1226 | 1226 | // Stores 1 byte from vector byte index |
1227 | 1227 | |
1228 | | //printf("SBV "); |
| 1228 | //printf("SBV "); |
1229 | 1229 | #if USE_SIMD |
1230 | 1230 | vec_lbdlsv_sbdlsv(op, m_rsp.m_rsp_state->r[base]); |
1231 | 1231 | #else |
r248551 | r248552 | |
1244 | 1244 | // |
1245 | 1245 | // Stores 2 bytes starting from vector byte index |
1246 | 1246 | |
1247 | | //printf("SSV "); |
| 1247 | //printf("SSV "); |
1248 | 1248 | #if USE_SIMD |
1249 | 1249 | vec_lbdlsv_sbdlsv(op, m_rsp.m_rsp_state->r[base]); |
1250 | 1250 | #else |
r248551 | r248552 | |
1270 | 1270 | // |
1271 | 1271 | // Stores 4 bytes starting from vector byte index |
1272 | 1272 | |
1273 | | //printf("SLV "); |
| 1273 | //printf("SLV "); |
1274 | 1274 | #if USE_SIMD |
1275 | 1275 | vec_lbdlsv_sbdlsv(op, m_rsp.m_rsp_state->r[base]); |
1276 | 1276 | #else |
r248551 | r248552 | |
1296 | 1296 | // |
1297 | 1297 | // Stores 8 bytes starting from vector byte index |
1298 | 1298 | |
1299 | | //printf("SDV "); |
| 1299 | //printf("SDV "); |
1300 | 1300 | #if USE_SIMD |
1301 | 1301 | vec_lbdlsv_sbdlsv(op, m_rsp.m_rsp_state->r[base]); |
1302 | 1302 | #else |
r248551 | r248552 | |
1322 | 1322 | // |
1323 | 1323 | // Stores up to 16 bytes starting from vector byte index until 16-byte boundary |
1324 | 1324 | |
1325 | | //printf("SQV "); |
| 1325 | //printf("SQV "); |
1326 | 1326 | #if USE_SIMD |
1327 | 1327 | vec_lqrv_sqrv(op, m_rsp.m_rsp_state->r[base]); |
1328 | 1328 | #else |
r248551 | r248552 | |
1348 | 1348 | // |
1349 | 1349 | // Stores up to 16 bytes starting from right side until 16-byte boundary |
1350 | 1350 | |
1351 | | //printf("SRV "); |
| 1351 | //printf("SRV "); |
1352 | 1352 | #if USE_SIMD |
1353 | 1353 | vec_lqrv_sqrv(op, m_rsp.m_rsp_state->r[base]); |
1354 | 1354 | #else |
r248551 | r248552 | |
1377 | 1377 | // |
1378 | 1378 | // Stores upper 8 bits of each element |
1379 | 1379 | |
1380 | | //printf("SPV "); |
| 1380 | //printf("SPV "); |
1381 | 1381 | #if USE_SIMD |
1382 | 1382 | vec_lfhpuv_sfhpuv(op, m_rsp.m_rsp_state->r[base]); |
1383 | 1383 | #else |
r248551 | r248552 | |
1409 | 1409 | // |
1410 | 1410 | // Stores bits 14-7 of each element |
1411 | 1411 | |
1412 | | //printf("SUV "); |
| 1412 | //printf("SUV "); |
1413 | 1413 | #if USE_SIMD |
1414 | 1414 | vec_lfhpuv_sfhpuv(op, m_rsp.m_rsp_state->r[base]); |
1415 | 1415 | #else |
r248551 | r248552 | |
1441 | 1441 | // |
1442 | 1442 | // Stores bits 14-7 of each element, with 2-byte stride |
1443 | 1443 | |
1444 | | //printf("SHV "); |
| 1444 | //printf("SHV "); |
1445 | 1445 | #if USE_SIMD |
1446 | 1446 | vec_lfhpuv_sfhpuv(op, m_rsp.m_rsp_state->r[base]); |
1447 | 1447 | #else |
r248551 | r248552 | |
1470 | 1470 | |
1471 | 1471 | // FIXME: only works for index 0 and index 8 |
1472 | 1472 | |
1473 | | //printf("SFV "); |
| 1473 | //printf("SFV "); |
1474 | 1474 | #if USE_SIMD |
1475 | 1475 | vec_lfhpuv_sfhpuv(op, m_rsp.m_rsp_state->r[base]); |
1476 | 1476 | #else |
r248551 | r248552 | |
1500 | 1500 | // Stores the full 128-bit vector starting from vector byte index and wrapping to index 0 |
1501 | 1501 | // after byte index 15 |
1502 | 1502 | |
1503 | | //printf("SWV "); |
| 1503 | //printf("SWV "); |
1504 | 1504 | #if USE_SIMD |
1505 | 1505 | #else |
1506 | 1506 | ea = (base) ? m_rsp.m_rsp_state->r[base] + (offset * 16) : (offset * 16); |
r248551 | r248552 | |
1528 | 1528 | // |
1529 | 1529 | // Stores one element from maximum of 8 vectors, while incrementing element index |
1530 | 1530 | |
1531 | | //printf("STV "); |
| 1531 | //printf("STV "); |
1532 | 1532 | #if 0 |
1533 | 1533 | #else |
1534 | | INT32 index = (op >> 7) & 0xf; |
1535 | | INT32 offset = (op & 0x7f); |
1536 | | if (offset & 0x40) |
1537 | | offset |= 0xffffffc0; |
| 1534 | INT32 index = (op >> 7) & 0xf; |
| 1535 | INT32 offset = (op & 0x7f); |
| 1536 | if (offset & 0x40) |
| 1537 | offset |= 0xffffffc0; |
1538 | 1538 | |
1539 | 1539 | INT32 vs = (op >> 16) & 0x1f; |
1540 | 1540 | INT32 ve = vs + 8; |
r248551 | r248552 | |
1548 | 1548 | INT32 eaoffset = (ea & 0xf) + (element * 2); |
1549 | 1549 | ea &= ~0xf; |
1550 | 1550 | |
1551 | | for (INT32 i = vs; i < ve; i++) |
| 1551 | for (INT32 i = vs; i < ve; i++) |
1552 | 1552 | { |
1553 | 1553 | m_rsp.WRITE16(ea + (eaoffset & 0xf), VREG_S(i, element & 0x7)); |
1554 | 1554 | eaoffset += 2; |
r248551 | r248552 | |
1654 | 1654 | // |
1655 | 1655 | // Multiplies signed integer by signed integer * 2 |
1656 | 1656 | |
1657 | | //printf("MULF "); |
| 1657 | //printf("MULF "); |
1658 | 1658 | #if USE_SIMD |
1659 | 1659 | UINT16 *acc = m_acc.s; |
1660 | 1660 | rsp_vec_t acc_lo, acc_mid, acc_hi; |
r248551 | r248552 | |
1706 | 1706 | // ------------------------------------------------------ |
1707 | 1707 | // |
1708 | 1708 | |
1709 | | //printf("MULU "); |
| 1709 | //printf("MULU "); |
1710 | 1710 | #if USE_SIMD |
1711 | 1711 | UINT16 *acc = m_acc.s; |
1712 | 1712 | rsp_vec_t acc_lo, acc_mid, acc_hi; |
r248551 | r248552 | |
1762 | 1762 | // Stores the higher 16 bits of the 32-bit result to accumulator |
1763 | 1763 | // The low slice of accumulator is stored into destination element |
1764 | 1764 | |
1765 | | //printf("MUDL "); |
| 1765 | //printf("MUDL "); |
1766 | 1766 | #if USE_SIMD |
1767 | 1767 | UINT16 *acc = m_acc.s; |
1768 | 1768 | rsp_vec_t acc_lo, acc_mid, acc_hi; |
r248551 | r248552 | |
1809 | 1809 | // The result is stored into accumulator |
1810 | 1810 | // The middle slice of accumulator is stored into destination element |
1811 | 1811 | |
1812 | | //printf("MUDM "); |
| 1812 | //printf("MUDM "); |
1813 | 1813 | #if USE_SIMD |
1814 | 1814 | UINT16 *acc = m_acc.s; |
1815 | 1815 | rsp_vec_t acc_lo, acc_mid, acc_hi; |
r248551 | r248552 | |
1857 | 1857 | // The result is stored into accumulator |
1858 | 1858 | // The low slice of accumulator is stored into destination element |
1859 | 1859 | |
1860 | | //printf("MUDN "); |
| 1860 | //printf("MUDN "); |
1861 | 1861 | #if USE_SIMD |
1862 | 1862 | UINT16 *acc = m_acc.s; |
1863 | 1863 | rsp_vec_t acc_lo = read_acc_lo(acc); |
r248551 | r248552 | |
1902 | 1902 | // The result is stored into highest 32 bits of accumulator, the low slice is zero |
1903 | 1903 | // The highest 32 bits of accumulator is saturated into destination element |
1904 | 1904 | |
1905 | | //printf("MUDH "); |
| 1905 | //printf("MUDH "); |
1906 | 1906 | #if USE_SIMD |
1907 | 1907 | UINT16 *acc = m_acc.s; |
1908 | 1908 | rsp_vec_t acc_lo, acc_mid, acc_hi; |
r248551 | r248552 | |
1950 | 1950 | // Multiplies signed integer by signed integer * 2 |
1951 | 1951 | // The result is added to accumulator |
1952 | 1952 | |
1953 | | //printf("MACF "); |
| 1953 | //printf("MACF "); |
1954 | 1954 | #if USE_SIMD |
1955 | 1955 | UINT16 *acc = m_acc.s; |
1956 | 1956 | rsp_vec_t acc_lo, acc_mid, acc_hi; |
r248551 | r248552 | |
2001 | 2001 | // ------------------------------------------------------ |
2002 | 2002 | // |
2003 | 2003 | |
2004 | | //printf("MACU "); |
| 2004 | //printf("MACU "); |
2005 | 2005 | #if USE_SIMD |
2006 | 2006 | UINT16 *acc = m_acc.s; |
2007 | 2007 | rsp_vec_t acc_lo, acc_mid, acc_hi; |
r248551 | r248552 | |
2071 | 2071 | // Adds the higher 16 bits of the 32-bit result to accumulator |
2072 | 2072 | // The low slice of accumulator is stored into destination element |
2073 | 2073 | |
2074 | | //printf("MADL "); |
| 2074 | //printf("MADL "); |
2075 | 2075 | #if USE_SIMD |
2076 | 2076 | UINT16 *acc = m_acc.s; |
2077 | 2077 | rsp_vec_t acc_lo, acc_mid, acc_hi; |
r248551 | r248552 | |
2120 | 2120 | // The result is added into accumulator |
2121 | 2121 | // The middle slice of accumulator is stored into destination element |
2122 | 2122 | |
2123 | | //printf("MADM "); |
| 2123 | //printf("MADM "); |
2124 | 2124 | #if USE_SIMD |
2125 | 2125 | UINT16 *acc = m_acc.s; |
2126 | 2126 | rsp_vec_t acc_lo, acc_mid, acc_hi; |
r248551 | r248552 | |
2171 | 2171 | // The result is added into accumulator |
2172 | 2172 | // The low slice of accumulator is stored into destination element |
2173 | 2173 | |
2174 | | //printf("MADN "); |
| 2174 | //printf("MADN "); |
2175 | 2175 | #if USE_SIMD |
2176 | 2176 | UINT16 *acc = m_acc.s; |
2177 | 2177 | rsp_vec_t acc_lo, acc_mid, acc_hi; |
r248551 | r248552 | |
2225 | 2225 | // The result is added into highest 32 bits of accumulator, the low slice is zero |
2226 | 2226 | // The highest 32 bits of accumulator is saturated into destination element |
2227 | 2227 | |
2228 | | //printf("MADH "); |
| 2228 | //printf("MADH "); |
2229 | 2229 | #if USE_SIMD |
2230 | 2230 | UINT16 *acc = m_acc.s; |
2231 | 2231 | rsp_vec_t acc_lo, acc_mid, acc_hi; |
r248551 | r248552 | |
2275 | 2275 | |
2276 | 2276 | // TODO: check VS2REG == VDREG |
2277 | 2277 | |
2278 | | //printf("ADD "); |
| 2278 | //printf("ADD "); |
2279 | 2279 | #if USE_SIMD |
2280 | 2280 | rsp_vec_t acc_lo; |
2281 | 2281 | UINT16 *acc = m_acc.s; |
r248551 | r248552 | |
2321 | 2321 | |
2322 | 2322 | // TODO: check VS2REG == VDREG |
2323 | 2323 | |
2324 | | //printf("SUB "); |
| 2324 | //printf("SUB "); |
2325 | 2325 | #if USE_SIMD |
2326 | 2326 | rsp_vec_t acc_lo; |
2327 | 2327 | UINT16 *acc = m_acc.s; |
r248551 | r248552 | |
2367 | 2367 | // Changes the sign of source register 2 if source register 1 is negative and stores |
2368 | 2368 | // the result to destination register |
2369 | 2369 | |
2370 | | //printf("ABS "); |
| 2370 | //printf("ABS "); |
2371 | 2371 | #if USE_SIMD |
2372 | 2372 | rsp_vec_t acc_lo; |
2373 | 2373 | UINT16 *acc = m_acc.s; |
r248551 | r248552 | |
2423 | 2423 | |
2424 | 2424 | // TODO: check VS2REG = VDREG |
2425 | 2425 | |
2426 | | //printf("ADDC "); |
| 2426 | //printf("ADDC "); |
2427 | 2427 | #if USE_SIMD |
2428 | 2428 | UINT16 *acc = m_acc.s; |
2429 | 2429 | rsp_vec_t sn; |
r248551 | r248552 | |
2471 | 2471 | |
2472 | 2472 | // TODO: check VS2REG = VDREG |
2473 | 2473 | |
2474 | | //printf("SUBC "); |
| 2474 | //printf("SUBC "); |
2475 | 2475 | #if USE_SIMD |
2476 | 2476 | UINT16 *acc = m_acc.s; |
2477 | 2477 | rsp_vec_t eq, sn; |
r248551 | r248552 | |
2521 | 2521 | // |
2522 | 2522 | // Stores high, middle or low slice of accumulator to destination vector |
2523 | 2523 | |
2524 | | //printf("SAW "); |
| 2524 | //printf("SAW "); |
2525 | 2525 | #if USE_SIMD |
2526 | 2526 | UINT16 *acc = m_acc.s; |
2527 | 2527 | switch (EL) |
r248551 | r248552 | |
2586 | 2586 | // Sets compare flags if elements in VS1 are less than VS2 |
2587 | 2587 | // Moves the element in VS2 to destination vector |
2588 | 2588 | |
2589 | | //printf("LT "); |
| 2589 | //printf("LT "); |
2590 | 2590 | #if USE_SIMD |
2591 | 2591 | UINT16 *acc = m_acc.s; |
2592 | 2592 | rsp_vec_t le; |
r248551 | r248552 | |
2655 | 2655 | // Sets compare flags if elements in VS1 are equal with VS2 |
2656 | 2656 | // Moves the element in VS2 to destination vector |
2657 | 2657 | |
2658 | | //printf("EQ "); |
| 2658 | //printf("EQ "); |
2659 | 2659 | #if USE_SIMD |
2660 | 2660 | UINT16 *acc = m_acc.s; |
2661 | 2661 | rsp_vec_t le; |
r248551 | r248552 | |
2712 | 2712 | // Sets compare flags if elements in VS1 are not equal with VS2 |
2713 | 2713 | // Moves the element in VS2 to destination vector |
2714 | 2714 | |
2715 | | //printf("NE "); |
| 2715 | //printf("NE "); |
2716 | 2716 | #if USE_SIMD |
2717 | 2717 | UINT16 *acc = m_acc.s; |
2718 | 2718 | rsp_vec_t le; |
r248551 | r248552 | |
2770 | 2770 | // Sets compare flags if elements in VS1 are greater or equal with VS2 |
2771 | 2771 | // Moves the element in VS2 to destination vector |
2772 | 2772 | |
2773 | | //printf("GE "); |
| 2773 | //printf("GE "); |
2774 | 2774 | #if USE_SIMD |
2775 | 2775 | UINT16 *acc = m_acc.s; |
2776 | 2776 | rsp_vec_t le; |
r248551 | r248552 | |
2827 | 2827 | // |
2828 | 2828 | // Vector clip low |
2829 | 2829 | |
2830 | | //printf("CL "); |
| 2830 | //printf("CL "); |
2831 | 2831 | #if USE_SIMD |
2832 | 2832 | UINT16 *acc = m_acc.s; |
2833 | 2833 | |
r248551 | r248552 | |
2944 | 2944 | // |
2945 | 2945 | // Vector clip high |
2946 | 2946 | |
2947 | | //printf("CH "); |
| 2947 | //printf("CH "); |
2948 | 2948 | #if USE_SIMD |
2949 | 2949 | UINT16 *acc = m_acc.s; |
2950 | 2950 | rsp_vec_t ge, le, sign, eq, vce; |
r248551 | r248552 | |
3047 | 3047 | // |
3048 | 3048 | // Vector clip reverse |
3049 | 3049 | |
3050 | | //printf("CR "); |
| 3050 | //printf("CR "); |
3051 | 3051 | #if USE_SIMD |
3052 | 3052 | UINT16 *acc = m_acc.s; |
3053 | 3053 | rsp_vec_t ge, le; |
r248551 | r248552 | |
3125 | 3125 | // |
3126 | 3126 | // Merges two vectors according to compare flags |
3127 | 3127 | |
3128 | | //printf("MRG "); |
| 3128 | //printf("MRG "); |
3129 | 3129 | #if USE_SIMD |
3130 | 3130 | UINT16 *acc = m_acc.s; |
3131 | 3131 | rsp_vec_t le = read_vcc_lo(m_flags[RSP_VCC].s); |
r248551 | r248552 | |
3166 | 3166 | // |
3167 | 3167 | // Bitwise AND of two vector registers |
3168 | 3168 | |
3169 | | //printf("AND "); |
| 3169 | //printf("AND "); |
3170 | 3170 | #if USE_SIMD |
3171 | 3171 | UINT16 *acc = m_acc.s; |
3172 | 3172 | |
r248551 | r248552 | |
3196 | 3196 | // |
3197 | 3197 | // Bitwise NOT AND of two vector registers |
3198 | 3198 | |
3199 | | //printf("NAND "); |
| 3199 | //printf("NAND "); |
3200 | 3200 | #if USE_SIMD |
3201 | 3201 | UINT16 *acc = m_acc.s; |
3202 | 3202 | |
r248551 | r248552 | |
3226 | 3226 | // |
3227 | 3227 | // Bitwise OR of two vector registers |
3228 | 3228 | |
3229 | | //printf("OR "); |
| 3229 | //printf("OR "); |
3230 | 3230 | #if USE_SIMD |
3231 | 3231 | UINT16 *acc = m_acc.s; |
3232 | 3232 | |
r248551 | r248552 | |
3256 | 3256 | // |
3257 | 3257 | // Bitwise NOT OR of two vector registers |
3258 | 3258 | |
3259 | | //printf("NOR "); |
| 3259 | //printf("NOR "); |
3260 | 3260 | #if USE_SIMD |
3261 | 3261 | UINT16 *acc = m_acc.s; |
3262 | 3262 | |
r248551 | r248552 | |
3286 | 3286 | // |
3287 | 3287 | // Bitwise XOR of two vector registers |
3288 | 3288 | |
3289 | | //printf("XOR "); |
| 3289 | //printf("XOR "); |
3290 | 3290 | #if USE_SIMD |
3291 | 3291 | UINT16 *acc = m_acc.s; |
3292 | 3292 | |
r248551 | r248552 | |
3316 | 3316 | // |
3317 | 3317 | // Bitwise NOT XOR of two vector registers |
3318 | 3318 | |
3319 | | //printf("NXOR "); |
| 3319 | //printf("NXOR "); |
3320 | 3320 | #if USE_SIMD |
3321 | 3321 | UINT16 *acc = m_acc.s; |
3322 | 3322 | |
r248551 | r248552 | |
3347 | 3347 | // |
3348 | 3348 | // Calculates reciprocal |
3349 | 3349 | |
3350 | | //printf("RCP "); |
| 3350 | //printf("RCP "); |
3351 | 3351 | #if USE_SIMD |
3352 | 3352 | write_acc_lo(m_acc.s, vec_load_and_shuffle_operand(m_v[VS2REG].s, EL)); |
3353 | 3353 | |
r248551 | r248552 | |
3418 | 3418 | // |
3419 | 3419 | // Calculates reciprocal low part |
3420 | 3420 | |
3421 | | //printf("RCPL "); |
| 3421 | //printf("RCPL "); |
3422 | 3422 | #if USE_SIMD |
3423 | 3423 | write_acc_lo(m_acc.s, vec_load_and_shuffle_operand(m_v[VS2REG].s, EL)); |
3424 | 3424 | |
r248551 | r248552 | |
3505 | 3505 | // |
3506 | 3506 | // Calculates reciprocal high part |
3507 | 3507 | |
3508 | | //printf("RCPH "); |
| 3508 | //printf("RCPH "); |
3509 | 3509 | #if USE_SIMD |
3510 | 3510 | write_acc_lo(m_acc.s, vec_load_and_shuffle_operand(m_v[VS2REG].s, EL)); |
3511 | 3511 | |
r248551 | r248552 | |
3537 | 3537 | // |
3538 | 3538 | // Moves element from vector to destination vector |
3539 | 3539 | |
3540 | | //printf("MOV "); |
| 3540 | //printf("MOV "); |
3541 | 3541 | #if USE_SIMD |
3542 | 3542 | write_acc_lo(m_acc.s, vec_load_and_shuffle_operand(m_v[VS2REG].s, EL)); |
3543 | 3543 | m_v[VDREG].v = vec_vmov(VS2REG, EL, VDREG, VS1REG); |
r248551 | r248552 | |
3561 | 3561 | // |
3562 | 3562 | // Calculates reciprocal square-root |
3563 | 3563 | |
3564 | | //printf("RSQ "); |
| 3564 | //printf("RSQ "); |
3565 | 3565 | #if USE_SIMD |
3566 | 3566 | write_acc_lo(m_acc.s, vec_load_and_shuffle_operand(m_v[VS2REG].s, EL)); |
3567 | 3567 | |
r248551 | r248552 | |
3633 | 3633 | // |
3634 | 3634 | // Calculates reciprocal square-root low part |
3635 | 3635 | |
3636 | | //printf("RSQL "); |
| 3636 | //printf("RSQL "); |
3637 | 3637 | #if USE_SIMD |
3638 | 3638 | write_acc_lo(m_acc.s, vec_load_and_shuffle_operand(m_v[VS2REG].s, EL)); |
3639 | 3639 | |
r248551 | r248552 | |
3723 | 3723 | // |
3724 | 3724 | // Calculates reciprocal square-root high part |
3725 | 3725 | |
3726 | | //printf("RSQH "); |
| 3726 | //printf("RSQH "); |
3727 | 3727 | #if USE_SIMD |
3728 | 3728 | write_acc_lo(m_acc.s, vec_load_and_shuffle_operand(m_v[VS2REG].s, EL)); |
3729 | 3729 | |
r248551 | r248552 | |
3754 | 3754 | // |
3755 | 3755 | // Vector null instruction |
3756 | 3756 | |
3757 | | //printf("NOP "); |
| 3757 | //printf("NOP "); |
3758 | 3758 | break; |
3759 | 3759 | } |
3760 | 3760 | |
r248551 | r248552 | |
3777 | 3777 | // | 010010 | 00000 | TTTTT | DDDDD | IIII | 0000000 | |
3778 | 3778 | // --------------------------------------------------- |
3779 | 3779 | // |
3780 | | //printf("MFC2 "); |
| 3780 | //printf("MFC2 "); |
3781 | 3781 | int el = (op >> 7) & 0xf; |
3782 | 3782 | UINT16 b1 = VREG_B(RDREG, (el+0) & 0xf); |
3783 | 3783 | UINT16 b2 = VREG_B(RDREG, (el+1) & 0xf); |
r248551 | r248552 | |
3792 | 3792 | // | 010010 | 00010 | TTTTT | DDDDD | 00000000000 | |
3793 | 3793 | // ------------------------------------------------ |
3794 | 3794 | // |
3795 | | //printf("CFC2 "); |
| 3795 | //printf("CFC2 "); |
3796 | 3796 | if (RTREG) |
3797 | 3797 | { |
3798 | 3798 | #if USE_SIMD |
3799 | | INT32 src = RDREG & 3; |
3800 | | if (src == 3) { |
3801 | | src = 2; |
3802 | | } |
3803 | | RTVAL = get_flags(m_flags[src].s); |
| 3799 | INT32 src = RDREG & 3; |
| 3800 | if (src == 3) { |
| 3801 | src = 2; |
| 3802 | } |
| 3803 | RTVAL = get_flags(m_flags[src].s); |
3804 | 3804 | #else |
3805 | 3805 | switch(RDREG) |
3806 | 3806 | { |
r248551 | r248552 | |
3865 | 3865 | // | 010010 | 00100 | TTTTT | DDDDD | IIII | 0000000 | |
3866 | 3866 | // --------------------------------------------------- |
3867 | 3867 | // |
3868 | | //printf("MTC2 "); |
| 3868 | //printf("MTC2 "); |
3869 | 3869 | int el = (op >> 7) & 0xf; |
3870 | 3870 | W_VREG_B(RDREG, (el+0) & 0xf, (RTVAL >> 8) & 0xff); |
3871 | 3871 | W_VREG_B(RDREG, (el+1) & 0xf, (RTVAL >> 0) & 0xff); |
r248551 | r248552 | |
3966 | 3966 | case 0x10: case 0x11: case 0x12: case 0x13: case 0x14: case 0x15: case 0x16: case 0x17: |
3967 | 3967 | case 0x18: case 0x19: case 0x1a: case 0x1b: case 0x1c: case 0x1d: case 0x1e: case 0x1f: |
3968 | 3968 | { |
3969 | | //printf("V"); |
| 3969 | //printf("V"); |
3970 | 3970 | handle_vector_ops(op); |
3971 | 3971 | break; |
3972 | 3972 | } |
r248551 | r248552 | |
4185 | 4185 | } |
4186 | 4186 | |
4187 | 4187 | #if USE_SIMD |
4188 | | printf("acc_h: %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", m_acc.s[0], m_acc.s[1], m_acc.s[2], m_acc.s[3], m_acc.s[4], m_acc.s[5], m_acc.s[6], m_acc.s[7]); |
4189 | | printf("acc_m: %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", m_acc.s[8], m_acc.s[9], m_acc.s[10], m_acc.s[11], m_acc.s[12], m_acc.s[13], m_acc.s[14], m_acc.s[15]); |
4190 | | printf("acc_l: %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", m_acc.s[16], m_acc.s[17], m_acc.s[18], m_acc.s[19], m_acc.s[20], m_acc.s[21], m_acc.s[22], m_acc.s[23]); |
4191 | | printf("vcc_hi: %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", m_flags[RSP_VCC].s[0], m_flags[RSP_VCC].s[1], m_flags[RSP_VCC].s[2], m_flags[RSP_VCC].s[3], m_flags[RSP_VCC].s[4], m_flags[RSP_VCC].s[5], m_flags[RSP_VCC].s[6], m_flags[RSP_VCC].s[7]); |
4192 | | printf("vcc_lo: %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", m_flags[RSP_VCC].s[8], m_flags[RSP_VCC].s[9], m_flags[RSP_VCC].s[10], m_flags[RSP_VCC].s[11], m_flags[RSP_VCC].s[12], m_flags[RSP_VCC].s[13], m_flags[RSP_VCC].s[14], m_flags[RSP_VCC].s[15]); |
4193 | | printf("vco_hi: %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", m_flags[RSP_VCO].s[0], m_flags[RSP_VCO].s[1], m_flags[RSP_VCO].s[2], m_flags[RSP_VCO].s[3], m_flags[RSP_VCO].s[4], m_flags[RSP_VCO].s[5], m_flags[RSP_VCO].s[6], m_flags[RSP_VCO].s[7]); |
4194 | | printf("vco_lo: %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", m_flags[RSP_VCO].s[8], m_flags[RSP_VCO].s[9], m_flags[RSP_VCO].s[10], m_flags[RSP_VCO].s[11], m_flags[RSP_VCO].s[12], m_flags[RSP_VCO].s[13], m_flags[RSP_VCO].s[14], m_flags[RSP_VCO].s[15]); |
4195 | | printf("vce: %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", m_flags[RSP_VCE].s[0], m_flags[RSP_VCE].s[1], m_flags[RSP_VCE].s[2], m_flags[RSP_VCE].s[3], m_flags[RSP_VCE].s[4], m_flags[RSP_VCE].s[5], m_flags[RSP_VCE].s[6], m_flags[RSP_VCE].s[7]); |
| 4188 | printf("acc_h: %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", m_acc.s[0], m_acc.s[1], m_acc.s[2], m_acc.s[3], m_acc.s[4], m_acc.s[5], m_acc.s[6], m_acc.s[7]); |
| 4189 | printf("acc_m: %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", m_acc.s[8], m_acc.s[9], m_acc.s[10], m_acc.s[11], m_acc.s[12], m_acc.s[13], m_acc.s[14], m_acc.s[15]); |
| 4190 | printf("acc_l: %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", m_acc.s[16], m_acc.s[17], m_acc.s[18], m_acc.s[19], m_acc.s[20], m_acc.s[21], m_acc.s[22], m_acc.s[23]); |
| 4191 | printf("vcc_hi: %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", m_flags[RSP_VCC].s[0], m_flags[RSP_VCC].s[1], m_flags[RSP_VCC].s[2], m_flags[RSP_VCC].s[3], m_flags[RSP_VCC].s[4], m_flags[RSP_VCC].s[5], m_flags[RSP_VCC].s[6], m_flags[RSP_VCC].s[7]); |
| 4192 | printf("vcc_lo: %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", m_flags[RSP_VCC].s[8], m_flags[RSP_VCC].s[9], m_flags[RSP_VCC].s[10], m_flags[RSP_VCC].s[11], m_flags[RSP_VCC].s[12], m_flags[RSP_VCC].s[13], m_flags[RSP_VCC].s[14], m_flags[RSP_VCC].s[15]); |
| 4193 | printf("vco_hi: %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", m_flags[RSP_VCO].s[0], m_flags[RSP_VCO].s[1], m_flags[RSP_VCO].s[2], m_flags[RSP_VCO].s[3], m_flags[RSP_VCO].s[4], m_flags[RSP_VCO].s[5], m_flags[RSP_VCO].s[6], m_flags[RSP_VCO].s[7]); |
| 4194 | printf("vco_lo: %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", m_flags[RSP_VCO].s[8], m_flags[RSP_VCO].s[9], m_flags[RSP_VCO].s[10], m_flags[RSP_VCO].s[11], m_flags[RSP_VCO].s[12], m_flags[RSP_VCO].s[13], m_flags[RSP_VCO].s[14], m_flags[RSP_VCO].s[15]); |
| 4195 | printf("vce: %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", m_flags[RSP_VCE].s[0], m_flags[RSP_VCE].s[1], m_flags[RSP_VCE].s[2], m_flags[RSP_VCE].s[3], m_flags[RSP_VCE].s[4], m_flags[RSP_VCE].s[5], m_flags[RSP_VCE].s[6], m_flags[RSP_VCE].s[7]); |
4196 | 4196 | #else |
4197 | | printf("acc_h: %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", ACCUM_H(0), ACCUM_H(1), ACCUM_H(2), ACCUM_H(3), ACCUM_H(4), ACCUM_H(5), ACCUM_H(6), ACCUM_H(7)); |
4198 | | printf("acc_m: %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", ACCUM_M(0), ACCUM_M(1), ACCUM_M(2), ACCUM_M(3), ACCUM_M(4), ACCUM_M(5), ACCUM_M(6), ACCUM_M(7)); |
4199 | | printf("acc_l: %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", ACCUM_L(0), ACCUM_L(1), ACCUM_L(2), ACCUM_L(3), ACCUM_L(4), ACCUM_L(5), ACCUM_L(6), ACCUM_L(7)); |
4200 | | printf("vcc_hi: %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", m_vflag[4][0], m_vflag[4][1], m_vflag[4][2], m_vflag[4][3], m_vflag[4][4], m_vflag[4][5], m_vflag[4][6], m_vflag[4][7]); |
4201 | | printf("vcc_lo: %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", m_vflag[1][0], m_vflag[1][1], m_vflag[1][2], m_vflag[1][3], m_vflag[1][4], m_vflag[1][5], m_vflag[1][6], m_vflag[1][7]); |
4202 | | printf("vco_hi: %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", m_vflag[3][0], m_vflag[3][1], m_vflag[3][2], m_vflag[3][3], m_vflag[3][4], m_vflag[3][5], m_vflag[3][6], m_vflag[3][7]); |
4203 | | printf("vco_lo: %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", m_vflag[0][0], m_vflag[0][1], m_vflag[0][2], m_vflag[0][3], m_vflag[0][4], m_vflag[0][5], m_vflag[0][6], m_vflag[0][7]); |
4204 | | printf("vce: %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", m_vflag[2][0], m_vflag[2][1], m_vflag[2][2], m_vflag[2][3], m_vflag[2][4], m_vflag[2][5], m_vflag[2][6], m_vflag[2][7]); |
| 4197 | printf("acc_h: %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", ACCUM_H(0), ACCUM_H(1), ACCUM_H(2), ACCUM_H(3), ACCUM_H(4), ACCUM_H(5), ACCUM_H(6), ACCUM_H(7)); |
| 4198 | printf("acc_m: %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", ACCUM_M(0), ACCUM_M(1), ACCUM_M(2), ACCUM_M(3), ACCUM_M(4), ACCUM_M(5), ACCUM_M(6), ACCUM_M(7)); |
| 4199 | printf("acc_l: %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", ACCUM_L(0), ACCUM_L(1), ACCUM_L(2), ACCUM_L(3), ACCUM_L(4), ACCUM_L(5), ACCUM_L(6), ACCUM_L(7)); |
| 4200 | printf("vcc_hi: %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", m_vflag[4][0], m_vflag[4][1], m_vflag[4][2], m_vflag[4][3], m_vflag[4][4], m_vflag[4][5], m_vflag[4][6], m_vflag[4][7]); |
| 4201 | printf("vcc_lo: %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", m_vflag[1][0], m_vflag[1][1], m_vflag[1][2], m_vflag[1][3], m_vflag[1][4], m_vflag[1][5], m_vflag[1][6], m_vflag[1][7]); |
| 4202 | printf("vco_hi: %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", m_vflag[3][0], m_vflag[3][1], m_vflag[3][2], m_vflag[3][3], m_vflag[3][4], m_vflag[3][5], m_vflag[3][6], m_vflag[3][7]); |
| 4203 | printf("vco_lo: %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", m_vflag[0][0], m_vflag[0][1], m_vflag[0][2], m_vflag[0][3], m_vflag[0][4], m_vflag[0][5], m_vflag[0][6], m_vflag[0][7]); |
| 4204 | printf("vce: %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", m_vflag[2][0], m_vflag[2][1], m_vflag[2][2], m_vflag[2][3], m_vflag[2][4], m_vflag[2][5], m_vflag[2][6], m_vflag[2][7]); |
4205 | 4205 | #endif |
4206 | 4206 | } |
4207 | 4207 | |
4208 | 4208 | void rsp_cop2::dump_dmem() |
4209 | 4209 | { |
4210 | | UINT8* dmem = m_rsp.get_dmem(); |
4211 | | printf("\n"); |
4212 | | for (int i = 0; i < 0x1000; i += 32) |
4213 | | { |
4214 | | printf("%04x: ", i); |
4215 | | for (int j = 0; j < 32; j++) |
4216 | | { |
4217 | | printf("%02x ", dmem[i + j]); |
4218 | | } |
4219 | | printf("\n"); |
4220 | | } |
4221 | | printf("\n"); |
4222 | | } |
| | No newline at end of file |
| 4210 | UINT8* dmem = m_rsp.get_dmem(); |
| 4211 | printf("\n"); |
| 4212 | for (int i = 0; i < 0x1000; i += 32) |
| 4213 | { |
| 4214 | printf("%04x: ", i); |
| 4215 | for (int j = 0; j < 32; j++) |
| 4216 | { |
| 4217 | printf("%02x ", dmem[i + j]); |
| 4218 | } |
| 4219 | printf("\n"); |
| 4220 | } |
| 4221 | printf("\n"); |
| 4222 | } |
trunk/src/mame/drivers/firebeat.c
r248551 | r248552 | |
227 | 227 | |
228 | 228 | switch (reg) |
229 | 229 | { |
230 | | case 0x78: // GCU Status |
| 230 | case 0x78: // GCU Status |
231 | 231 | /* ppd checks bits 0x0041 of the upper halfword on interrupt */ |
232 | 232 | return 0xffff0005; |
233 | 233 | |
r248551 | r248552 | |
255 | 255 | #endif |
256 | 256 | break; |
257 | 257 | |
258 | | case 0x14: // ? |
| 258 | case 0x14: // ? |
259 | 259 | break; |
260 | 260 | |
261 | | case 0x18: // ? |
| 261 | case 0x18: // ? |
262 | 262 | break; |
263 | 263 | |
264 | | case 0x20: // Framebuffer 0 Origin(?) |
| 264 | case 0x20: // Framebuffer 0 Origin(?) |
265 | 265 | break; |
266 | 266 | |
267 | | case 0x24: // Framebuffer 1 Origin(?) |
| 267 | case 0x24: // Framebuffer 1 Origin(?) |
268 | 268 | break; |
269 | 269 | |
270 | | case 0x28: // Framebuffer 2 Origin(?) |
| 270 | case 0x28: // Framebuffer 2 Origin(?) |
271 | 271 | break; |
272 | 272 | |
273 | | case 0x2c: // Framebuffer 3 Origin(?) |
| 273 | case 0x2c: // Framebuffer 3 Origin(?) |
274 | 274 | break; |
275 | 275 | |
276 | | case 0x30: // Framebuffer 0 Dimensions |
| 276 | case 0x30: // Framebuffer 0 Dimensions |
277 | 277 | if (ACCESSING_BITS_16_31) |
278 | 278 | m_frame[0].height = (data >> 16) & 0xffff; |
279 | 279 | if (ACCESSING_BITS_0_15) |
280 | 280 | m_frame[0].width = data & 0xffff; |
281 | 281 | break; |
282 | 282 | |
283 | | case 0x34: // Framebuffer 1 Dimensions |
| 283 | case 0x34: // Framebuffer 1 Dimensions |
284 | 284 | if (ACCESSING_BITS_16_31) |
285 | 285 | m_frame[1].height = (data >> 16) & 0xffff; |
286 | 286 | if (ACCESSING_BITS_0_15) |
287 | 287 | m_frame[1].width = data & 0xffff; |
288 | 288 | break; |
289 | 289 | |
290 | | case 0x38: // Framebuffer 2 Dimensions |
| 290 | case 0x38: // Framebuffer 2 Dimensions |
291 | 291 | if (ACCESSING_BITS_16_31) |
292 | 292 | m_frame[2].height = (data >> 16) & 0xffff; |
293 | 293 | if (ACCESSING_BITS_0_15) |
294 | 294 | m_frame[2].width = data & 0xffff; |
295 | 295 | break; |
296 | 296 | |
297 | | case 0x3c: // Framebuffer 3 Dimensions |
| 297 | case 0x3c: // Framebuffer 3 Dimensions |
298 | 298 | if (ACCESSING_BITS_16_31) |
299 | 299 | m_frame[3].height = (data >> 16) & 0xffff; |
300 | 300 | if (ACCESSING_BITS_0_15) |
301 | 301 | m_frame[3].width = data & 0xffff; |
302 | 302 | break; |
303 | 303 | |
304 | | case 0x40: // Framebuffer 0 Base |
| 304 | case 0x40: // Framebuffer 0 Base |
305 | 305 | m_frame[0].base = data; |
306 | 306 | #if PRINT_GCU |
307 | 307 | printf("%s FB0 Base: %08X\n", basetag(), data); |
308 | 308 | #endif |
309 | 309 | break; |
310 | 310 | |
311 | | case 0x44: // Framebuffer 1 Base |
| 311 | case 0x44: // Framebuffer 1 Base |
312 | 312 | m_frame[1].base = data; |
313 | 313 | #if PRINT_GCU |
314 | 314 | printf("%s FB1 Base: %08X\n", basetag(), data); |
315 | 315 | #endif |
316 | 316 | break; |
317 | 317 | |
318 | | case 0x48: // Framebuffer 2 Base |
| 318 | case 0x48: // Framebuffer 2 Base |
319 | 319 | m_frame[2].base = data; |
320 | 320 | #if PRINT_GCU |
321 | 321 | printf("%s FB2 Base: %08X\n", basetag(), data); |
322 | 322 | #endif |
323 | 323 | break; |
324 | 324 | |
325 | | case 0x4c: // Framebuffer 3 Base |
| 325 | case 0x4c: // Framebuffer 3 Base |
326 | 326 | m_frame[3].base = data; |
327 | 327 | #if PRINT_GCU |
328 | 328 | printf("%s FB3 Base: %08X\n", basetag(), data); |
329 | 329 | #endif |
330 | 330 | break; |
331 | 331 | |
332 | | case 0x5c: // VRAM Read Address |
| 332 | case 0x5c: // VRAM Read Address |
333 | 333 | m_vram_read_addr = (data & 0xffffff) / 2; |
334 | 334 | break; |
335 | 335 | |
336 | | case 0x60: // VRAM Port 0 Write Address |
| 336 | case 0x60: // VRAM Port 0 Write Address |
337 | 337 | m_vram_fifo0_addr = (data & 0xffffff) / 2; |
338 | 338 | break; |
339 | 339 | |
340 | | case 0x68: // VRAM Port 0/1 Mode |
| 340 | case 0x68: // VRAM Port 0/1 Mode |
341 | 341 | if (ACCESSING_BITS_16_31) |
342 | 342 | m_vram_fifo0_mode = data >> 16; |
343 | 343 | if (ACCESSING_BITS_0_15) |
344 | 344 | m_vram_fifo1_mode = data & 0xffff; |
345 | 345 | break; |
346 | 346 | |
347 | | case 0x70: // VRAM Port 0 Write FIFO |
| 347 | case 0x70: // VRAM Port 0 Write FIFO |
348 | 348 | if (m_vram_fifo0_mode & 0x100) |
349 | 349 | { |
350 | 350 | // write to command fifo |
r248551 | r248552 | |
359 | 359 | m_command_fifo0_ptr = 0; |
360 | 360 | } |
361 | 361 | } |
362 | | else |
| 362 | else |
363 | 363 | { |
364 | 364 | // write to VRAM fifo |
365 | 365 | m_vram[m_vram_fifo0_addr] = data; |
r248551 | r248552 | |
367 | 367 | } |
368 | 368 | break; |
369 | 369 | |
370 | | case 0x64: // VRAM Port 1 Write Address |
| 370 | case 0x64: // VRAM Port 1 Write Address |
371 | 371 | m_vram_fifo1_addr = (data & 0xffffff) / 2; |
372 | 372 | printf("GCU FIFO1 addr = %08X\n", data); |
373 | 373 | break; |
374 | 374 | |
375 | | case 0x74: // VRAM Port 1 Write FIFO |
| 375 | case 0x74: // VRAM Port 1 Write FIFO |
376 | 376 | printf("GCU FIFO1 write = %08X\n", data); |
377 | 377 | |
378 | 378 | if (m_vram_fifo1_mode & 0x100) |
r248551 | r248552 | |
388 | 388 | m_command_fifo1_ptr = 0; |
389 | 389 | } |
390 | 390 | } |
391 | | else |
| 391 | else |
392 | 392 | { |
393 | 393 | // write to VRAM fifo |
394 | 394 | m_vram[m_vram_fifo1_addr] = data; |
r248551 | r248552 | |
409 | 409 | int x = 0; |
410 | 410 | int y = 0; |
411 | 411 | int width = m_frame[0].width; |
412 | | int height = m_frame[0].height; |
| 412 | int height = m_frame[0].height; |
413 | 413 | |
414 | 414 | if (width != 0 && height != 0) |
415 | 415 | { |
r248551 | r248552 | |
430 | 430 | int li = ((j+y) * fb_pitch) + x; |
431 | 431 | UINT32 fbaddr0 = m_frame[0].base + li; |
432 | 432 | UINT32 fbaddr1 = m_frame[1].base + li; |
433 | | // UINT32 fbaddr2 = m_frame[2].base + li; |
434 | | // UINT32 fbaddr3 = m_frame[3].base + li; |
| 433 | // UINT32 fbaddr2 = m_frame[2].base + li; |
| 434 | // UINT32 fbaddr3 = m_frame[3].base + li; |
435 | 435 | |
436 | 436 | for (int i=0; i < width; i++) |
437 | 437 | { |
438 | 438 | UINT16 pix0 = vram16[fbaddr0 ^ NATIVE_ENDIAN_VALUE_LE_BE(1,0)]; |
439 | 439 | UINT16 pix1 = vram16[fbaddr1 ^ NATIVE_ENDIAN_VALUE_LE_BE(1,0)]; |
440 | | // UINT16 pix2 = vram16[fbaddr2 ^ NATIVE_ENDIAN_VALUE_LE_BE(1,0)]; |
441 | | // UINT16 pix3 = vram16[fbaddr3 ^ NATIVE_ENDIAN_VALUE_LE_BE(1,0)]; |
| 440 | // UINT16 pix2 = vram16[fbaddr2 ^ NATIVE_ENDIAN_VALUE_LE_BE(1,0)]; |
| 441 | // UINT16 pix3 = vram16[fbaddr3 ^ NATIVE_ENDIAN_VALUE_LE_BE(1,0)]; |
442 | 442 | |
443 | 443 | if (pix0 & 0x8000) |
444 | 444 | { |
r248551 | r248552 | |
451 | 451 | |
452 | 452 | fbaddr0++; |
453 | 453 | fbaddr1++; |
454 | | // fbaddr2++; |
455 | | // fbaddr3++; |
| 454 | // fbaddr2++; |
| 455 | // fbaddr3++; |
456 | 456 | } |
457 | 457 | } |
458 | 458 | |
r248551 | r248552 | |
493 | 493 | UINT32 address = cmd[0] & 0xffffff; |
494 | 494 | int alpha_level = (cmd[2] >> 27) & 0x1f; |
495 | 495 | bool relative_coords = (cmd[0] & 0x10000000) ? true : false; |
496 | | |
| 496 | |
497 | 497 | if (relative_coords) |
498 | 498 | { |
499 | 499 | x += m_fb_origin_x; |
r248551 | r248552 | |
522 | 522 | int index; |
523 | 523 | int xinc; |
524 | 524 | UINT32 fbaddr = ((j+y) * fb_pitch) + x; |
525 | | |
| 525 | |
526 | 526 | if (yflip) |
527 | 527 | { |
528 | 528 | index = address + ((height - 1 - (v >> 6)) * 1024); |
r248551 | r248552 | |
592 | 592 | |
593 | 593 | void firebeat_gcu_device::fill_rect(UINT32 *cmd) |
594 | 594 | { |
595 | | // 0x00: xxx----- -------- -------- -------- command (4) |
| 595 | // 0x00: xxx----- -------- -------- -------- command (4) |
596 | 596 | // 0x00: ---x---- -------- -------- -------- 0: absolute coordinates |
597 | 597 | // 1: relative coordinates from framebuffer origin |
598 | 598 | // 0x00: ----xx-- -------- -------- -------- ? |
r248551 | r248552 | |
742 | 742 | |
743 | 743 | switch (command) |
744 | 744 | { |
745 | | case 0: // NOP? |
| 745 | case 0: // NOP? |
746 | 746 | break; |
747 | 747 | |
748 | | case 1: // Execute display list |
| 748 | case 1: // Execute display list |
749 | 749 | execute_display_list(cmd[0] & 0xffffff); |
750 | 750 | break; |
751 | 751 | |
752 | | case 2: // End of display list |
| 752 | case 2: // End of display list |
753 | 753 | end = true; |
754 | 754 | break; |
755 | 755 | |
756 | | case 3: // Framebuffer config |
| 756 | case 3: // Framebuffer config |
757 | 757 | fb_config(cmd); |
758 | 758 | break; |
759 | 759 | |
760 | | case 4: // Fill rectangle |
| 760 | case 4: // Fill rectangle |
761 | 761 | fill_rect(cmd); |
762 | 762 | break; |
763 | 763 | |
764 | | case 5: // Draw object |
| 764 | case 5: // Draw object |
765 | 765 | draw_object(cmd); |
766 | 766 | break; |
767 | 767 | |
768 | | case 7: // Draw 8x8 character (2 bits per pixel) |
| 768 | case 7: // Draw 8x8 character (2 bits per pixel) |
769 | 769 | draw_character(cmd); |
770 | 770 | break; |
771 | 771 | |
r248551 | r248552 | |
787 | 787 | |
788 | 788 | switch (command) |
789 | 789 | { |
790 | | case 0: // NOP? |
| 790 | case 0: // NOP? |
791 | 791 | break; |
792 | 792 | |
793 | | case 1: // Execute display list |
| 793 | case 1: // Execute display list |
794 | 794 | execute_display_list(cmd[0] & 0xffffff); |
795 | 795 | break; |
796 | 796 | |
797 | | case 2: // End of display list |
| 797 | case 2: // End of display list |
798 | 798 | break; |
799 | 799 | |
800 | | case 3: // Framebuffer config |
| 800 | case 3: // Framebuffer config |
801 | 801 | fb_config(cmd); |
802 | 802 | break; |
803 | 803 | |
804 | | case 4: // Fill rectangle |
| 804 | case 4: // Fill rectangle |
805 | 805 | fill_rect(cmd); |
806 | 806 | break; |
807 | 807 | |
808 | | case 5: // Draw object |
| 808 | case 5: // Draw object |
809 | 809 | draw_object(cmd); |
810 | 810 | break; |
811 | 811 | |
812 | | case 7: // Draw 8x8 character (2 bits per pixel) |
| 812 | case 7: // Draw 8x8 character (2 bits per pixel) |
813 | 813 | draw_character(cmd); |
814 | 814 | break; |
815 | 815 | |
r248551 | r248552 | |
851 | 851 | printf("dumping %s\n", filename); |
852 | 852 | FILE *file = fopen(filename, "wb"); |
853 | 853 | int i; |
854 | | |
| 854 | |
855 | 855 | for (i=0; i < 0x2000000/4; i++) |
856 | 856 | { |
857 | 857 | fputc((m_vram[i] >> 24) & 0xff, file); |
r248551 | r248552 | |
859 | 859 | fputc((m_vram[i] >> 8) & 0xff, file); |
860 | 860 | fputc((m_vram[i] >> 0) & 0xff, file); |
861 | 861 | } |
862 | | |
| 862 | |
863 | 863 | fclose(file); |
864 | 864 | #endif |
865 | 865 | } |
r248551 | r248552 | |
1594 | 1594 | { |
1595 | 1595 | r |= m_spu_shared_ram[(offset * 4) + 3] << 0; |
1596 | 1596 | |
1597 | | if (offset == 0xff) // address 0x3ff clears PPC interrupt |
| 1597 | if (offset == 0xff) // address 0x3ff clears PPC interrupt |
1598 | 1598 | { |
1599 | 1599 | m_maincpu->set_input_line(INPUT_LINE_IRQ3, CLEAR_LINE); |
1600 | 1600 | } |
r248551 | r248552 | |
1621 | 1621 | { |
1622 | 1622 | m_spu_shared_ram[(offset * 4) + 2] = (data >> 8) & 0xff; |
1623 | 1623 | |
1624 | | if (offset == 0xff) // address 0x3fe triggers M68K interrupt |
| 1624 | if (offset == 0xff) // address 0x3fe triggers M68K interrupt |
1625 | 1625 | { |
1626 | 1626 | m_audiocpu->set_input_line(INPUT_LINE_IRQ4, ASSERT_LINE); |
1627 | 1627 | } |
r248551 | r248552 | |
1637 | 1637 | IRQ1: ? |
1638 | 1638 | |
1639 | 1639 | IRQ2: Timer? |
1640 | | |
1641 | | IRQ4: Dual-port RAM mailbox (when PPC writes to 0x3FE) |
1642 | | Handles commands from PPC (bytes 0x00 and 0x01) |
1643 | | |
1644 | | IRQ6: ATA |
| 1640 | |
| 1641 | IRQ4: Dual-port RAM mailbox (when PPC writes to 0x3FE) |
| 1642 | Handles commands from PPC (bytes 0x00 and 0x01) |
| 1643 | |
| 1644 | IRQ6: ATA |
1645 | 1645 | */ |
1646 | 1646 | |
1647 | 1647 | READ16_MEMBER(firebeat_state::m68k_spu_share_r) |
r248551 | r248552 | |
1655 | 1655 | { |
1656 | 1656 | r |= m_spu_shared_ram[offset]; |
1657 | 1657 | |
1658 | | if (offset == 0x3fe) // address 0x3fe clears M68K interrupt |
| 1658 | if (offset == 0x3fe) // address 0x3fe clears M68K interrupt |
1659 | 1659 | { |
1660 | 1660 | m_audiocpu->set_input_line(INPUT_LINE_IRQ4, CLEAR_LINE); |
1661 | 1661 | } |
r248551 | r248552 | |
1672 | 1672 | { |
1673 | 1673 | m_spu_shared_ram[offset] = data & 0xff; |
1674 | 1674 | |
1675 | | if (offset == 0x3ff) // address 0x3ff triggers PPC interrupt |
| 1675 | if (offset == 0x3ff) // address 0x3ff triggers PPC interrupt |
1676 | 1676 | { |
1677 | 1677 | m_maincpu->set_input_line(INPUT_LINE_IRQ3, ASSERT_LINE); |
1678 | 1678 | } |
r248551 | r248552 | |
1684 | 1684 | // dipswitches? |
1685 | 1685 | |
1686 | 1686 | UINT16 r = 0; |
1687 | | r |= 0x80; // if set, uses ATA PIO mode, otherwise DMA |
| 1687 | r |= 0x80; // if set, uses ATA PIO mode, otherwise DMA |
1688 | 1688 | |
1689 | 1689 | return r; |
1690 | 1690 | } |
r248551 | r248552 | |
1760 | 1760 | AM_RANGE(0x280000, 0x2807ff) AM_READWRITE(m68k_spu_share_r, m68k_spu_share_w) |
1761 | 1761 | AM_RANGE(0x300000, 0x30000f) AM_DEVREADWRITE("spu_ata", ata_interface_device, read_cs0, write_cs0) |
1762 | 1762 | AM_RANGE(0x340000, 0x34000f) AM_DEVREADWRITE("spu_ata", ata_interface_device, read_cs1, write_cs1) |
1763 | | AM_RANGE(0x400000, 0x400fff) AM_DEVREADWRITE("rf5c400", rf5c400_device, rf5c400_r, rf5c400_w) |
| 1763 | AM_RANGE(0x400000, 0x400fff) AM_DEVREADWRITE("rf5c400", rf5c400_device, rf5c400_r, rf5c400_w) |
1764 | 1764 | ADDRESS_MAP_END |
1765 | 1765 | |
1766 | 1766 | /*****************************************************************************/ |
r248551 | r248552 | |
2503 | 2503 | // Beatmania III has a different BIOS and SPU program, and they aren't dumped yet |
2504 | 2504 | ROM_START( bm37th ) |
2505 | 2505 | ROM_REGION32_BE(0x80000, "user1", 0) |
2506 | | ROM_LOAD16_WORD_SWAP("974a03.21e", 0x00000, 0x80000, BAD_DUMP CRC(ef9a932d) SHA1(6299d3b9823605e519dbf1f105b59a09197df72f)) // boots with KBM BIOS |
| 2506 | ROM_LOAD16_WORD_SWAP("974a03.21e", 0x00000, 0x80000, BAD_DUMP CRC(ef9a932d) SHA1(6299d3b9823605e519dbf1f105b59a09197df72f)) // boots with KBM BIOS |
2507 | 2507 | |
2508 | 2508 | ROM_REGION(0xc0, "user2", ROMREGION_ERASE00) // Security dongle |
2509 | 2509 | ROM_LOAD( "gcb07-jc", 0x000000, 0x0000c0, CRC(16115b6a) SHA1(dcb2a3346973941a946b2cdfd31a5a761f666ca3) ) |
r248551 | r248552 | |
2522 | 2522 | |
2523 | 2523 | ROM_START( bm3final ) |
2524 | 2524 | ROM_REGION32_BE(0x80000, "user1", 0) |
2525 | | ROM_LOAD16_WORD_SWAP("974a03.21e", 0x00000, 0x80000, BAD_DUMP CRC(ef9a932d) SHA1(6299d3b9823605e519dbf1f105b59a09197df72f)) // boots with KBM BIOS |
| 2525 | ROM_LOAD16_WORD_SWAP("974a03.21e", 0x00000, 0x80000, BAD_DUMP CRC(ef9a932d) SHA1(6299d3b9823605e519dbf1f105b59a09197df72f)) // boots with KBM BIOS |
2526 | 2526 | |
2527 | 2527 | ROM_REGION(0xc0, "user2", ROMREGION_ERASE00) // Security dongle |
2528 | 2528 | ROM_LOAD( "gcc01-jc", 0x000000, 0x0000c0, CRC(9c49fed8) SHA1(212b87c1d25763117611ffb2a36ed568d429d2f4) ) |
trunk/src/mame/drivers/rainbow.c
r248551 | r248552 | |
724 | 724 | static MACHINE_CONFIG_DERIVED( jumpingi, jumping ) |
725 | 725 | MCFG_CPU_REPLACE("maincpu", M68000, XTAL_16MHz/2) /* verified on pcb */ |
726 | 726 | MCFG_CPU_PROGRAM_MAP(jumping_map) |
727 | | MCFG_CPU_VBLANK_INT_DRIVER("screen", rbisland_state, irq4_line_hold) |
| 727 | MCFG_CPU_VBLANK_INT_DRIVER("screen", rbisland_state, irq4_line_hold) |
728 | 728 | MACHINE_CONFIG_END |
729 | 729 | |
730 | 730 | /*************************************************************************** |
r248551 | r248552 | |
902 | 902 | |
903 | 903 | /* red 'Imnoe' PCB */ |
904 | 904 | ROM_START( jumpingi ) |
905 | | ROM_REGION( 0xa0000, "maincpu", 0 ) |
906 | | ROM_LOAD16_BYTE( "05.IC3", 0x00000, 0x20000, CRC(69ac4af4) SHA1(39055573e412e2591f7a68f9fee5919528529544) ) |
907 | | ROM_LOAD16_BYTE( "03.IC6", 0x00001, 0x20000, CRC(38975cdc) SHA1(23c02a4574a95904805d5f458c06c77c14d11c14) ) |
908 | | ROM_LOAD16_BYTE( "06.IC2", 0x40000, 0x20000, CRC(3ebb0fb8) SHA1(1b41b305623d121255eb70cb992e4d9da13abd82) ) // b22-03.23 |
909 | | ROM_LOAD16_BYTE( "04.IC5", 0x40001, 0x20000, CRC(91625e7f) SHA1(765afd973d9b82bb496b04beca284bf2769d6e6f) ) // b22-04.24 |
910 | | ROM_LOAD16_BYTE( "02", 0x80001, 0x10000, CRC(0810d327) SHA1(fe91ac02e617bde413dc8a20b7cbcaf3e20aeb28) ) /* c-chip substitute */ |
| 905 | ROM_REGION( 0xa0000, "maincpu", 0 ) |
| 906 | ROM_LOAD16_BYTE( "05.IC3", 0x00000, 0x20000, CRC(69ac4af4) SHA1(39055573e412e2591f7a68f9fee5919528529544) ) |
| 907 | ROM_LOAD16_BYTE( "03.IC6", 0x00001, 0x20000, CRC(38975cdc) SHA1(23c02a4574a95904805d5f458c06c77c14d11c14) ) |
| 908 | ROM_LOAD16_BYTE( "06.IC2", 0x40000, 0x20000, CRC(3ebb0fb8) SHA1(1b41b305623d121255eb70cb992e4d9da13abd82) ) // b22-03.23 |
| 909 | ROM_LOAD16_BYTE( "04.IC5", 0x40001, 0x20000, CRC(91625e7f) SHA1(765afd973d9b82bb496b04beca284bf2769d6e6f) ) // b22-04.24 |
| 910 | ROM_LOAD16_BYTE( "02", 0x80001, 0x10000, CRC(0810d327) SHA1(fe91ac02e617bde413dc8a20b7cbcaf3e20aeb28) ) /* c-chip substitute */ |
911 | 911 | |
912 | | ROM_REGION( 0x14000, "audiocpu", 0 ) |
913 | | ROM_LOAD( "01.IC53", 0x00000, 0x8000, CRC(8527c00e) SHA1(86e3824caca39aca4ca4df63bb4474adacfc4c53) ) |
914 | | ROM_CONTINUE( 0x10000, 0x4000 ) |
915 | | ROM_CONTINUE( 0x0c000, 0x4000 ) |
| 912 | ROM_REGION( 0x14000, "audiocpu", 0 ) |
| 913 | ROM_LOAD( "01.IC53", 0x00000, 0x8000, CRC(8527c00e) SHA1(86e3824caca39aca4ca4df63bb4474adacfc4c53) ) |
| 914 | ROM_CONTINUE( 0x10000, 0x4000 ) |
| 915 | ROM_CONTINUE( 0x0c000, 0x4000 ) |
916 | 916 | |
917 | | ROM_REGION( 0x80000, "gfx1", 0 ) |
918 | | ROM_LOAD( "13.IC8", 0x00000, 0x10000, CRC(65b76309) SHA1(1e345726e137f4c56d4bf239651c986fd53a16c3) ) /* tiles */ |
919 | | ROM_LOAD( "14.IC7", 0x10000, 0x10000, CRC(43a94283) SHA1(d6a05cbc7b996a8e7f1520563f6fada9a59021a4) ) |
920 | | ROM_LOAD( "11.IC10", 0x20000, 0x10000, CRC(e61933fb) SHA1(02bc0e1a7a3ce9e15fb83b28ce8fafb0b8d80ebd) ) |
921 | | ROM_LOAD( "12.IC9", 0x30000, 0x10000, CRC(ed031eb2) SHA1(905be4d890ff7bb8a4d8ad85b2a11483fb4d67eb) ) |
922 | | ROM_LOAD( "09.IC12", 0x40000, 0x10000, CRC(312700ca) SHA1(c79edc9c25f364d0afd79aaa21cfe2fe46044314) ) |
923 | | ROM_LOAD( "10.IC11", 0x50000, 0x10000, CRC(de3b0b88) SHA1(14b8871821e4c0abbb9967c5aa282cf4e67884fe) ) |
924 | | ROM_LOAD( "07.IC14", 0x60000, 0x10000, CRC(9fdc6c8e) SHA1(ff4e1a98dc982bce2f9d235cac62c7166f477f64) ) |
925 | | ROM_LOAD( "08.IC13", 0x70000, 0x10000, CRC(06226492) SHA1(834280ec49e61a0c9c6b6fe2033e1b20bd1bffbf) ) |
| 917 | ROM_REGION( 0x80000, "gfx1", 0 ) |
| 918 | ROM_LOAD( "13.IC8", 0x00000, 0x10000, CRC(65b76309) SHA1(1e345726e137f4c56d4bf239651c986fd53a16c3) ) /* tiles */ |
| 919 | ROM_LOAD( "14.IC7", 0x10000, 0x10000, CRC(43a94283) SHA1(d6a05cbc7b996a8e7f1520563f6fada9a59021a4) ) |
| 920 | ROM_LOAD( "11.IC10", 0x20000, 0x10000, CRC(e61933fb) SHA1(02bc0e1a7a3ce9e15fb83b28ce8fafb0b8d80ebd) ) |
| 921 | ROM_LOAD( "12.IC9", 0x30000, 0x10000, CRC(ed031eb2) SHA1(905be4d890ff7bb8a4d8ad85b2a11483fb4d67eb) ) |
| 922 | ROM_LOAD( "09.IC12", 0x40000, 0x10000, CRC(312700ca) SHA1(c79edc9c25f364d0afd79aaa21cfe2fe46044314) ) |
| 923 | ROM_LOAD( "10.IC11", 0x50000, 0x10000, CRC(de3b0b88) SHA1(14b8871821e4c0abbb9967c5aa282cf4e67884fe) ) |
| 924 | ROM_LOAD( "07.IC14", 0x60000, 0x10000, CRC(9fdc6c8e) SHA1(ff4e1a98dc982bce2f9d235cac62c7166f477f64) ) |
| 925 | ROM_LOAD( "08.IC13", 0x70000, 0x10000, CRC(06226492) SHA1(834280ec49e61a0c9c6b6fe2033e1b20bd1bffbf) ) |
926 | 926 | |
927 | | ROM_REGION( 0xa0000, "gfx2", ROMREGION_INVERT ) |
928 | | ROM_LOAD( "15.IC62", 0x00000, 0x10000, CRC(8548db6c) SHA1(675cd301259d5ed16098a38ac58b27b5ccd91264) ) /* sprites */ |
929 | | ROM_LOAD( "19.IC61", 0x10000, 0x10000, CRC(89b3d8ee) SHA1(8491de6e8292e58b9a8696be15827bcb1ea42845) ) |
930 | | ROM_LOAD( "23.IC60", 0x20000, 0x08000, CRC(662a2f1e) SHA1(1c5e8b1f0623e64faf9cd60f9653fc5957191a9b) ) |
931 | | ROM_LOAD( "16.IC78", 0x28000, 0x10000, CRC(925865e1) SHA1(457de50bc03e8b949ac7d46ae4188201e87574a8) ) |
932 | | ROM_LOAD( "20.IC77", 0x38000, 0x10000, CRC(b09695d1) SHA1(e6d315f9befb7b47f42668d573a1102e52d78aea) ) |
933 | | ROM_LOAD( "24.IC76", 0x48000, 0x08000, CRC(41937743) SHA1(890c832a7cf87e6fe749d4824b02d57e10872bdf) ) |
934 | | ROM_LOAD( "17.IC93", 0x50000, 0x10000, CRC(f644eeab) SHA1(9d45e9dfb08e8c90b4b10f5dc383fa4732161a81) ) |
935 | | ROM_LOAD( "21.IC92", 0x60000, 0x10000, CRC(16e1b0ff) SHA1(1467a317d07a447d01113e6b6b9f5aca30cb0dcb) ) |
936 | | ROM_LOAD( "25.IC91", 0x70000, 0x08000, CRC(d886c014) SHA1(9327c332c98a81451e9e0624344d2601ef06e490) ) |
937 | | ROM_LOAD( "18.IC121", 0x78000, 0x10000, CRC(93df1e4d) SHA1(b100d265b973254ec9cd44b6c32f62b4bac3b732) ) |
938 | | ROM_LOAD( "22.IC120", 0x88000, 0x10000, CRC(7c4e893b) SHA1(eceecb38554157ee24d228a2c722dad750a6a07d) ) |
939 | | ROM_LOAD( "26.IC119", 0x98000, 0x08000, CRC(7e1d58d8) SHA1(d586a018c3ec3e6e6a39992170d324361e03c68a) ) |
| 927 | ROM_REGION( 0xa0000, "gfx2", ROMREGION_INVERT ) |
| 928 | ROM_LOAD( "15.IC62", 0x00000, 0x10000, CRC(8548db6c) SHA1(675cd301259d5ed16098a38ac58b27b5ccd91264) ) /* sprites */ |
| 929 | ROM_LOAD( "19.IC61", 0x10000, 0x10000, CRC(89b3d8ee) SHA1(8491de6e8292e58b9a8696be15827bcb1ea42845) ) |
| 930 | ROM_LOAD( "23.IC60", 0x20000, 0x08000, CRC(662a2f1e) SHA1(1c5e8b1f0623e64faf9cd60f9653fc5957191a9b) ) |
| 931 | ROM_LOAD( "16.IC78", 0x28000, 0x10000, CRC(925865e1) SHA1(457de50bc03e8b949ac7d46ae4188201e87574a8) ) |
| 932 | ROM_LOAD( "20.IC77", 0x38000, 0x10000, CRC(b09695d1) SHA1(e6d315f9befb7b47f42668d573a1102e52d78aea) ) |
| 933 | ROM_LOAD( "24.IC76", 0x48000, 0x08000, CRC(41937743) SHA1(890c832a7cf87e6fe749d4824b02d57e10872bdf) ) |
| 934 | ROM_LOAD( "17.IC93", 0x50000, 0x10000, CRC(f644eeab) SHA1(9d45e9dfb08e8c90b4b10f5dc383fa4732161a81) ) |
| 935 | ROM_LOAD( "21.IC92", 0x60000, 0x10000, CRC(16e1b0ff) SHA1(1467a317d07a447d01113e6b6b9f5aca30cb0dcb) ) |
| 936 | ROM_LOAD( "25.IC91", 0x70000, 0x08000, CRC(d886c014) SHA1(9327c332c98a81451e9e0624344d2601ef06e490) ) |
| 937 | ROM_LOAD( "18.IC121", 0x78000, 0x10000, CRC(93df1e4d) SHA1(b100d265b973254ec9cd44b6c32f62b4bac3b732) ) |
| 938 | ROM_LOAD( "22.IC120", 0x88000, 0x10000, CRC(7c4e893b) SHA1(eceecb38554157ee24d228a2c722dad750a6a07d) ) |
| 939 | ROM_LOAD( "26.IC119", 0x98000, 0x08000, CRC(7e1d58d8) SHA1(d586a018c3ec3e6e6a39992170d324361e03c68a) ) |
940 | 940 | |
941 | | ROM_REGION( 0x200, "pals", 0 ) |
942 | | ROM_LOAD( "JP2.IC56", 0x000, 0x104, CRC(12e9a7b8) SHA1(a0ce8b6083c9adfcb4bdbca87f63a01f292525f3) ) // PAL16R6A-2CN |
943 | | ROM_LOAD( "JP1.IC13", 0x000, 0x144, CRC(76944f81) SHA1(ab78e4e157ffdc13aea5dc360268b2640e60d19c) ) // PAL20L8A-2CNS |
944 | | ROM_LOAD( "JP3.IC51", 0x000, 0x104, CRC(c1e6cb8f) SHA1(9908e62bb9b806047b7a344bb62334bd696b9fc8) ) // PAL16L8A-2CN z80 address decoder? |
| 941 | ROM_REGION( 0x200, "pals", 0 ) |
| 942 | ROM_LOAD( "JP2.IC56", 0x000, 0x104, CRC(12e9a7b8) SHA1(a0ce8b6083c9adfcb4bdbca87f63a01f292525f3) ) // PAL16R6A-2CN |
| 943 | ROM_LOAD( "JP1.IC13", 0x000, 0x144, CRC(76944f81) SHA1(ab78e4e157ffdc13aea5dc360268b2640e60d19c) ) // PAL20L8A-2CNS |
| 944 | ROM_LOAD( "JP3.IC51", 0x000, 0x104, CRC(c1e6cb8f) SHA1(9908e62bb9b806047b7a344bb62334bd696b9fc8) ) // PAL16L8A-2CN z80 address decoder? |
945 | 945 | ROM_END |
946 | 946 | |
947 | 947 | DRIVER_INIT_MEMBER(rbisland_state,rbisland) |
trunk/src/mame/drivers/thedealr.c
r248551 | r248552 | |
4 | 4 | |
5 | 5 | The Dealer (Visco Games) |
6 | 6 | |
7 | | Driver by Luca Elia |
8 | | This game runs on Seta Hardware |
| 7 | Driver by Luca Elia |
| 8 | This game runs on Seta Hardware |
9 | 9 | |
10 | 10 | P0-040A PCB: |
11 | 11 | |
r248551 | r248552 | |
94 | 94 | { |
95 | 95 | bitmap.fill(0x1f0, cliprect); |
96 | 96 | |
97 | | m_seta001->set_bg_yoffsets( 0x11+1, -0x10 ); // + is up (down with flip) |
| 97 | m_seta001->set_bg_yoffsets( 0x11+1, -0x10 ); // + is up (down with flip) |
98 | 98 | m_seta001->set_fg_yoffsets( -0x12+1, -0x01 ); |
99 | 99 | |
100 | 100 | m_seta001->draw_sprites(screen, bitmap, cliprect, 0x1000, 1); |
r248551 | r248552 | |
120 | 120 | |
121 | 121 | void thedealr_state::iox_reset() |
122 | 122 | { |
123 | | m_iox_status = 0x00; |
124 | | m_iox_ret = 0x00; |
125 | | m_iox_cmd = 0xff; |
126 | | m_iox_leds = 0x00; |
127 | | m_iox_coins = 0x00; |
| 123 | m_iox_status = 0x00; |
| 124 | m_iox_ret = 0x00; |
| 125 | m_iox_cmd = 0xff; |
| 126 | m_iox_leds = 0x00; |
| 127 | m_iox_coins = 0x00; |
128 | 128 | } |
129 | 129 | |
130 | 130 | MACHINE_RESET_MEMBER(thedealr_state,thedealr) |
r248551 | r248552 | |
150 | 150 | |
151 | 151 | switch (m_iox_cmd) |
152 | 152 | { |
153 | | case 0x20: // leds |
| 153 | case 0x20: // leds |
154 | 154 | m_iox_leds = data; |
155 | | set_led_status(machine(), 0, data & 0x01); // bet |
156 | | set_led_status(machine(), 1, data & 0x02); // deal |
| 155 | set_led_status(machine(), 0, data & 0x01); // bet |
| 156 | set_led_status(machine(), 1, data & 0x02); // deal |
157 | 157 | set_led_status(machine(), 2, data & 0x04); |
158 | 158 | set_led_status(machine(), 3, data & 0x08); |
159 | | set_led_status(machine(), 4, data & 0x10); // hold 1-5? |
| 159 | set_led_status(machine(), 4, data & 0x10); // hold 1-5? |
160 | 160 | set_led_status(machine(), 5, data & 0x20); |
161 | 161 | set_led_status(machine(), 6, data & 0x40); |
162 | 162 | set_led_status(machine(), 7, data & 0x80); |
163 | 163 | break; |
164 | 164 | |
165 | | case 0x40: // coin counters |
| 165 | case 0x40: // coin counters |
166 | 166 | m_iox_coins = data; |
167 | 167 | coin_counter_w(machine(), 0, (~data) & 0x02); // coin1 or service coin |
168 | 168 | coin_counter_w(machine(), 1, (~data) & 0x04); // coupon |
r248551 | r248552 | |
177 | 177 | break; |
178 | 178 | } |
179 | 179 | |
180 | | // popmessage("LED: %02X COIN: %02X", m_iox_leds, m_iox_coins); |
| 180 | // popmessage("LED: %02X COIN: %02X", m_iox_leds, m_iox_coins); |
181 | 181 | } |
182 | 182 | else |
183 | 183 | { |
r248551 | r248552 | |
186 | 186 | |
187 | 187 | switch (m_iox_cmd) |
188 | 188 | { |
189 | | case 0x01: // inputs? |
| 189 | case 0x01: // inputs? |
190 | 190 | { |
191 | 191 | UINT16 buttons = ioport("IOX")->read(); |
192 | 192 | m_iox_ret = 0; |
r248551 | r248552 | |
202 | 202 | break; |
203 | 203 | } |
204 | 204 | |
205 | | // case 0x04: // ? at boot |
| 205 | // case 0x04: // ? at boot |
206 | 206 | |
207 | | case 0x08: // return iox version |
| 207 | case 0x08: // return iox version |
208 | 208 | m_iox_ret = 0x54; |
209 | 209 | m_iox_status |= IOX_OUT_FULL; |
210 | 210 | break; |
211 | 211 | |
212 | | case 0x20: // leds |
| 212 | case 0x20: // leds |
213 | 213 | m_iox_status |= IOX_WAITDATA; |
214 | 214 | break; |
215 | 215 | |
216 | | case 0x40: // coin counters |
| 216 | case 0x40: // coin counters |
217 | 217 | m_iox_status |= IOX_WAITDATA; |
218 | 218 | break; |
219 | 219 | |
220 | | case 0x80: // store param? |
| 220 | case 0x80: // store param? |
221 | 221 | m_iox_status |= IOX_WAITDATA; |
222 | 222 | break; |
223 | 223 | |
224 | | case 0x81: // store param? |
| 224 | case 0x81: // store param? |
225 | 225 | m_iox_status |= IOX_WAITDATA; |
226 | 226 | break; |
227 | 227 | |
228 | | case 0xff: // reset |
| 228 | case 0xff: // reset |
229 | 229 | iox_reset(); |
230 | 230 | break; |
231 | 231 | |
r248551 | r248552 | |
262 | 262 | // bit 2 - ? 0 during game |
263 | 263 | // bit 3 - ? 1 during game |
264 | 264 | // bit 7 - ? 0 during game |
265 | | // popmessage("UNK %02x", data); |
| 265 | // popmessage("UNK %02x", data); |
266 | 266 | } |
267 | 267 | |
268 | 268 | static ADDRESS_MAP_START( thedealr, AS_PROGRAM, 8, thedealr_state ) |
269 | 269 | AM_RANGE(0x0000, 0x07ff) AM_RAM AM_SHARE("nvram") |
270 | 270 | |
271 | | AM_RANGE(0x2000, 0x2000) AM_RAM // w ff at boot (after clearing commram) |
| 271 | AM_RANGE(0x2000, 0x2000) AM_RAM // w ff at boot (after clearing commram) |
272 | 272 | |
273 | | AM_RANGE(0x2400, 0x2400) AM_READ(irq_ack_r) // r = irq ack. |
274 | | AM_RANGE(0x2400, 0x2400) AM_WRITE(unk_w) // w = ? |
| 273 | AM_RANGE(0x2400, 0x2400) AM_READ(irq_ack_r) // r = irq ack. |
| 274 | AM_RANGE(0x2400, 0x2400) AM_WRITE(unk_w) // w = ? |
275 | 275 | |
276 | | AM_RANGE(0x2800, 0x2800) AM_READ_PORT("COINS") AM_WRITENOP // rw |
| 276 | AM_RANGE(0x2800, 0x2800) AM_READ_PORT("COINS") AM_WRITENOP // rw |
277 | 277 | |
278 | 278 | AM_RANGE(0x2801, 0x2801) AM_READ_PORT("DSW4") |
279 | 279 | AM_RANGE(0x2c00, 0x2c00) AM_READ_PORT("DSW3") |
r248551 | r248552 | |
281 | 281 | AM_RANGE(0x3400, 0x3400) AM_READWRITE(iox_r, iox_w) |
282 | 282 | AM_RANGE(0x3401, 0x3401) AM_READ(iox_status_r) |
283 | 283 | |
284 | | AM_RANGE(0x3000, 0x3000) AM_RAM // rw, comm in test mode |
285 | | AM_RANGE(0x3001, 0x3001) AM_RAM // rw, "" |
| 284 | AM_RANGE(0x3000, 0x3000) AM_RAM // rw, comm in test mode |
| 285 | AM_RANGE(0x3001, 0x3001) AM_RAM // rw, "" |
286 | 286 | |
287 | 287 | AM_RANGE(0x3800, 0x3bff) AM_RAM AM_SHARE("commram") |
288 | 288 | |
r248551 | r248552 | |
375 | 375 | Switches 7 & 8 control the payout as follows: |
376 | 376 | |
377 | 377 | Off/Off Off/On On/Off On/On Notes |
378 | | --------------------------------------------------------------------------------------------- |
| 378 | --------------------------------------------------------------------------------------------- |
379 | 379 | Jackpot MB 5000 5000 5000 2000 Ryl Flush bonus at Max Bet |
380 | 380 | Jackpot 2500 2500 2500 1000 Ryl Flush bonus at 5 coins + 500 (or 200) per coin up to Max Bet |
381 | 381 | Mini JP 1500 1500 1000 500 Str Flush bonus at Max Bet |
r248551 | r248552 | |
444 | 444 | 3 of a Kind winning hand Jacks or higher enters Fever Mode |
445 | 445 | You start with a pair of your 3 of a Kind cards & you draw 3 cards each hand. |
446 | 446 | Jacks through Kings get 5 Fever Mode Draws |
447 | | Aces get 15 Fever Mode Draws |
| 447 | Aces get 15 Fever Mode Draws |
448 | 448 | */ |
449 | 449 | PORT_DIPNAME( 0x20, 0x20, "Fever Mode" ) PORT_DIPLOCATION("SW3:6") |
450 | 450 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) |
r248551 | r248552 | |
455 | 455 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
456 | 456 | |
457 | 457 | PORT_START("DSW4") |
458 | | PORT_DIPUNKNOWN_DIPLOC( 0x01, 0x01, "SW4:7" ) // X in service mode |
459 | | PORT_DIPUNKNOWN_DIPLOC( 0x02, 0x02, "SW4:8" ) // "" |
| 458 | PORT_DIPUNKNOWN_DIPLOC( 0x01, 0x01, "SW4:7" ) // X in service mode |
| 459 | PORT_DIPUNKNOWN_DIPLOC( 0x02, 0x02, "SW4:8" ) // "" |
460 | 460 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW4:1") |
461 | 461 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
462 | 462 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
463 | | PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x08, "SW4:2" ) // "Excess switch time" error |
| 463 | PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x08, "SW4:2" ) // "Excess switch time" error |
464 | 464 | PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x10, "SW4:3" ) |
465 | 465 | PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "SW4:4" ) |
466 | 466 | PORT_DIPUNKNOWN_DIPLOC( 0x40, 0x40, "SW4:5" ) |
r248551 | r248552 | |
522 | 522 | static MACHINE_CONFIG_START( thedealr, thedealr_state ) |
523 | 523 | |
524 | 524 | // basic machine hardware |
525 | | MCFG_CPU_ADD("maincpu", R65C02, XTAL_16MHz/8) // 2 MHz? |
| 525 | MCFG_CPU_ADD("maincpu", R65C02, XTAL_16MHz/8) // 2 MHz? |
526 | 526 | MCFG_CPU_PROGRAM_MAP(thedealr) |
527 | 527 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", thedealr_state, thedealr_interrupt, "screen", 0, 1) |
528 | 528 | |
529 | | MCFG_CPU_ADD("subcpu", R65C02, XTAL_16MHz/8) // 2 MHz? |
| 529 | MCFG_CPU_ADD("subcpu", R65C02, XTAL_16MHz/8) // 2 MHz? |
530 | 530 | MCFG_CPU_PROGRAM_MAP(thedealr_sub) |
531 | 531 | MCFG_CPU_VBLANK_INT_DRIVER("screen", thedealr_state, nmi_line_pulse) |
532 | 532 | |
r248551 | r248552 | |
555 | 555 | |
556 | 556 | // sound hardware |
557 | 557 | MCFG_SPEAKER_STANDARD_MONO("mono") |
558 | | MCFG_SOUND_ADD("aysnd", YM2149, XTAL_16MHz/8) // 2 MHz? |
| 558 | MCFG_SOUND_ADD("aysnd", YM2149, XTAL_16MHz/8) // 2 MHz? |
559 | 559 | MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW2")) |
560 | 560 | MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW1")) |
561 | 561 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
trunk/src/mame/machine/s32comm.c
r248551 | r248552 | |
18 | 18 | | |---------------------------------| | |
19 | 19 | | |---------------------------------| LED CN? CN? CNK | |
20 | 20 | |--------------------------------------------------------------------------------| |
21 | | Setup: |
22 | | Z80 - Zilog Z0840004PSC Z80 CPU, running at 4.000MHz (DIP40) |
23 | | MB89237A - Fujitsu MB89237A DMA-Controller (DIP20) [most likely i8237A clone] |
24 | | MB89374 - Fujitsu MB89374 Data Link Controller (SDIP42) |
25 | | MB8464 - Fujitsu MB8464 8k x8 SRAM (DIP28) |
26 | | MB8421 - Fujitsu MB8421-12LP 2k x8 SRAM (SDIP52) |
| 21 | Setup: |
| 22 | Z80 - Zilog Z0840004PSC Z80 CPU, running at 4.000MHz (DIP40) |
| 23 | MB89237A - Fujitsu MB89237A DMA-Controller (DIP20) [most likely i8237A clone] |
| 24 | MB89374 - Fujitsu MB89374 Data Link Controller (SDIP42) |
| 25 | MB8464 - Fujitsu MB8464 8k x8 SRAM (DIP28) |
| 26 | MB8421 - Fujitsu MB8421-12LP 2k x8 SRAM (SDIP52) |
27 | 27 | |
28 | | Board: |
29 | | 837-9409 F1 Super Lap |
| 28 | Board: |
| 29 | 837-9409 F1 Super Lap |
30 | 30 | |
31 | | EEPROM: |
32 | | 14084.17 Rad Rally |
33 | | 15612.17 F1 Super Lap |
| 31 | EEPROM: |
| 32 | 14084.17 Rad Rally |
| 33 | 15612.17 F1 Super Lap |
34 | 34 | |
35 | 35 | Sega System Multi32 Comm PCB 837-8792-91 |
36 | 36 | ( http://images.arianchen.de/sega-comm/orunners-front.jpg ) |
r248551 | r248552 | |
49 | 49 | | |---------------------------------| |---------------------------------| | |
50 | 50 | | CN8 CN9 | |
51 | 51 | |--------------------------------------------------------------------------------| |
52 | | Setup: |
53 | | 15033.17 - INTEL D27C100 128k x8 EPROM (DIP32, labelled 'EPR-15033') |
54 | | Z80 - Zilog Z0840004PSC Z80 CPU, running at 4.000MHz (DIP40) |
55 | | MB89237A - Fujitsu MB89237A DMA-Controller (DIP20) [most likely i8237A clone] |
56 | | MB89374 - Fujitsu MB89374 Data Link Controller (SDIP42) |
57 | | MB8421 - Fujitsu MB8421-12LP 2k x8 SRAM (SDIP52) |
58 | | MB8464A - Fujitsu MB8464-10LL 8k x8 SRAM (DIP28) |
59 | | 315-5611 - Lattice GAL16V8A PAL (DIP20) |
60 | | 315-5506 - Lattice GAL16V8A PAL (DIP20) |
| 52 | Setup: |
| 53 | 15033.17 - INTEL D27C100 128k x8 EPROM (DIP32, labelled 'EPR-15033') |
| 54 | Z80 - Zilog Z0840004PSC Z80 CPU, running at 4.000MHz (DIP40) |
| 55 | MB89237A - Fujitsu MB89237A DMA-Controller (DIP20) [most likely i8237A clone] |
| 56 | MB89374 - Fujitsu MB89374 Data Link Controller (SDIP42) |
| 57 | MB8421 - Fujitsu MB8421-12LP 2k x8 SRAM (SDIP52) |
| 58 | MB8464A - Fujitsu MB8464-10LL 8k x8 SRAM (DIP28) |
| 59 | 315-5611 - Lattice GAL16V8A PAL (DIP20) |
| 60 | 315-5506 - Lattice GAL16V8A PAL (DIP20) |
61 | 61 | |
62 | | Board: |
63 | | 837-8792 OutRunners, Stadium Cross |
| 62 | Board: |
| 63 | 837-8792 OutRunners, Stadium Cross |
64 | 64 | |
65 | | EEPROM: |
66 | | 15033.17 OutRunners, Stadium Cross |
| 65 | EEPROM: |
| 66 | 15033.17 OutRunners, Stadium Cross |
67 | 67 | */ |
68 | 68 | |
69 | 69 | #include "machine/s32comm.h" |
r248551 | r248552 | |
198 | 198 | m_linkalive = 0x00; |
199 | 199 | m_linkcount = 0x00; |
200 | 200 | m_linktimer = 0x04; //0x00E8; // 58 fps * 4s |
201 | | |
| 201 | |
202 | 202 | comm_tick(); |
203 | 203 | } |
204 | 204 | #endif |
r248551 | r248552 | |
213 | 213 | { |
214 | 214 | if (!m_cn) |
215 | 215 | return; |
216 | | |
| 216 | |
217 | 217 | m_fg = data & 0x01; |
218 | 218 | } |
219 | 219 | |
r248551 | r248552 | |
229 | 229 | void s32comm_device::set_linktype(UINT16 linktype) |
230 | 230 | { |
231 | 231 | m_linktype = linktype; |
232 | | |
| 232 | |
233 | 233 | switch (m_linktype) |
234 | 234 | { |
235 | 235 | case 14084: |
r248551 | r248552 | |
268 | 268 | |
269 | 269 | void s32comm_device::comm_tick_14084() |
270 | 270 | { |
271 | | if (m_linkenable == 0x01) |
| 271 | if (m_linkenable == 0x01) |
272 | 272 | { |
273 | 273 | int frameStart = 0x0480; |
274 | 274 | int frameOffset = 0x0000; |
r248551 | r248552 | |
287 | 287 | { |
288 | 288 | // waiting... |
289 | 289 | m_shared[4] = 0x00; |
290 | | |
| 290 | |
291 | 291 | // check rx socket |
292 | 292 | if (!m_line_rx.is_open()) |
293 | 293 | { |
294 | 294 | printf("S32COMM: listen on %s\n", m_localhost); |
295 | 295 | m_line_rx.open(m_localhost); |
296 | 296 | } |
297 | | |
| 297 | |
298 | 298 | // check tx socket |
299 | 299 | if (!m_line_tx.is_open()) |
300 | 300 | { |
301 | 301 | printf("S32COMM: connect to %s\n", m_remotehost); |
302 | 302 | m_line_tx.open(m_remotehost); |
303 | 303 | } |
304 | | |
| 304 | |
305 | 305 | // if both sockets are there check ring |
306 | 306 | if ((m_line_rx.is_open()) && (m_line_tx.is_open())) |
307 | 307 | { |
r248551 | r248552 | |
338 | 338 | m_line_tx.write(m_buffer, dataSize); |
339 | 339 | } |
340 | 340 | } |
341 | | |
| 341 | |
342 | 342 | // 0xFE - link size |
343 | 343 | else if (idx == 0xFE) |
344 | 344 | { |
r248551 | r248552 | |
349 | 349 | // slave and relay forward message |
350 | 350 | m_line_tx.write(m_buffer, dataSize); |
351 | 351 | } |
352 | | |
| 352 | |
353 | 353 | // consider it done |
354 | 354 | printf("S32COMM: link established - id %02x of %02x\n", m_linkid, m_linkcount); |
355 | 355 | m_linkalive = 0x01; |
356 | | |
| 356 | |
357 | 357 | // write to shared mem |
358 | 358 | m_shared[4] = 0x01; |
359 | 359 | m_shared[1] = m_linkid; |
r248551 | r248552 | |
371 | 371 | } |
372 | 372 | printf("S32COMM: droped a message...\n"); |
373 | 373 | } |
374 | | |
| 374 | |
375 | 375 | if (m_linkalive == 0x00) |
376 | 376 | recv = m_line_rx.read(m_buffer, dataSize); |
377 | 377 | else |
378 | 378 | recv = 0; |
379 | 379 | } |
380 | | |
| 380 | |
381 | 381 | // if we are master and link is not yet established |
382 | 382 | if (isMaster && (m_linkalive == 0x00)) |
383 | 383 | { |
r248551 | r248552 | |
405 | 405 | m_shared[1] = m_linkid; |
406 | 406 | m_shared[0] = m_linkcount; |
407 | 407 | } |
408 | | |
| 408 | |
409 | 409 | else if (m_linktimer > 0x02) |
410 | 410 | { |
411 | 411 | // decrease delay timer |
r248551 | r248552 | |
415 | 415 | } |
416 | 416 | } |
417 | 417 | } |
418 | | } |
| 418 | } |
419 | 419 | |
420 | 420 | // update "ring buffer" if link established |
421 | 421 | if (m_linkalive == 0x01) |
r248551 | r248552 | |
470 | 470 | } |
471 | 471 | recv = m_line_rx.read(m_buffer, dataSize); |
472 | 472 | } |
473 | | |
| 473 | |
474 | 474 | // update "ring buffer" if link established |
475 | 475 | // live relay does not send data |
476 | 476 | if (m_linkid != 0x00 && m_shared[3] != 0x00) |
r248551 | r248552 | |
486 | 486 | // push message to other nodes |
487 | 487 | m_line_tx.write(m_buffer, dataSize); |
488 | 488 | |
489 | | // master sends some additional status bytes |
| 489 | // master sends some additional status bytes |
490 | 490 | if (isMaster){ |
491 | 491 | m_buffer[0] = 0xF0; |
492 | 492 | for (int j = 0x00 ; j < frameSize ; j++) |
r248551 | r248552 | |
501 | 501 | m_line_tx.write(m_buffer, dataSize); |
502 | 502 | } |
503 | 503 | } |
504 | | |
| 504 | |
505 | 505 | // clear 03 |
506 | 506 | m_shared[3] = 0x00; |
507 | 507 | } |
508 | | } |
| 508 | } |
509 | 509 | } |
510 | 510 | |
511 | 511 | void s32comm_device::comm_tick_15033() |
512 | 512 | { |
513 | | if (m_linkenable == 0x01) |
| 513 | if (m_linkenable == 0x01) |
514 | 514 | { |
515 | 515 | int frameStartTX = 0x0710; |
516 | 516 | int frameStartRX = 0x0010; |
r248551 | r248552 | |
540 | 540 | { |
541 | 541 | // waiting... |
542 | 542 | m_shared[4] = 0x00; |
543 | | |
| 543 | |
544 | 544 | // check rx socket |
545 | 545 | if (!m_line_rx.is_open()) |
546 | 546 | { |
547 | 547 | printf("S32COMM: listen on %s\n", m_localhost); |
548 | 548 | m_line_rx.open(m_localhost); |
549 | 549 | } |
550 | | |
| 550 | |
551 | 551 | // check tx socket |
552 | 552 | if (!m_line_tx.is_open()) |
553 | 553 | { |
554 | 554 | printf("S32COMM: connect to %s\n", m_remotehost); |
555 | 555 | m_line_tx.open(m_remotehost); |
556 | 556 | } |
557 | | |
| 557 | |
558 | 558 | // if both sockets are there check ring |
559 | 559 | if ((m_line_rx.is_open()) && (m_line_tx.is_open())) |
560 | 560 | { |
r248551 | r248552 | |
591 | 591 | m_line_tx.write(m_buffer, dataSize); |
592 | 592 | } |
593 | 593 | } |
594 | | |
| 594 | |
595 | 595 | // 0xFE - link size |
596 | 596 | else if (idx == 0xFE) |
597 | 597 | { |
r248551 | r248552 | |
602 | 602 | // slave and relay forward message |
603 | 603 | m_line_tx.write(m_buffer, dataSize); |
604 | 604 | } |
605 | | |
| 605 | |
606 | 606 | // consider it done |
607 | 607 | printf("S32COMM: link established - id %02x of %02x\n", m_linkid, m_linkcount); |
608 | 608 | m_linkalive = 0x01; |
609 | | |
| 609 | |
610 | 610 | // write to shared mem |
611 | 611 | m_shared[4] = 0x01; |
612 | 612 | m_shared[1] = m_linkid; |
r248551 | r248552 | |
624 | 624 | } |
625 | 625 | printf("S32COMM: droped a message...\n"); |
626 | 626 | } |
627 | | |
| 627 | |
628 | 628 | if (m_linkalive == 0x00) |
629 | 629 | recv = m_line_rx.read(m_buffer, dataSize); |
630 | 630 | else |
631 | 631 | recv = 0; |
632 | 632 | } |
633 | | |
| 633 | |
634 | 634 | // if we are master and link is not yet established |
635 | 635 | if (isMaster && (m_linkalive == 0x00)) |
636 | 636 | { |
r248551 | r248552 | |
658 | 658 | m_shared[1] = m_linkid; |
659 | 659 | m_shared[0] = m_linkcount; |
660 | 660 | } |
661 | | |
| 661 | |
662 | 662 | else if (m_linktimer > 0x02) |
663 | 663 | { |
664 | 664 | // decrease delay timer |
r248551 | r248552 | |
668 | 668 | } |
669 | 669 | } |
670 | 670 | } |
671 | | } |
| 671 | } |
672 | 672 | |
673 | 673 | // update "ring buffer" if link established |
674 | 674 | if (m_linkalive == 0x01) |
r248551 | r248552 | |
723 | 723 | } |
724 | 724 | recv = m_line_rx.read(m_buffer, dataSize); |
725 | 725 | } |
726 | | |
| 726 | |
727 | 727 | // update "ring buffer" if link established |
728 | 728 | // live relay does not send data |
729 | 729 | if (m_linkid != 0x00 && m_shared[3] != 0x00) |
r248551 | r248552 | |
739 | 739 | // push message to other nodes |
740 | 740 | m_line_tx.write(m_buffer, dataSize); |
741 | 741 | |
742 | | // master sends some additional status bytes |
| 742 | // master sends some additional status bytes |
743 | 743 | if (isMaster){ |
744 | 744 | m_buffer[0] = 0xF0; |
745 | 745 | for (int j = 0x00 ; j < frameSize ; j++) |
r248551 | r248552 | |
757 | 757 | // clear 03 |
758 | 758 | m_shared[3] = 0x00; |
759 | 759 | } |
760 | | } |
| 760 | } |
761 | 761 | } |
762 | 762 | |
763 | 763 | void s32comm_device::comm_tick_15612() |
764 | 764 | { |
765 | | if (m_linkenable == 0x01) |
| 765 | if (m_linkenable == 0x01) |
766 | 766 | { |
767 | 767 | int frameStart = 0x0010; |
768 | 768 | int frameOffset = 0x0000; |
r248551 | r248552 | |
781 | 781 | { |
782 | 782 | // waiting... |
783 | 783 | m_shared[0] = 0x05; |
784 | | |
| 784 | |
785 | 785 | // check rx socket |
786 | 786 | if (!m_line_rx.is_open()) |
787 | 787 | { |
788 | 788 | printf("S32COMM: listen on %s\n", m_localhost); |
789 | 789 | m_line_rx.open(m_localhost); |
790 | 790 | } |
791 | | |
| 791 | |
792 | 792 | // check tx socket |
793 | 793 | if (!m_line_tx.is_open()) |
794 | 794 | { |
795 | 795 | printf("S32COMM: connect to %s\n", m_remotehost); |
796 | 796 | m_line_tx.open(m_remotehost); |
797 | 797 | } |
798 | | |
| 798 | |
799 | 799 | // if both sockets are there check ring |
800 | 800 | if ((m_line_rx.is_open()) && (m_line_tx.is_open())) |
801 | 801 | { |
r248551 | r248552 | |
832 | 832 | m_line_tx.write(m_buffer, dataSize); |
833 | 833 | } |
834 | 834 | } |
835 | | |
| 835 | |
836 | 836 | // 0xFE - link size |
837 | 837 | else if (idx == 0xFE) |
838 | 838 | { |
r248551 | r248552 | |
843 | 843 | // slave and relay forward message |
844 | 844 | m_line_tx.write(m_buffer, dataSize); |
845 | 845 | } |
846 | | |
| 846 | |
847 | 847 | // consider it done |
848 | 848 | printf("S32COMM: link established - id %02x of %02x\n", m_linkid, m_linkcount); |
849 | 849 | m_linkalive = 0x01; |
850 | | |
| 850 | |
851 | 851 | // write to shared mem |
852 | 852 | m_shared[0] = 0x01; |
853 | 853 | m_shared[2] = m_linkid; |
r248551 | r248552 | |
865 | 865 | } |
866 | 866 | printf("S32COMM: droped a message...\n"); |
867 | 867 | } |
868 | | |
| 868 | |
869 | 869 | if (m_linkalive == 0x00) |
870 | 870 | recv = m_line_rx.read(m_buffer, dataSize); |
871 | 871 | else |
872 | 872 | recv = 0; |
873 | 873 | } |
874 | | |
| 874 | |
875 | 875 | // if we are master and link is not yet established |
876 | 876 | if (isMaster && (m_linkalive == 0x00)) |
877 | 877 | { |
r248551 | r248552 | |
899 | 899 | m_shared[2] = m_linkid; |
900 | 900 | m_shared[3] = m_linkcount; |
901 | 901 | } |
902 | | |
| 902 | |
903 | 903 | else if (m_linktimer > 0x02) |
904 | 904 | { |
905 | 905 | // decrease delay timer |
r248551 | r248552 | |
909 | 909 | } |
910 | 910 | } |
911 | 911 | } |
912 | | } |
| 912 | } |
913 | 913 | |
914 | 914 | // update "ring buffer" if link established |
915 | 915 | if (m_linkalive == 0x01) |
r248551 | r248552 | |
964 | 964 | } |
965 | 965 | recv = m_line_rx.read(m_buffer, dataSize); |
966 | 966 | } |
967 | | |
| 967 | |
968 | 968 | // update "ring buffer" if link established |
969 | 969 | // live relay does not send data |
970 | 970 | if (m_linkid != 0x00 && m_shared[4] != 0x00) |
r248551 | r248552 | |
980 | 980 | // push message to other nodes |
981 | 981 | m_line_tx.write(m_buffer, dataSize); |
982 | 982 | |
983 | | // master sends some additional status bytes |
| 983 | // master sends some additional status bytes |
984 | 984 | if (isMaster){ |
985 | 985 | m_buffer[0] = 0xF0; |
986 | 986 | for (int j = 0x00 ; j < frameSize ; j++) |
trunk/src/mess/drivers/daruma.c
r248551 | r248552 | |
23 | 23 | class daruma_state : public driver_device |
24 | 24 | { |
25 | 25 | public: |
26 | | daruma_state(const machine_config &mconfig, device_type type, const char *tag) |
27 | | : driver_device(mconfig, type, tag), |
28 | | m_maincpu(*this, "maincpu"), |
| 26 | daruma_state(const machine_config &mconfig, device_type type, const char *tag) |
| 27 | : driver_device(mconfig, type, tag), |
| 28 | m_maincpu(*this, "maincpu"), |
29 | 29 | m_speaker(*this, "speaker") { } |
30 | 30 | |
31 | | DECLARE_WRITE8_MEMBER(port_w); |
32 | | DECLARE_READ8_MEMBER(port_r); |
| 31 | DECLARE_WRITE8_MEMBER(port_w); |
| 32 | DECLARE_READ8_MEMBER(port_r); |
33 | 33 | |
34 | 34 | DECLARE_READ8_MEMBER(dev0_r); |
35 | 35 | DECLARE_WRITE8_MEMBER(dev1_w); |
36 | 36 | DECLARE_WRITE8_MEMBER(dev2_w); |
37 | 37 | DECLARE_READ8_MEMBER(dev4_r); |
38 | | required_device<cpu_device> m_maincpu; |
| 38 | required_device<cpu_device> m_maincpu; |
39 | 39 | required_device<speaker_sound_device> m_speaker; |
40 | | char port0, port1, port2, port3; |
| 40 | char port0, port1, port2, port3; |
41 | 41 | }; |
42 | 42 | |
43 | 43 | WRITE8_MEMBER(daruma_state::port_w) |
44 | 44 | { |
45 | 45 | // printf("port_w: write %02X to PORT (offset=%02X)\n", data, offset); |
46 | | switch(offset) |
47 | | { |
48 | | case MCS51_PORT_P0: port0=data; |
49 | | case MCS51_PORT_P1: port1=data; |
50 | | case MCS51_PORT_P2: port2=data; |
51 | | case MCS51_PORT_P3: port3=data; |
52 | | } |
| 46 | switch(offset) |
| 47 | { |
| 48 | case MCS51_PORT_P0: port0=data; |
| 49 | case MCS51_PORT_P1: port1=data; |
| 50 | case MCS51_PORT_P2: port2=data; |
| 51 | case MCS51_PORT_P3: port3=data; |
| 52 | } |
53 | 53 | } |
54 | 54 | |
55 | 55 | READ8_MEMBER(daruma_state::port_r) |
56 | 56 | { |
57 | | switch(offset) |
58 | | { |
59 | | case MCS51_PORT_P0: printf("port_r: read %02X from PORT0\n", port0); return port0; |
60 | | case MCS51_PORT_P1: printf("port_r: read %02X from PORT1\n", port1); return port1; |
61 | | case MCS51_PORT_P2: printf("port_r: read %02X from PORT2\n", port2); return port2; |
62 | | case MCS51_PORT_P3: printf("port_r: read %02X from PORT3\n", port3); return port3; |
63 | | } |
64 | | return 0; |
| 57 | switch(offset) |
| 58 | { |
| 59 | case MCS51_PORT_P0: printf("port_r: read %02X from PORT0\n", port0); return port0; |
| 60 | case MCS51_PORT_P1: printf("port_r: read %02X from PORT1\n", port1); return port1; |
| 61 | case MCS51_PORT_P2: printf("port_r: read %02X from PORT2\n", port2); return port2; |
| 62 | case MCS51_PORT_P3: printf("port_r: read %02X from PORT3\n", port3); return port3; |
| 63 | } |
| 64 | return 0; |
65 | 65 | } |
66 | 66 | |
67 | 67 | READ8_MEMBER(daruma_state::dev0_r) |
68 | 68 | { |
69 | | return 0xFF; |
| 69 | return 0xFF; |
70 | 70 | } |
71 | 71 | |
72 | 72 | READ8_MEMBER(daruma_state::dev4_r) |
73 | 73 | { |
74 | | return ioport("switches")->read(); |
| 74 | return ioport("switches")->read(); |
75 | 75 | } |
76 | 76 | |
77 | 77 | WRITE8_MEMBER(daruma_state::dev1_w) |
78 | 78 | { |
79 | | //while attempting to identify which bit is used for |
80 | | //controlling the buzzer, here's what I heard from each of |
81 | | //the signals on this address: |
| 79 | //while attempting to identify which bit is used for |
| 80 | //controlling the buzzer, here's what I heard from each of |
| 81 | //the signals on this address: |
82 | 82 | |
83 | | //0x80 serial comm.? (noise) |
84 | | //0x20 LED? (3 clicks) |
85 | | //0x10 LED? (1 click) |
86 | | //0x08 serial comm.? click & noise |
87 | | //0x04 LED? (2 clicks) |
88 | | //0x02 motor control or printer heads? (I hear a series of rhythmic pulses) |
89 | | //0x01 LED? (2 clicks) |
| 83 | //0x80 serial comm.? (noise) |
| 84 | //0x20 LED? (3 clicks) |
| 85 | //0x10 LED? (1 click) |
| 86 | //0x08 serial comm.? click & noise |
| 87 | //0x04 LED? (2 clicks) |
| 88 | //0x02 motor control or printer heads? (I hear a series of rhythmic pulses) |
| 89 | //0x01 LED? (2 clicks) |
90 | 90 | m_speaker->level_w(data & 0x02); |
91 | 91 | } |
92 | 92 | |
93 | 93 | WRITE8_MEMBER(daruma_state::dev2_w) |
94 | 94 | { |
95 | | //while attempting to identify which bit is used for |
96 | | //controlling the buzzer, here's what I heard from each of |
97 | | //the signals on this address: |
| 95 | //while attempting to identify which bit is used for |
| 96 | //controlling the buzzer, here's what I heard from each of |
| 97 | //the signals on this address: |
98 | 98 | |
99 | | //0x80: LED? (3 clicks) |
100 | | //0x40: unused? |
101 | | //0x20: unused? |
102 | | //0x10: low freq brief beep followed by a click |
103 | | //0x08: low freq brief noise followed by a click |
104 | | //0x04: low freq brief beep followed by a click |
105 | | //0x02: low freq brief beep followed by a click |
106 | | //0x01: low freq brief noise |
| 99 | //0x80: LED? (3 clicks) |
| 100 | //0x40: unused? |
| 101 | //0x20: unused? |
| 102 | //0x10: low freq brief beep followed by a click |
| 103 | //0x08: low freq brief noise followed by a click |
| 104 | //0x04: low freq brief beep followed by a click |
| 105 | //0x02: low freq brief beep followed by a click |
| 106 | //0x01: low freq brief noise |
107 | 107 | //m_speaker->level_w(data & 0x01); |
108 | 108 | } |
109 | 109 | |
110 | 110 | static ADDRESS_MAP_START( mem_prg, AS_PROGRAM, 8, daruma_state ) |
111 | | AM_RANGE(0x0000, 0xffff) AM_ROM |
| 111 | AM_RANGE(0x0000, 0xffff) AM_ROM |
112 | 112 | ADDRESS_MAP_END |
113 | 113 | |
114 | 114 | static ADDRESS_MAP_START( mem_io, AS_IO, 8, daruma_state ) |
115 | | AM_RANGE(0x0000, 0x0000) AM_READ(dev0_r) |
116 | | AM_RANGE(0x1000, 0x1000) AM_WRITE(dev1_w) |
| 115 | AM_RANGE(0x0000, 0x0000) AM_READ(dev0_r) |
| 116 | AM_RANGE(0x1000, 0x1000) AM_WRITE(dev1_w) |
117 | 117 | // AM_RANGE(0x2000, 0x2000) AM_WRITE(dev2_w) |
118 | 118 | // AM_RANGE(0x3000, 0x3000) AM_WRITE(dev3_w) |
119 | | AM_RANGE(0x4000, 0x4000) AM_READ(dev4_r) |
120 | | AM_RANGE(0x8000, 0xffff) AM_RAM /* 32K CMOS SRAM (HYUNDAY hy62256a) */ |
121 | | AM_RANGE(MCS51_PORT_P0, MCS51_PORT_P3) AM_READWRITE(port_r, port_w) |
| 119 | AM_RANGE(0x4000, 0x4000) AM_READ(dev4_r) |
| 120 | AM_RANGE(0x8000, 0xffff) AM_RAM /* 32K CMOS SRAM (HYUNDAY hy62256a) */ |
| 121 | AM_RANGE(MCS51_PORT_P0, MCS51_PORT_P3) AM_READWRITE(port_r, port_w) |
122 | 122 | ADDRESS_MAP_END |
123 | 123 | |
124 | 124 | //TODO: These buttons and switches are all guesses. We'll need to further investigate this. |
125 | 125 | static INPUT_PORTS_START( daruma ) |
126 | | PORT_START("buttons") |
127 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Paper A") PORT_CODE(KEYCODE_A) |
128 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Paper B") PORT_CODE(KEYCODE_B) |
| 126 | PORT_START("buttons") |
| 127 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Paper A") PORT_CODE(KEYCODE_A) |
| 128 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Paper B") PORT_CODE(KEYCODE_B) |
129 | 129 | |
130 | | PORT_START("switches") |
131 | | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN) |
132 | | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN) |
133 | | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN) |
134 | | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN) |
135 | | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN) |
136 | | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN) |
137 | | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN) |
138 | | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Limit Switch") PORT_CODE(KEYCODE_S) |
| 130 | PORT_START("switches") |
| 131 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN) |
| 132 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN) |
| 133 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN) |
| 134 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN) |
| 135 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN) |
| 136 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN) |
| 137 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN) |
| 138 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Limit Switch") PORT_CODE(KEYCODE_S) |
139 | 139 | |
140 | 140 | INPUT_PORTS_END |
141 | 141 | |
142 | 142 | static MACHINE_CONFIG_START( daruma, daruma_state ) |
143 | | /* basic machine hardware */ |
144 | | MCFG_CPU_ADD("maincpu", I80C32,11059200) //verified on pcb |
145 | | MCFG_CPU_PROGRAM_MAP(mem_prg) |
146 | | MCFG_CPU_IO_MAP(mem_io) |
| 143 | /* basic machine hardware */ |
| 144 | MCFG_CPU_ADD("maincpu", I80C32,11059200) //verified on pcb |
| 145 | MCFG_CPU_PROGRAM_MAP(mem_prg) |
| 146 | MCFG_CPU_IO_MAP(mem_io) |
147 | 147 | |
148 | 148 | /* sound hardware */ |
149 | 149 | MCFG_SPEAKER_STANDARD_MONO("mono") |
r248551 | r248552 | |
161 | 161 | MACHINE_CONFIG_END |
162 | 162 | |
163 | 163 | ROM_START( ds348 ) |
164 | | ROM_REGION( 0x10000, "maincpu", 0 ) |
165 | | ROM_LOAD( "daruma_ds348_v1_1.rom", 0x0000, 0x10000, CRC(10bf9036) SHA1(d654a13bc582f5384e759ec6fe5309a642bd8e18) ) |
| 164 | ROM_REGION( 0x10000, "maincpu", 0 ) |
| 165 | ROM_LOAD( "daruma_ds348_v1_1.rom", 0x0000, 0x10000, CRC(10bf9036) SHA1(d654a13bc582f5384e759ec6fe5309a642bd8e18) ) |
166 | 166 | ROM_END |
167 | 167 | |
168 | 168 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ |
trunk/src/mess/drivers/force68k.c
r248551 | r248552 | |
1 | 1 | // license:BSD-3-Clause |
2 | | // copyright-holders:Joakim Larsson Edström |
| 2 | // copyright-holders:Joakim Larsson Edstr??m |
3 | 3 | /*************************************************************************** |
4 | 4 | |
5 | 5 | Force SYS68K CPU-1/CPU-6 VME SBC drivers, initially based on the 68ksbc.c |
r248551 | r248552 | |
7 | 7 | 13/06/2015 |
8 | 8 | |
9 | 9 | The info found on the links below is for a later revisions of the board I have |
10 | | but I hope it is somewhat compatible so I can get it up and running at least. |
| 10 | but I hope it is somewhat compatible so I can get it up and running at least. |
11 | 11 | My CPU-1 board has proms from 1983 and no rev markings so probably the original. |
12 | 12 | |
13 | 13 | http://bitsavers.trailing-edge.com/pdf/forceComputers/1988_Force_VMEbus_Products.pdf |
r248551 | r248552 | |
27 | 27 | 0C0 041 - 0C0 043 ACIA (P3) Host |
28 | 28 | 0C0 080 - 0C0 082 ACIA (P4) Terminal |
29 | 29 | 0C0 101 - 0C0 103 ACIA (P5) Remote device (eg serial printer) |
30 | | 0C0 401 - 0C0 42F RTC |
| 30 | 0C0 401 - 0C0 42F RTC |
31 | 31 | OEO 001 - 0E0 035 PI/T (eg centronics printer) |
32 | 32 | OEO 200 - 0E0 2FF FPU |
33 | 33 | OEO 300 - 0E0 300 Reset Off |
r248551 | r248552 | |
59 | 59 | |
60 | 60 | 10. The VMEbus |
61 | 61 | --------------- |
62 | | The implemented VMEbus Interface includes 24 address, 16 data, |
| 62 | The implemented VMEbus Interface includes 24 address, 16 data, |
63 | 63 | 6 address modifier and the asynchronous control signals. |
64 | | A single level bus arbiter is provided to build multi master |
65 | | systems. In addition to the bus arbiter, a separate slave bus |
| 64 | A single level bus arbiter is provided to build multi master |
| 65 | systems. In addition to the bus arbiter, a separate slave bus |
66 | 66 | arbitration allows selection of the arbitration level (0-3). |
67 | 67 | |
68 | | The address modifier range .,Short 110 Access« can be selected |
69 | | via a jumper for variable system generation. The 7 interrupt |
70 | | request levels of the VMEbus are fully supported from the |
71 | | SYS68K1CPU-1 B/D. For multi-processing, each IRQ signal can be |
| 68 | The address modifier range .,Short 110 Access?? can be selected |
| 69 | via a jumper for variable system generation. The 7 interrupt |
| 70 | request levels of the VMEbus are fully supported from the |
| 71 | SYS68K1CPU-1 B/D. For multi-processing, each IRQ signal can be |
72 | 72 | enabled/disabled via a jumper field. |
73 | 73 | |
74 | | Additionally, the SYS68K1CPU-1 B/D supports the ACFAIL, SYSRESET, |
| 74 | Additionally, the SYS68K1CPU-1 B/D supports the ACFAIL, SYSRESET, |
75 | 75 | SYSFAIL and SYSCLK signal (16 MHz). |
76 | 76 | |
77 | 77 | |
78 | 78 | TODO: |
79 | | - Finish 2 x ACIA6850, host and remote interface left, terminal works |
| 79 | - Finish 2 x ACIA6850, host and remote interface left, terminal works |
80 | 80 | - Finish 1 x 68230 Motorola, Parallel Interface / Timer |
81 | 81 | - Connect Port B to a Centronics printer interface |
82 | 82 | - Add 1 x Abort Switch |
83 | | - Add configurable serial connector between ACIA:s and |
| 83 | - Add configurable serial connector between ACIA:s and |
84 | 84 | - Real terminal emulator, ie rs232 "socket" |
85 | 85 | - Debug console |
86 | 86 | - Add VME bus driver |
r248551 | r248552 | |
97 | 97 | |
98 | 98 | #define BAUDGEN_CLOCK XTAL_1_8432MHz |
99 | 99 | /* |
100 | | The baudrate on the Force68k CPU-1 to CPU-6 is generated by a |
101 | | Motorola 14411 bitrate generator, the CPU-6 documents matches the circuits |
102 | | that I could find on the CPU-1 board. Here how I calculated the clock for |
| 100 | The baudrate on the Force68k CPU-1 to CPU-6 is generated by a |
| 101 | Motorola 14411 bitrate generator, the CPU-6 documents matches the circuits |
| 102 | that I could find on the CPU-1 board. Here how I calculated the clock for |
103 | 103 | the factory settings. No need to add selectors until terminal.c supports |
104 | 104 | configurable baudrates. Fortunality CPU-1 was shipped with 9600N8! |
105 | 105 | |
r248551 | r248552 | |
107 | 107 | |
108 | 108 | 3 RS232C interfaces, strap selectable baud rate from 110-9600 or 600-19200 baud |
109 | 109 | |
110 | | Default Jumper Settings of B7: |
| 110 | Default Jumper Settings of B7: |
111 | 111 | -------------------------------- |
112 | 112 | GND 10 - 11 RSA input on 14411 |
113 | 113 | F1 on 14411 1 - 20 Baud selector of the terminal port |
r248551 | r248552 | |
117 | 117 | The RSB input on the 14411 is kept high always so RSA=0, RSB=1 and a 1.8432MHz crystal |
118 | 118 | generates 153600 on the F1 output pin which by default strapping is connected to all |
119 | 119 | three 6850 acias on the board. These can be strapped separatelly to speedup downloads. |
120 | | |
| 120 | |
121 | 121 | The selectable outputs from 14411, F1-F16: |
122 | 122 | X16 RSA=0,RSB=1: 153600, 115200, 76800, 57600, 38400, 28800, 19200, 9600, 4800, 3200, 2153.3, 1758.8, 1200, 921600, 1843000 |
123 | 123 | X64 RSA=1,RSB=1: 614400, 460800, 307200, 230400, 153600, 115200, 76800, 57600, 38400, 28800, 19200, 9600, 4800, 921600, 1843000 |
r248551 | r248552 | |
133 | 133 | public: |
134 | 134 | force68k_state(const machine_config &mconfig, device_type type, const char *tag) : |
135 | 135 | driver_device(mconfig, type, tag), |
136 | | // m_rtc(*this, "rtc") |
137 | | m_maincpu(*this, "maincpu"), |
138 | | m_rtc(*this, "rtc"), |
139 | | m_pit(*this, "pit"), |
140 | | m_aciahost(*this, "aciahost"), |
141 | | m_aciaterm(*this, "aciaterm"), |
142 | | m_aciaremt(*this, "aciaremt") |
| 136 | // m_rtc(*this, "rtc") |
| 137 | m_maincpu(*this, "maincpu"), |
| 138 | m_rtc(*this, "rtc"), |
| 139 | m_pit(*this, "pit"), |
| 140 | m_aciahost(*this, "aciahost"), |
| 141 | m_aciaterm(*this, "aciaterm"), |
| 142 | m_aciaremt(*this, "aciaremt") |
143 | 143 | { |
144 | 144 | } |
145 | 145 | |
r248551 | r248552 | |
162 | 162 | }; |
163 | 163 | |
164 | 164 | static ADDRESS_MAP_START(force68k_mem, AS_PROGRAM, 16, force68k_state) |
165 | | ADDRESS_MAP_UNMAP_HIGH |
166 | | AM_RANGE(0x000000, 0x000007) AM_ROM AM_READ(bootvect_r) /* Vectors mapped from System EPROM */ |
167 | | AM_RANGE(0x000008, 0x01ffff) AM_RAM /* DRAM */ |
168 | | AM_RANGE(0x080000, 0x09ffff) AM_ROM /* System EPROM Area */ |
169 | | // AM_RANGE(0x0a0000, 0x0bffff) AM_ROM /* User EPROM Area */ |
| 165 | ADDRESS_MAP_UNMAP_HIGH |
| 166 | AM_RANGE(0x000000, 0x000007) AM_ROM AM_READ(bootvect_r) /* Vectors mapped from System EPROM */ |
| 167 | AM_RANGE(0x000008, 0x01ffff) AM_RAM /* DRAM */ |
| 168 | AM_RANGE(0x080000, 0x09ffff) AM_ROM /* System EPROM Area */ |
| 169 | // AM_RANGE(0x0a0000, 0x0bffff) AM_ROM /* User EPROM Area */ |
170 | 170 | AM_RANGE(0x0c0040, 0x0c0041) AM_DEVREADWRITE8("aciahost", acia6850_device, status_r, control_w, 0x00ff) |
171 | 171 | AM_RANGE(0x0c0042, 0x0c0043) AM_DEVREADWRITE8("aciahost", acia6850_device, data_r, data_w, 0x00ff) |
172 | 172 | AM_RANGE(0x0c0080, 0x0c0081) AM_DEVREADWRITE8("aciaterm", acia6850_device, status_r, control_w, 0xff00) |
173 | 173 | AM_RANGE(0x0c0082, 0x0c0083) AM_DEVREADWRITE8("aciaterm", acia6850_device, data_r, data_w, 0xff00) |
174 | 174 | AM_RANGE(0x0c0100, 0x0c0101) AM_DEVREADWRITE8("aciaremt", acia6850_device, status_r, control_w, 0x00ff) |
175 | 175 | AM_RANGE(0x0c0102, 0x0c0103) AM_DEVREADWRITE8("aciaremt", acia6850_device, data_r, data_w, 0x00ff) |
176 | | AM_RANGE(0x0c0400, 0x0c042f) AM_DEVREADWRITE8("rtc", mm58167_device, read, write, 0x00ff) |
177 | | AM_RANGE(0x0e0000, 0x0e0035) AM_DEVREADWRITE8("pit", pit68230_device, data_r, data_w, 0x00ff) |
| 176 | AM_RANGE(0x0c0400, 0x0c042f) AM_DEVREADWRITE8("rtc", mm58167_device, read, write, 0x00ff) |
| 177 | AM_RANGE(0x0e0000, 0x0e0035) AM_DEVREADWRITE8("pit", pit68230_device, data_r, data_w, 0x00ff) |
178 | 178 | // AM_RANGE(0x0e0200, 0x0e0380) AM_READWRITE(fpu_r, fpu_w) /* optional FPCP 68881 FPU interface */ |
179 | 179 | // AM_RANGE(0x100000, 0xfeffff) /* VMEbus Rev B addresses (24 bits) */ |
180 | 180 | // AM_RANGE(0xff0000, 0xffffff) /* VMEbus Rev B addresses (16 bits) */ |
r248551 | r248552 | |
190 | 190 | } |
191 | 191 | |
192 | 192 | READ16_MEMBER(force68k_state::bootvect_r) |
193 | | { |
194 | | return m_sysrom[offset]; |
| 193 | { |
| 194 | return m_sysrom[offset]; |
195 | 195 | } |
196 | 196 | |
197 | 197 | WRITE_LINE_MEMBER(force68k_state::write_aciahost_clock) |
198 | | { |
199 | | m_aciahost->write_txc(state); |
| 198 | { |
| 199 | m_aciahost->write_txc(state); |
200 | 200 | m_aciahost->write_rxc(state); |
201 | 201 | } |
202 | 202 | |
203 | 203 | WRITE_LINE_MEMBER(force68k_state::write_aciaterm_clock) |
204 | | { |
205 | | m_aciaterm->write_txc(state); |
| 204 | { |
| 205 | m_aciaterm->write_txc(state); |
206 | 206 | m_aciaterm->write_rxc(state); |
207 | 207 | } |
208 | 208 | |
209 | 209 | WRITE_LINE_MEMBER(force68k_state::write_aciaremt_clock) |
210 | | { |
211 | | m_aciaremt->write_txc(state); |
| 210 | { |
| 211 | m_aciaremt->write_txc(state); |
212 | 212 | m_aciaremt->write_rxc(state); |
213 | 213 | } |
214 | 214 | |
215 | 215 | static MACHINE_CONFIG_START( fccpu1, force68k_state ) |
216 | 216 | /* basic machine hardware */ |
217 | | MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz / 2) |
| 217 | MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz / 2) |
218 | 218 | MCFG_CPU_PROGRAM_MAP(force68k_mem) |
219 | 219 | |
220 | | /* P3/Host Port config */ |
| 220 | /* P3/Host Port config */ |
221 | 221 | MCFG_DEVICE_ADD("aciahost", ACIA6850, 0) |
222 | | MCFG_DEVICE_ADD("aciahost_clock", CLOCK, ACIA_CLOCK) |
| 222 | MCFG_DEVICE_ADD("aciahost_clock", CLOCK, ACIA_CLOCK) |
223 | 223 | MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(force68k_state, write_aciahost_clock)) |
224 | 224 | |
225 | | /* P4/Terminal Port config */ |
| 225 | /* P4/Terminal Port config */ |
226 | 226 | MCFG_DEVICE_ADD("aciaterm", ACIA6850, 0) |
227 | 227 | |
228 | 228 | MCFG_ACIA6850_TXD_HANDLER(DEVWRITELINE("rs232trm", rs232_port_device, write_txd)) |
r248551 | r248552 | |
232 | 232 | MCFG_RS232_RXD_HANDLER(DEVWRITELINE("aciaterm", acia6850_device, write_rxd)) |
233 | 233 | MCFG_RS232_CTS_HANDLER(DEVWRITELINE("aciaterm", acia6850_device, write_cts)) |
234 | 234 | |
235 | | MCFG_DEVICE_ADD("aciaterm_clock", CLOCK, ACIA_CLOCK) |
| 235 | MCFG_DEVICE_ADD("aciaterm_clock", CLOCK, ACIA_CLOCK) |
236 | 236 | MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(force68k_state, write_aciaterm_clock)) |
237 | 237 | |
238 | | /* P5/Remote Port config */ |
| 238 | /* P5/Remote Port config */ |
239 | 239 | MCFG_DEVICE_ADD("aciaremt", ACIA6850, 0) |
240 | 240 | |
241 | 241 | #define PRINTER 0 |
r248551 | r248552 | |
246 | 246 | MCFG_RS232_PORT_ADD("rs232rmt", default_rs232_devices, "printer") |
247 | 247 | MCFG_RS232_RXD_HANDLER(DEVWRITELINE("aciaremt", acia6850_device, write_rxd)) |
248 | 248 | MCFG_RS232_CTS_HANDLER(DEVWRITELINE("aciaremt", acia6850_device, write_cts)) |
249 | | #endif |
| 249 | #endif |
250 | 250 | |
251 | | MCFG_DEVICE_ADD("aciaremt_clock", CLOCK, ACIA_CLOCK) |
| 251 | MCFG_DEVICE_ADD("aciaremt_clock", CLOCK, ACIA_CLOCK) |
252 | 252 | MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(force68k_state, write_aciaterm_clock)) |
253 | 253 | |
254 | 254 | /* RTC Real Time Clock device */ |
255 | 255 | MCFG_DEVICE_ADD("rtc", MM58167, XTAL_32_768kHz) |
256 | 256 | |
257 | 257 | /* PIT Parallel Interface and Timer device, assuming strapped for on board clock */ |
258 | | MCFG_DEVICE_ADD("pit", PIT68230, XTAL_16MHz / 2) |
| 258 | MCFG_DEVICE_ADD("pit", PIT68230, XTAL_16MHz / 2) |
259 | 259 | |
260 | 260 | MACHINE_CONFIG_END |
261 | 261 | |
r248551 | r248552 | |
291 | 291 | ROM_START( fccpu1 ) |
292 | 292 | ROM_REGION(0x1000000, "maincpu", 0) |
293 | 293 | |
294 | | ROM_LOAD16_BYTE( "fccpu1V1.0L.j8.bin", 0x080001, 0x2000, CRC(3ac6f08f) SHA1(502f6547b508d8732bd68bbbb2402d8c30fefc3b) ) |
295 | | ROM_LOAD16_BYTE( "fccpu1V1.0L.j9.bin", 0x080000, 0x2000, CRC(035315fb) SHA1(90dc44d9c25d28428233e6846da6edce2d69e440) ) |
296 | | /* COMMAND SUMMARY DESCRIPTION (From CPU-1B datasheet, ROMs were dumped |
| 294 | ROM_LOAD16_BYTE( "fccpu1V1.0L.j8.bin", 0x080001, 0x2000, CRC(3ac6f08f) SHA1(502f6547b508d8732bd68bbbb2402d8c30fefc3b) ) |
| 295 | ROM_LOAD16_BYTE( "fccpu1V1.0L.j9.bin", 0x080000, 0x2000, CRC(035315fb) SHA1(90dc44d9c25d28428233e6846da6edce2d69e440) ) |
| 296 | /* COMMAND SUMMARY DESCRIPTION (From CPU-1B datasheet, ROMs were dumped |
297 | 297 | from a CPU-1 board so some features might be missing or different) |
298 | 298 | --------------------------------------------------------------------------- |
299 | 299 | BF <address1> <address2> <data> <CR> Block Fill memory - from addr1 through addr2 with data |
r248551 | r248552 | |
309 | 309 | GT <address> <CR> Exec prog: temporary breakpoint |
310 | 310 | HE<CR> Help; display monitor commands |
311 | 311 | LO [n] [;<options] <CR> Load Object file |
312 | | MD <address> [<count» <CR> Memory Display |
313 | | MM <address> [<data» [;<options» <CR> Memory Modify |
| 312 | MD <address> [<count?? <CR> Memory Display |
| 313 | MM <address> [<data?? [;<options?? <CR> Memory Modify |
314 | 314 | MS <address> <data1 > <data2> < ... <CR> Memory Set - starting at addr with data 1. data 2 ... |
315 | 315 | NOBR [<address> ... ] <CR> Remove Breakpoint |
316 | 316 | NOPA <CR> Printer Detach (Centronics on PIT/P2) |
r248551 | r248552 | |
318 | 318 | PA <CR> Printer Attach (Centronics on PIT/P2) |
319 | 319 | PF[n] <CR> Set/display Port Format |
320 | 320 | RM <CR> Register Modify |
321 | | TM [<exit character» <CR> Transparent Mode |
| 321 | TM [<exit character?? <CR> Transparent Mode |
322 | 322 | TR [<count] <CR> Trace |
323 | 323 | TT <address> <CR> Trace: temporary breakpoint |
324 | 324 | VE [n] [<string] <CR> Verify memory/object file |
trunk/src/mess/drivers/hp64k.c
r248551 | r248552 | |
6 | 6 | // *************************************** |
7 | 7 | // |
8 | 8 | // Documentation used for this driver: |
9 | | // [1] HP, manual 64100-90910, dec 83 rev. - Model 64100A mainframe service manual |
| 9 | // [1] HP, manual 64100-90910, dec 83 rev. - Model 64100A mainframe service manual |
10 | 10 | // [2] HP, manual 64941-90902, apr 83 rev. - Model 64941A Flexible disc (Floppy) drive |
11 | 11 | // controller service manual |
12 | 12 | // |
13 | 13 | // A 64100A system ("mainframe" in HP docs) is built around a 13 slot card cage. |
14 | 14 | // The first 4 slots are reserved for specific card types: |
15 | | // J1 I/O card |
16 | | // J2 Display and RAM card |
17 | | // J3 CPU card |
18 | | // J4 Floppy interface card |
| 15 | // J1 I/O card |
| 16 | // J2 Display and RAM card |
| 17 | // J3 CPU card |
| 18 | // J4 Floppy interface card |
19 | 19 | // |
20 | 20 | // The rest of the slots are for CPU emulators, logic analyzers and so on (i.e. those |
21 | 21 | // cards doing the main functions of a development system). |
r248551 | r248552 | |
35 | 35 | // CPU card (64100-66521 or 64100-66532) |
36 | 36 | // |
37 | 37 | // This board holds the HP custom CPU with its massive heatsink, the BIOS roms and little else. |
38 | | // U30 5061-3011 HP "hybrid" CPU @ 6.25 MHz |
| 38 | // U30 5061-3011 HP "hybrid" CPU @ 6.25 MHz |
39 | 39 | // U8 |
40 | 40 | // U9 |
41 | 41 | // U10 |
r248551 | r248552 | |
43 | 43 | // U18 |
44 | 44 | // U19 |
45 | 45 | // U20 |
46 | | // U21 2732 16kw of BIOS EPROMs |
| 46 | // U21 2732 16kw of BIOS EPROMs |
47 | 47 | // |
48 | 48 | // ********** |
49 | 49 | // I/O card (64100-66520) |
r248551 | r248552 | |
59 | 59 | // exponentially decaying envelope (a bell sound) whereas in the emulation it's inside a |
60 | 60 | // simple rectangular envelope. |
61 | 61 | // |
62 | | //*U20 HP "PHI" Custom HP-IB interface microcontroller |
63 | | //*U28 i8251 RS232 UART |
| 62 | //*U20 HP "PHI" Custom HP-IB interface microcontroller |
| 63 | //*U28 i8251 RS232 UART |
64 | 64 | // |
65 | 65 | // ********** |
66 | 66 | // Display card (64100-66530) |
r248551 | r248552 | |
72 | 72 | // CRTC is designed to refresh the whole DRAM in parallel. For some mysterious reason the first |
73 | 73 | // display row is always blanked (its 40 words of RAM are even used for the stack!). |
74 | 74 | // |
75 | | // U33 i8275 CRT controller |
76 | | // U60 2716 Character generator ROM |
| 75 | // U33 i8275 CRT controller |
| 76 | // U60 2716 Character generator ROM |
77 | 77 | // U23-U30 |
78 | | // U38-U45 HM4864 64 kw of DRAM |
| 78 | // U38-U45 HM4864 64 kw of DRAM |
79 | 79 | // |
80 | 80 | // ********** |
81 | 81 | // Floppy I/F card (64941-66501) |
r248551 | r248552 | |
87 | 87 | // I tried to reverse engineer the FSM by looking at the schematics and applying some sensible |
88 | 88 | // assumptions. Then I did a sort of "clean room" re-implementation. It appears to work correctly. |
89 | 89 | // |
90 | | // U4 FD1791A Floppy disk controller |
| 90 | // U4 FD1791A Floppy disk controller |
91 | 91 | // |
92 | 92 | // A brief summary of the reverse-engineered interface of this card follows. |
93 | 93 | // |
r248551 | r248552 | |
162 | 162 | #define BIT_MASK(n) (1U << (n)) |
163 | 163 | |
164 | 164 | // Macros to clear/set single bits |
165 | | #define BIT_CLR(w , n) ((w) &= ~BIT_MASK(n)) |
166 | | #define BIT_SET(w , n) ((w) |= BIT_MASK(n)) |
| 165 | #define BIT_CLR(w , n) ((w) &= ~BIT_MASK(n)) |
| 166 | #define BIT_SET(w , n) ((w) |= BIT_MASK(n)) |
167 | 167 | |
168 | 168 | class hp64k_state : public driver_device |
169 | 169 | { |
r248551 | r248552 | |
256 | 256 | UINT8 m_slot_map; |
257 | 257 | |
258 | 258 | // Floppy I/F |
259 | | UINT8 m_floppy_in_latch_msb; // U23 |
260 | | UINT8 m_floppy_in_latch_lsb; // U38 |
261 | | UINT8 m_floppy_out_latch_msb; // U22 |
262 | | UINT8 m_floppy_out_latch_lsb; // U37 |
263 | | UINT8 m_floppy_if_ctrl; // U24 |
| 259 | UINT8 m_floppy_in_latch_msb; // U23 |
| 260 | UINT8 m_floppy_in_latch_lsb; // U38 |
| 261 | UINT8 m_floppy_out_latch_msb; // U22 |
| 262 | UINT8 m_floppy_out_latch_lsb; // U37 |
| 263 | UINT8 m_floppy_if_ctrl; // U24 |
264 | 264 | bool m_floppy_dmaen; |
265 | 265 | bool m_floppy_dmai; |
266 | 266 | bool m_floppy_mdci; |
r248551 | r248552 | |
268 | 268 | bool m_floppy_drq; |
269 | 269 | bool m_floppy0_wpt; |
270 | 270 | bool m_floppy1_wpt; |
271 | | UINT8 m_floppy_drv_ctrl; // U39 |
272 | | UINT8 m_floppy_status; // U25 |
| 271 | UINT8 m_floppy_drv_ctrl; // U39 |
| 272 | UINT8 m_floppy_status; // U25 |
273 | 273 | |
274 | 274 | typedef enum { |
275 | 275 | HP64K_FLPST_IDLE, |
r248551 | r248552 | |
293 | 293 | static ADDRESS_MAP_START(cpu_io_map , AS_IO , 16 , hp64k_state) |
294 | 294 | // PA = 0, IC = [0..3] |
295 | 295 | // Keyboard input |
296 | | AM_RANGE(HP_MAKE_IOADDR(0 , 0) , HP_MAKE_IOADDR(0 , 3)) AM_READ(hp64k_kb_r) |
| 296 | AM_RANGE(HP_MAKE_IOADDR(0 , 0) , HP_MAKE_IOADDR(0 , 3)) AM_READ(hp64k_kb_r) |
297 | 297 | // PA = 2, IC = [0..3] |
298 | 298 | // Line sync interrupt clear/watchdog reset |
299 | | AM_RANGE(HP_MAKE_IOADDR(2 , 0) , HP_MAKE_IOADDR(2 , 3)) AM_READWRITE(hp64k_deltat_r , hp64k_deltat_w) |
| 299 | AM_RANGE(HP_MAKE_IOADDR(2 , 0) , HP_MAKE_IOADDR(2 , 3)) AM_READWRITE(hp64k_deltat_r , hp64k_deltat_w) |
300 | 300 | // PA = 4, IC = [0..3] |
301 | 301 | // Floppy I/F |
302 | | AM_RANGE(HP_MAKE_IOADDR(4 , 0) , HP_MAKE_IOADDR(4 , 3)) AM_READWRITE(hp64k_flp_r , hp64k_flp_w) |
| 302 | AM_RANGE(HP_MAKE_IOADDR(4 , 0) , HP_MAKE_IOADDR(4 , 3)) AM_READWRITE(hp64k_flp_r , hp64k_flp_w) |
303 | 303 | // PA = 6, IC = [0..3] |
304 | 304 | // Read from USART |
305 | | AM_RANGE(HP_MAKE_IOADDR(6 , 0) , HP_MAKE_IOADDR(6 , 3)) AM_READ(hp64k_usart_r) |
| 305 | AM_RANGE(HP_MAKE_IOADDR(6 , 0) , HP_MAKE_IOADDR(6 , 3)) AM_READ(hp64k_usart_r) |
306 | 306 | // PA = 7, IC = 2 |
307 | 307 | // Rear-panel switches |
308 | | AM_RANGE(HP_MAKE_IOADDR(7 , 2) , HP_MAKE_IOADDR(7 , 2)) AM_READ(hp64k_rear_sw_r) |
| 308 | AM_RANGE(HP_MAKE_IOADDR(7 , 2) , HP_MAKE_IOADDR(7 , 2)) AM_READ(hp64k_rear_sw_r) |
309 | 309 | // PA = 9, IC = [0..3] |
310 | 310 | // Beeper control & interrupt status read |
311 | | AM_RANGE(HP_MAKE_IOADDR(9 , 0) , HP_MAKE_IOADDR(9 , 3)) AM_WRITE(hp64k_beep_w) |
| 311 | AM_RANGE(HP_MAKE_IOADDR(9 , 0) , HP_MAKE_IOADDR(9 , 3)) AM_WRITE(hp64k_beep_w) |
312 | 312 | // PA = 10, IC = [0..3] |
313 | 313 | // Slot selection |
314 | 314 | AM_RANGE(HP_MAKE_IOADDR(10 , 0) , HP_MAKE_IOADDR(10 , 3)) AM_WRITE(hp64k_slot_sel_w) |
r248551 | r248552 | |
922 | 922 | // column = [0..15] |
923 | 923 | // row = [0..7] |
924 | 924 | PORT_START("KEY0") |
925 | | PORT_BIT(BIT_MASK(0) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_SHIFT_2) |
926 | | PORT_BIT(BIT_MASK(1) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A') |
927 | | PORT_BIT(BIT_MASK(2) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_W) PORT_CHAR('w') PORT_CHAR('W') |
928 | | PORT_BIT(BIT_MASK(3) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_E) PORT_CHAR('e') PORT_CHAR('E') |
929 | | PORT_BIT(BIT_MASK(4) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_R) PORT_CHAR('r') PORT_CHAR('R') |
930 | | PORT_BIT(BIT_MASK(5) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_T) PORT_CHAR('t') PORT_CHAR('T') |
931 | | PORT_BIT(BIT_MASK(6) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_Y) PORT_CHAR('y') PORT_CHAR('Y') |
932 | | PORT_BIT(BIT_MASK(7) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_U) PORT_CHAR('u') PORT_CHAR('U') |
933 | | PORT_BIT(BIT_MASK(8) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_I) PORT_CHAR('i') PORT_CHAR('I') |
| 925 | PORT_BIT(BIT_MASK(0) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_SHIFT_2) |
| 926 | PORT_BIT(BIT_MASK(1) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A') |
| 927 | PORT_BIT(BIT_MASK(2) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_W) PORT_CHAR('w') PORT_CHAR('W') |
| 928 | PORT_BIT(BIT_MASK(3) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_E) PORT_CHAR('e') PORT_CHAR('E') |
| 929 | PORT_BIT(BIT_MASK(4) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_R) PORT_CHAR('r') PORT_CHAR('R') |
| 930 | PORT_BIT(BIT_MASK(5) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_T) PORT_CHAR('t') PORT_CHAR('T') |
| 931 | PORT_BIT(BIT_MASK(6) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_Y) PORT_CHAR('y') PORT_CHAR('Y') |
| 932 | PORT_BIT(BIT_MASK(7) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_U) PORT_CHAR('u') PORT_CHAR('U') |
| 933 | PORT_BIT(BIT_MASK(8) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_I) PORT_CHAR('i') PORT_CHAR('I') |
934 | 934 | PORT_BIT(BIT_MASK(9) , IP_ACTIVE_HIGH , IPT_UNUSED) |
935 | 935 | PORT_BIT(BIT_MASK(10) , IP_ACTIVE_HIGH , IPT_UNUSED) |
936 | 936 | PORT_BIT(BIT_MASK(11) , IP_ACTIVE_HIGH , IPT_UNUSED) |
r248551 | r248552 | |
938 | 938 | PORT_BIT(BIT_MASK(13) , IP_ACTIVE_HIGH , IPT_UNUSED) |
939 | 939 | PORT_BIT(BIT_MASK(14) , IP_ACTIVE_HIGH , IPT_UNUSED) |
940 | 940 | PORT_BIT(BIT_MASK(15) , IP_ACTIVE_HIGH , IPT_UNUSED) |
941 | | PORT_BIT(BIT_MASK(16) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_TAB) PORT_CHAR('\t') |
942 | | PORT_BIT(BIT_MASK(17) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q') |
| 941 | PORT_BIT(BIT_MASK(16) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_TAB) PORT_CHAR('\t') |
| 942 | PORT_BIT(BIT_MASK(17) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q') |
943 | 943 | PORT_BIT(BIT_MASK(18) , IP_ACTIVE_HIGH , IPT_UNUSED) |
944 | 944 | PORT_BIT(BIT_MASK(19) , IP_ACTIVE_HIGH , IPT_UNUSED) |
945 | 945 | PORT_BIT(BIT_MASK(20) , IP_ACTIVE_HIGH , IPT_UNUSED) |
946 | 946 | PORT_BIT(BIT_MASK(21) , IP_ACTIVE_HIGH , IPT_UNUSED) |
947 | | PORT_BIT(BIT_MASK(22) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('\'') |
948 | | PORT_BIT(BIT_MASK(23) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('(') |
949 | | PORT_BIT(BIT_MASK(24) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR(')') |
950 | | PORT_BIT(BIT_MASK(25) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0') |
951 | | PORT_BIT(BIT_MASK(26) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('=') |
952 | | PORT_BIT(BIT_MASK(27) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('^') PORT_CHAR('~') |
953 | | PORT_BIT(BIT_MASK(28) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_TILDE) PORT_CHAR('\\') PORT_CHAR('|') |
954 | | PORT_BIT(BIT_MASK(29) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8) |
| 947 | PORT_BIT(BIT_MASK(22) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('\'') |
| 948 | PORT_BIT(BIT_MASK(23) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('(') |
| 949 | PORT_BIT(BIT_MASK(24) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR(')') |
| 950 | PORT_BIT(BIT_MASK(25) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0') |
| 951 | PORT_BIT(BIT_MASK(26) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('=') |
| 952 | PORT_BIT(BIT_MASK(27) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('^') PORT_CHAR('~') |
| 953 | PORT_BIT(BIT_MASK(28) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_TILDE) PORT_CHAR('\\') PORT_CHAR('|') |
| 954 | PORT_BIT(BIT_MASK(29) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8) |
955 | 955 | PORT_BIT(BIT_MASK(30) , IP_ACTIVE_HIGH , IPT_UNUSED) |
956 | 956 | PORT_BIT(BIT_MASK(31) , IP_ACTIVE_HIGH , IPT_UNUSED) |
957 | 957 | |
958 | 958 | PORT_START("KEY1") |
959 | | PORT_BIT(BIT_MASK(0) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!') |
960 | | PORT_BIT(BIT_MASK(1) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('"') |
961 | | PORT_BIT(BIT_MASK(2) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#') |
962 | | PORT_BIT(BIT_MASK(3) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$') |
963 | | PORT_BIT(BIT_MASK(4) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%') |
964 | | PORT_BIT(BIT_MASK(5) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('&') |
| 959 | PORT_BIT(BIT_MASK(0) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!') |
| 960 | PORT_BIT(BIT_MASK(1) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('"') |
| 961 | PORT_BIT(BIT_MASK(2) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#') |
| 962 | PORT_BIT(BIT_MASK(3) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$') |
| 963 | PORT_BIT(BIT_MASK(4) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%') |
| 964 | PORT_BIT(BIT_MASK(5) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('&') |
965 | 965 | PORT_BIT(BIT_MASK(6) , IP_ACTIVE_HIGH , IPT_UNUSED) |
966 | 966 | PORT_BIT(BIT_MASK(7) , IP_ACTIVE_HIGH , IPT_UNUSED) |
967 | 967 | PORT_BIT(BIT_MASK(8) , IP_ACTIVE_HIGH , IPT_UNUSED) |
968 | 968 | PORT_BIT(BIT_MASK(9) , IP_ACTIVE_HIGH , IPT_UNUSED) |
969 | 969 | PORT_BIT(BIT_MASK(10) , IP_ACTIVE_HIGH , IPT_UNUSED) |
970 | 970 | PORT_BIT(BIT_MASK(11) , IP_ACTIVE_HIGH , IPT_UNUSED) |
971 | | PORT_BIT(BIT_MASK(12) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_F9) PORT_NAME("RECALL") |
972 | | PORT_BIT(BIT_MASK(13) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_F10) PORT_NAME("CLRLINE") |
973 | | PORT_BIT(BIT_MASK(14) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_F11) PORT_NAME("CAPS") |
974 | | PORT_BIT(BIT_MASK(15) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_F12) PORT_NAME("RESET") |
975 | | PORT_BIT(BIT_MASK(16) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_F1) PORT_NAME("SK1") |
976 | | PORT_BIT(BIT_MASK(17) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_F2) PORT_NAME("SK2") |
| 971 | PORT_BIT(BIT_MASK(12) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_F9) PORT_NAME("RECALL") |
| 972 | PORT_BIT(BIT_MASK(13) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_F10) PORT_NAME("CLRLINE") |
| 973 | PORT_BIT(BIT_MASK(14) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_F11) PORT_NAME("CAPS") |
| 974 | PORT_BIT(BIT_MASK(15) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_F12) PORT_NAME("RESET") |
| 975 | PORT_BIT(BIT_MASK(16) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_F1) PORT_NAME("SK1") |
| 976 | PORT_BIT(BIT_MASK(17) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_F2) PORT_NAME("SK2") |
977 | 977 | PORT_BIT(BIT_MASK(18) , IP_ACTIVE_HIGH , IPT_UNUSED) |
978 | | PORT_BIT(BIT_MASK(19) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_F3) PORT_NAME("SK3") |
979 | | PORT_BIT(BIT_MASK(20) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_F4) PORT_NAME("SK4") |
| 978 | PORT_BIT(BIT_MASK(19) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_F3) PORT_NAME("SK3") |
| 979 | PORT_BIT(BIT_MASK(20) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_F4) PORT_NAME("SK4") |
980 | 980 | PORT_BIT(BIT_MASK(21) , IP_ACTIVE_HIGH , IPT_UNUSED) |
981 | 981 | PORT_BIT(BIT_MASK(22) , IP_ACTIVE_HIGH , IPT_UNUSED) |
982 | | PORT_BIT(BIT_MASK(23) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_F5) PORT_NAME("SK5") |
983 | | PORT_BIT(BIT_MASK(24) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_F6) PORT_NAME("SK6") |
984 | | PORT_BIT(BIT_MASK(25) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_F7) PORT_NAME("SK7") |
| 982 | PORT_BIT(BIT_MASK(23) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_F5) PORT_NAME("SK5") |
| 983 | PORT_BIT(BIT_MASK(24) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_F6) PORT_NAME("SK6") |
| 984 | PORT_BIT(BIT_MASK(25) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_F7) PORT_NAME("SK7") |
985 | 985 | PORT_BIT(BIT_MASK(26) , IP_ACTIVE_HIGH , IPT_UNUSED) |
986 | | PORT_BIT(BIT_MASK(27) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_F8) PORT_NAME("SK8") |
| 986 | PORT_BIT(BIT_MASK(27) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_F8) PORT_NAME("SK8") |
987 | 987 | PORT_BIT(BIT_MASK(28) , IP_ACTIVE_HIGH , IPT_UNUSED) |
988 | 988 | PORT_BIT(BIT_MASK(29) , IP_ACTIVE_HIGH , IPT_UNUSED) |
989 | 989 | PORT_BIT(BIT_MASK(30) , IP_ACTIVE_HIGH , IPT_UNUSED) |
990 | 990 | PORT_BIT(BIT_MASK(31) , IP_ACTIVE_HIGH , IPT_UNUSED) |
991 | 991 | |
992 | 992 | PORT_START("KEY2") |
993 | | PORT_BIT(BIT_MASK(0) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1) |
| 993 | PORT_BIT(BIT_MASK(0) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1) |
994 | 994 | PORT_BIT(BIT_MASK(1) , IP_ACTIVE_HIGH , IPT_UNUSED) |
995 | | PORT_BIT(BIT_MASK(2) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_S) PORT_CHAR('s') PORT_CHAR('S') |
996 | | PORT_BIT(BIT_MASK(3) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_D) PORT_CHAR('d') PORT_CHAR('D') |
997 | | PORT_BIT(BIT_MASK(4) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_F) PORT_CHAR('f') PORT_CHAR('F') |
998 | | PORT_BIT(BIT_MASK(5) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_G) PORT_CHAR('g') PORT_CHAR('G') |
999 | | PORT_BIT(BIT_MASK(6) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_H) PORT_CHAR('h') PORT_CHAR('H') |
| 995 | PORT_BIT(BIT_MASK(2) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_S) PORT_CHAR('s') PORT_CHAR('S') |
| 996 | PORT_BIT(BIT_MASK(3) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_D) PORT_CHAR('d') PORT_CHAR('D') |
| 997 | PORT_BIT(BIT_MASK(4) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_F) PORT_CHAR('f') PORT_CHAR('F') |
| 998 | PORT_BIT(BIT_MASK(5) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_G) PORT_CHAR('g') PORT_CHAR('G') |
| 999 | PORT_BIT(BIT_MASK(6) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_H) PORT_CHAR('h') PORT_CHAR('H') |
1000 | 1000 | PORT_BIT(BIT_MASK(7) , IP_ACTIVE_HIGH , IPT_UNUSED) |
1001 | 1001 | PORT_BIT(BIT_MASK(8) , IP_ACTIVE_HIGH , IPT_UNUSED) |
1002 | | PORT_BIT(BIT_MASK(9) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O') |
1003 | | PORT_BIT(BIT_MASK(10) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P') |
| 1002 | PORT_BIT(BIT_MASK(9) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O') |
| 1003 | PORT_BIT(BIT_MASK(10) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P') |
1004 | 1004 | PORT_BIT(BIT_MASK(11) , IP_ACTIVE_HIGH , IPT_UNUSED) |
1005 | 1005 | PORT_BIT(BIT_MASK(12) , IP_ACTIVE_HIGH , IPT_UNUSED) |
1006 | 1006 | PORT_BIT(BIT_MASK(13) , IP_ACTIVE_HIGH , IPT_UNUSED) |
1007 | | PORT_BIT(BIT_MASK(14) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_INSERT) PORT_NAME("INSCHAR") |
1008 | | PORT_BIT(BIT_MASK(15) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_DEL) PORT_NAME("DELCHAR") |
| 1007 | PORT_BIT(BIT_MASK(14) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_INSERT) PORT_NAME("INSCHAR") |
| 1008 | PORT_BIT(BIT_MASK(15) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_DEL) PORT_NAME("DELCHAR") |
1009 | 1009 | PORT_BIT(BIT_MASK(16) , IP_ACTIVE_HIGH , IPT_UNUSED) |
1010 | 1010 | PORT_BIT(BIT_MASK(17) , IP_ACTIVE_HIGH , IPT_UNUSED) |
1011 | | PORT_BIT(BIT_MASK(18) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z') |
1012 | | PORT_BIT(BIT_MASK(19) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('X') |
1013 | | PORT_BIT(BIT_MASK(20) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_C) PORT_CHAR('c') PORT_CHAR('C') |
| 1011 | PORT_BIT(BIT_MASK(18) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z') |
| 1012 | PORT_BIT(BIT_MASK(19) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('X') |
| 1013 | PORT_BIT(BIT_MASK(20) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_C) PORT_CHAR('c') PORT_CHAR('C') |
1014 | 1014 | PORT_BIT(BIT_MASK(21) , IP_ACTIVE_HIGH , IPT_UNUSED) |
1015 | 1015 | PORT_BIT(BIT_MASK(22) , IP_ACTIVE_HIGH , IPT_UNUSED) |
1016 | | PORT_BIT(BIT_MASK(23) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_J) PORT_CHAR('j') PORT_CHAR('J') |
| 1016 | PORT_BIT(BIT_MASK(23) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_J) PORT_CHAR('j') PORT_CHAR('J') |
1017 | 1017 | PORT_BIT(BIT_MASK(24) , IP_ACTIVE_HIGH , IPT_UNUSED) |
1018 | 1018 | PORT_BIT(BIT_MASK(25) , IP_ACTIVE_HIGH , IPT_UNUSED) |
1019 | | PORT_BIT(BIT_MASK(26) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('@') PORT_CHAR('`') |
1020 | | PORT_BIT(BIT_MASK(27) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR('[') PORT_CHAR('{') |
1021 | | PORT_BIT(BIT_MASK(28) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH2) PORT_CHAR('_') PORT_CHAR(UCHAR_MAMEKEY(DEL)) |
1022 | | PORT_BIT(BIT_MASK(29) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_HOME) PORT_NAME("ROLLUP") |
1023 | | PORT_BIT(BIT_MASK(30) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP)) |
1024 | | PORT_BIT(BIT_MASK(31) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_PGDN) PORT_NAME("NEXTPG") |
| 1019 | PORT_BIT(BIT_MASK(26) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('@') PORT_CHAR('`') |
| 1020 | PORT_BIT(BIT_MASK(27) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR('[') PORT_CHAR('{') |
| 1021 | PORT_BIT(BIT_MASK(28) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH2) PORT_CHAR('_') PORT_CHAR(UCHAR_MAMEKEY(DEL)) |
| 1022 | PORT_BIT(BIT_MASK(29) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_HOME) PORT_NAME("ROLLUP") |
| 1023 | PORT_BIT(BIT_MASK(30) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP)) |
| 1024 | PORT_BIT(BIT_MASK(31) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_PGDN) PORT_NAME("NEXTPG") |
1025 | 1025 | |
1026 | 1026 | PORT_START("KEY3") |
1027 | 1027 | PORT_BIT(BIT_MASK(0) , IP_ACTIVE_HIGH , IPT_UNUSED) |
r248551 | r248552 | |
1029 | 1029 | PORT_BIT(BIT_MASK(2) , IP_ACTIVE_HIGH , IPT_UNUSED) |
1030 | 1030 | PORT_BIT(BIT_MASK(3) , IP_ACTIVE_HIGH , IPT_UNUSED) |
1031 | 1031 | PORT_BIT(BIT_MASK(4) , IP_ACTIVE_HIGH , IPT_UNUSED) |
1032 | | PORT_BIT(BIT_MASK(5) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_V) PORT_CHAR('v') PORT_CHAR('V') |
1033 | | PORT_BIT(BIT_MASK(6) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_CHAR('b') PORT_CHAR('B') |
| 1032 | PORT_BIT(BIT_MASK(5) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_V) PORT_CHAR('v') PORT_CHAR('V') |
| 1033 | PORT_BIT(BIT_MASK(6) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_CHAR('b') PORT_CHAR('B') |
1034 | 1034 | PORT_BIT(BIT_MASK(7) , IP_ACTIVE_HIGH , IPT_UNUSED) |
1035 | | PORT_BIT(BIT_MASK(8) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_K) PORT_CHAR('k') PORT_CHAR('K') |
1036 | | PORT_BIT(BIT_MASK(9) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_L) PORT_CHAR('l') PORT_CHAR('L') |
1037 | | PORT_BIT(BIT_MASK(10) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR('+') |
1038 | | PORT_BIT(BIT_MASK(11) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(':') PORT_CHAR('*') |
1039 | | PORT_BIT(BIT_MASK(12) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR(']') PORT_CHAR('}') |
1040 | | PORT_BIT(BIT_MASK(13) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13) |
| 1035 | PORT_BIT(BIT_MASK(8) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_K) PORT_CHAR('k') PORT_CHAR('K') |
| 1036 | PORT_BIT(BIT_MASK(9) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_L) PORT_CHAR('l') PORT_CHAR('L') |
| 1037 | PORT_BIT(BIT_MASK(10) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR('+') |
| 1038 | PORT_BIT(BIT_MASK(11) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(':') PORT_CHAR('*') |
| 1039 | PORT_BIT(BIT_MASK(12) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR(']') PORT_CHAR('}') |
| 1040 | PORT_BIT(BIT_MASK(13) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13) |
1041 | 1041 | PORT_BIT(BIT_MASK(14) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT)) |
1042 | 1042 | PORT_BIT(BIT_MASK(15) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) |
1043 | 1043 | PORT_BIT(BIT_MASK(16) , IP_ACTIVE_HIGH , IPT_UNUSED) |
r248551 | r248552 | |
1057 | 1057 | PORT_BIT(BIT_MASK(30) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN)) |
1058 | 1058 | PORT_BIT(BIT_MASK(31) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_PGUP) PORT_NAME("PREVPG") |
1059 | 1059 | |
1060 | | PORT_START("rear_sw") |
1061 | | PORT_DIPNAME(0x8000 , 0x8000 , "E9-6 jumper") |
1062 | | PORT_DIPSETTING(0x0000 , DEF_STR(Yes)) |
1063 | | PORT_DIPSETTING(0x8000 , DEF_STR(No)) |
1064 | | PORT_DIPNAME(0x4000 , 0x4000 , "E9-5 jumper") |
1065 | | PORT_DIPSETTING(0x0000 , DEF_STR(Yes)) |
1066 | | PORT_DIPSETTING(0x4000 , DEF_STR(No)) |
1067 | | PORT_DIPNAME(0x2000 , 0x2000 , "E9-4 jumper") |
1068 | | PORT_DIPSETTING(0x0000 , DEF_STR(Yes)) |
1069 | | PORT_DIPSETTING(0x2000 , DEF_STR(No)) |
1070 | | PORT_DIPNAME(0x1000 , 0x1000 , "E9-3 jumper") |
1071 | | PORT_DIPSETTING(0x0000 , DEF_STR(Yes)) |
1072 | | PORT_DIPSETTING(0x1000 , DEF_STR(No)) |
1073 | | PORT_DIPNAME(0x0800 , 0x0800 , "E9-2 jumper") |
1074 | | PORT_DIPSETTING(0x0000 , DEF_STR(Yes)) |
1075 | | PORT_DIPSETTING(0x0800 , DEF_STR(No)) |
1076 | | PORT_DIPNAME(0x0400 , 0x0400 , "E9-1 jumper") |
1077 | | PORT_DIPSETTING(0x0000 , DEF_STR(Yes)) |
1078 | | PORT_DIPSETTING(0x0400 , DEF_STR(No)) |
1079 | | PORT_DIPNAME(0x0018 , 0x0000 , "System source") |
1080 | | PORT_DIPLOCATION("S1:!7,!6") |
1081 | | PORT_DIPSETTING(0x0000 , "Sys bus") |
1082 | | PORT_DIPSETTING(0x0008 , "Local storage-talk only") |
1083 | | PORT_DIPSETTING(0x0010 , "Local storage-addressable") |
1084 | | PORT_DIPSETTING(0x0018 , "Performance verification") |
1085 | | PORT_DIPNAME(0x0300 , 0x0000 , "Upper bus address (N/U)") |
1086 | | PORT_DIPLOCATION("S1:!2,!1") |
1087 | | PORT_DIPSETTING(0x0000 , "0") |
1088 | | PORT_DIPSETTING(0x0100 , "1") |
1089 | | PORT_DIPSETTING(0x0200 , "2") |
1090 | | PORT_DIPSETTING(0x0300 , "3") |
1091 | | PORT_DIPNAME(0x0007 , 0x0000 , "System bus address") |
1092 | | PORT_DIPLOCATION("S1:!5,!4,!3") |
1093 | | PORT_DIPSETTING(0x0000 , "0") |
1094 | | PORT_DIPSETTING(0x0001 , "1") |
1095 | | PORT_DIPSETTING(0x0002 , "2") |
1096 | | PORT_DIPSETTING(0x0003 , "3") |
1097 | | PORT_DIPSETTING(0x0004 , "4") |
1098 | | PORT_DIPSETTING(0x0005 , "5") |
1099 | | PORT_DIPSETTING(0x0006 , "6") |
1100 | | PORT_DIPSETTING(0x0007 , "7") |
1101 | | PORT_DIPNAME(0x0080 , 0x0000 , "RS232 mode") |
1102 | | PORT_DIPLOCATION("S4 IO:!8") |
1103 | | PORT_DIPSETTING(0x0000 , "Terminal") |
1104 | | PORT_DIPSETTING(0x0080 , "Modem") |
| 1060 | PORT_START("rear_sw") |
| 1061 | PORT_DIPNAME(0x8000 , 0x8000 , "E9-6 jumper") |
| 1062 | PORT_DIPSETTING(0x0000 , DEF_STR(Yes)) |
| 1063 | PORT_DIPSETTING(0x8000 , DEF_STR(No)) |
| 1064 | PORT_DIPNAME(0x4000 , 0x4000 , "E9-5 jumper") |
| 1065 | PORT_DIPSETTING(0x0000 , DEF_STR(Yes)) |
| 1066 | PORT_DIPSETTING(0x4000 , DEF_STR(No)) |
| 1067 | PORT_DIPNAME(0x2000 , 0x2000 , "E9-4 jumper") |
| 1068 | PORT_DIPSETTING(0x0000 , DEF_STR(Yes)) |
| 1069 | PORT_DIPSETTING(0x2000 , DEF_STR(No)) |
| 1070 | PORT_DIPNAME(0x1000 , 0x1000 , "E9-3 jumper") |
| 1071 | PORT_DIPSETTING(0x0000 , DEF_STR(Yes)) |
| 1072 | PORT_DIPSETTING(0x1000 , DEF_STR(No)) |
| 1073 | PORT_DIPNAME(0x0800 , 0x0800 , "E9-2 jumper") |
| 1074 | PORT_DIPSETTING(0x0000 , DEF_STR(Yes)) |
| 1075 | PORT_DIPSETTING(0x0800 , DEF_STR(No)) |
| 1076 | PORT_DIPNAME(0x0400 , 0x0400 , "E9-1 jumper") |
| 1077 | PORT_DIPSETTING(0x0000 , DEF_STR(Yes)) |
| 1078 | PORT_DIPSETTING(0x0400 , DEF_STR(No)) |
| 1079 | PORT_DIPNAME(0x0018 , 0x0000 , "System source") |
| 1080 | PORT_DIPLOCATION("S1:!7,!6") |
| 1081 | PORT_DIPSETTING(0x0000 , "Sys bus") |
| 1082 | PORT_DIPSETTING(0x0008 , "Local storage-talk only") |
| 1083 | PORT_DIPSETTING(0x0010 , "Local storage-addressable") |
| 1084 | PORT_DIPSETTING(0x0018 , "Performance verification") |
| 1085 | PORT_DIPNAME(0x0300 , 0x0000 , "Upper bus address (N/U)") |
| 1086 | PORT_DIPLOCATION("S1:!2,!1") |
| 1087 | PORT_DIPSETTING(0x0000 , "0") |
| 1088 | PORT_DIPSETTING(0x0100 , "1") |
| 1089 | PORT_DIPSETTING(0x0200 , "2") |
| 1090 | PORT_DIPSETTING(0x0300 , "3") |
| 1091 | PORT_DIPNAME(0x0007 , 0x0000 , "System bus address") |
| 1092 | PORT_DIPLOCATION("S1:!5,!4,!3") |
| 1093 | PORT_DIPSETTING(0x0000 , "0") |
| 1094 | PORT_DIPSETTING(0x0001 , "1") |
| 1095 | PORT_DIPSETTING(0x0002 , "2") |
| 1096 | PORT_DIPSETTING(0x0003 , "3") |
| 1097 | PORT_DIPSETTING(0x0004 , "4") |
| 1098 | PORT_DIPSETTING(0x0005 , "5") |
| 1099 | PORT_DIPSETTING(0x0006 , "6") |
| 1100 | PORT_DIPSETTING(0x0007 , "7") |
| 1101 | PORT_DIPNAME(0x0080 , 0x0000 , "RS232 mode") |
| 1102 | PORT_DIPLOCATION("S4 IO:!8") |
| 1103 | PORT_DIPSETTING(0x0000 , "Terminal") |
| 1104 | PORT_DIPSETTING(0x0080 , "Modem") |
1105 | 1105 | |
1106 | | PORT_START("rs232_sw") |
1107 | | PORT_DIPNAME(0xc0 , 0x00 , "Stop bits") |
1108 | | PORT_DIPLOCATION("S4 IO:!2,!1") |
1109 | | PORT_DIPSETTING(0x00 , "Invalid") |
1110 | | PORT_DIPSETTING(0x40 , "1") |
1111 | | PORT_DIPSETTING(0x80 , "1.5") |
1112 | | PORT_DIPSETTING(0xc0 , "2") |
1113 | | PORT_DIPNAME(0x20 , 0x00 , "Parity") |
1114 | | PORT_DIPLOCATION("S4 IO:!3") |
1115 | | PORT_DIPSETTING(0x00 , "Odd") |
1116 | | PORT_DIPSETTING(0x20 , "Even") |
1117 | | PORT_DIPNAME(0x10 , 0x00 , "Parity enable") |
1118 | | PORT_DIPLOCATION("S4 IO:!4") |
1119 | | PORT_DIPSETTING(0x00 , DEF_STR(No)) |
1120 | | PORT_DIPSETTING(0x10 , DEF_STR(Yes)) |
1121 | | PORT_DIPNAME(0x0c , 0x00 , "Char length") |
1122 | | PORT_DIPLOCATION("S4 IO:!6,!5") |
1123 | | PORT_DIPSETTING(0x00 , "5") |
1124 | | PORT_DIPSETTING(0x04 , "6") |
1125 | | PORT_DIPSETTING(0x08 , "7") |
1126 | | PORT_DIPSETTING(0x0c , "8") |
1127 | | PORT_DIPNAME(0x02 , 0x00 , "Baud rate factor") |
1128 | | PORT_DIPLOCATION("S4 IO:!7") |
1129 | | PORT_DIPSETTING(0x00 , "1x") |
1130 | | PORT_DIPSETTING(0x02 , "16x") |
| 1106 | PORT_START("rs232_sw") |
| 1107 | PORT_DIPNAME(0xc0 , 0x00 , "Stop bits") |
| 1108 | PORT_DIPLOCATION("S4 IO:!2,!1") |
| 1109 | PORT_DIPSETTING(0x00 , "Invalid") |
| 1110 | PORT_DIPSETTING(0x40 , "1") |
| 1111 | PORT_DIPSETTING(0x80 , "1.5") |
| 1112 | PORT_DIPSETTING(0xc0 , "2") |
| 1113 | PORT_DIPNAME(0x20 , 0x00 , "Parity") |
| 1114 | PORT_DIPLOCATION("S4 IO:!3") |
| 1115 | PORT_DIPSETTING(0x00 , "Odd") |
| 1116 | PORT_DIPSETTING(0x20 , "Even") |
| 1117 | PORT_DIPNAME(0x10 , 0x00 , "Parity enable") |
| 1118 | PORT_DIPLOCATION("S4 IO:!4") |
| 1119 | PORT_DIPSETTING(0x00 , DEF_STR(No)) |
| 1120 | PORT_DIPSETTING(0x10 , DEF_STR(Yes)) |
| 1121 | PORT_DIPNAME(0x0c , 0x00 , "Char length") |
| 1122 | PORT_DIPLOCATION("S4 IO:!6,!5") |
| 1123 | PORT_DIPSETTING(0x00 , "5") |
| 1124 | PORT_DIPSETTING(0x04 , "6") |
| 1125 | PORT_DIPSETTING(0x08 , "7") |
| 1126 | PORT_DIPSETTING(0x0c , "8") |
| 1127 | PORT_DIPNAME(0x02 , 0x00 , "Baud rate factor") |
| 1128 | PORT_DIPLOCATION("S4 IO:!7") |
| 1129 | PORT_DIPSETTING(0x00 , "1x") |
| 1130 | PORT_DIPSETTING(0x02 , "16x") |
1131 | 1131 | |
1132 | 1132 | INPUT_PORTS_END |
1133 | 1133 | |
1134 | 1134 | static SLOT_INTERFACE_START(hp64k_floppies) |
1135 | | SLOT_INTERFACE("525dd" , FLOPPY_525_DD) |
| 1135 | SLOT_INTERFACE("525dd" , FLOPPY_525_DD) |
1136 | 1136 | SLOT_INTERFACE_END |
1137 | 1137 | |
1138 | 1138 | static MACHINE_CONFIG_START(hp64k , hp64k_state) |
r248551 | r248552 | |
1145 | 1145 | // Actual keyboard refresh rate should be between 1 and 2 kHz |
1146 | 1146 | MCFG_TIMER_DRIVER_ADD_PERIODIC("kb_timer" , hp64k_state , hp64k_kb_scan , attotime::from_hz(100)) |
1147 | 1147 | |
1148 | | // Line sync timer. A line frequency of 50 Hz is assumed. |
1149 | | MCFG_TIMER_DRIVER_ADD_PERIODIC("linesync_timer" , hp64k_state , hp64k_line_sync , attotime::from_hz(50)) |
| 1148 | // Line sync timer. A line frequency of 50 Hz is assumed. |
| 1149 | MCFG_TIMER_DRIVER_ADD_PERIODIC("linesync_timer" , hp64k_state , hp64k_line_sync , attotime::from_hz(50)) |
1150 | 1150 | |
1151 | 1151 | // Clock = 25 MHz / 9 * (112/114) |
1152 | 1152 | MCFG_DEVICE_ADD("crtc" , I8275 , 2729045) |
r248551 | r248552 | |
1160 | 1160 | MCFG_SCREEN_REFRESH_RATE(60) |
1161 | 1161 | MCFG_PALETTE_ADD_MONOCHROME_GREEN_HIGHLIGHT("palette") |
1162 | 1162 | |
1163 | | MCFG_FD1791_ADD("fdc" , XTAL_4MHz / 4) |
1164 | | MCFG_WD_FDC_FORCE_READY |
1165 | | MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(hp64k_state , hp64k_flp_intrq_w)) |
1166 | | MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(hp64k_state , hp64k_flp_drq_w)) |
1167 | | MCFG_FLOPPY_DRIVE_ADD("fdc:0" , hp64k_floppies , "525dd" , floppy_image_device::default_floppy_formats) |
1168 | | MCFG_SLOT_FIXED(true) |
1169 | | MCFG_FLOPPY_DRIVE_ADD("fdc:1" , hp64k_floppies , "525dd" , floppy_image_device::default_floppy_formats) |
1170 | | MCFG_SLOT_FIXED(true) |
| 1163 | MCFG_FD1791_ADD("fdc" , XTAL_4MHz / 4) |
| 1164 | MCFG_WD_FDC_FORCE_READY |
| 1165 | MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(hp64k_state , hp64k_flp_intrq_w)) |
| 1166 | MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(hp64k_state , hp64k_flp_drq_w)) |
| 1167 | MCFG_FLOPPY_DRIVE_ADD("fdc:0" , hp64k_floppies , "525dd" , floppy_image_device::default_floppy_formats) |
| 1168 | MCFG_SLOT_FIXED(true) |
| 1169 | MCFG_FLOPPY_DRIVE_ADD("fdc:1" , hp64k_floppies , "525dd" , floppy_image_device::default_floppy_formats) |
| 1170 | MCFG_SLOT_FIXED(true) |
1171 | 1171 | |
1172 | | MCFG_DEVICE_ADD("fdc_rdy0" , TTL74123 , 0) |
1173 | | MCFG_TTL74123_CONNECTION_TYPE(TTL74123_NOT_GROUNDED_NO_DIODE) |
1174 | | MCFG_TTL74123_RESISTOR_VALUE(RES_K(68.1)) |
1175 | | // Warning! Duration formula is not correct for LS123, actual capacitor is 10 uF |
1176 | | MCFG_TTL74123_CAPACITOR_VALUE(CAP_U(16)) |
1177 | | MCFG_TTL74123_B_PIN_VALUE(1) |
1178 | | MCFG_TTL74123_CLEAR_PIN_VALUE(1) |
1179 | | MCFG_TTL74123_OUTPUT_CHANGED_CB(WRITE8(hp64k_state , hp64k_floppy0_rdy)); |
| 1172 | MCFG_DEVICE_ADD("fdc_rdy0" , TTL74123 , 0) |
| 1173 | MCFG_TTL74123_CONNECTION_TYPE(TTL74123_NOT_GROUNDED_NO_DIODE) |
| 1174 | MCFG_TTL74123_RESISTOR_VALUE(RES_K(68.1)) |
| 1175 | // Warning! Duration formula is not correct for LS123, actual capacitor is 10 uF |
| 1176 | MCFG_TTL74123_CAPACITOR_VALUE(CAP_U(16)) |
| 1177 | MCFG_TTL74123_B_PIN_VALUE(1) |
| 1178 | MCFG_TTL74123_CLEAR_PIN_VALUE(1) |
| 1179 | MCFG_TTL74123_OUTPUT_CHANGED_CB(WRITE8(hp64k_state , hp64k_floppy0_rdy)); |
1180 | 1180 | |
1181 | | MCFG_DEVICE_ADD("fdc_rdy1" , TTL74123 , 0) |
1182 | | MCFG_TTL74123_CONNECTION_TYPE(TTL74123_NOT_GROUNDED_NO_DIODE) |
1183 | | MCFG_TTL74123_RESISTOR_VALUE(RES_K(68.1)) |
1184 | | MCFG_TTL74123_CAPACITOR_VALUE(CAP_U(16)) |
1185 | | MCFG_TTL74123_B_PIN_VALUE(1) |
1186 | | MCFG_TTL74123_CLEAR_PIN_VALUE(1) |
1187 | | MCFG_TTL74123_OUTPUT_CHANGED_CB(WRITE8(hp64k_state , hp64k_floppy1_rdy)); |
| 1181 | MCFG_DEVICE_ADD("fdc_rdy1" , TTL74123 , 0) |
| 1182 | MCFG_TTL74123_CONNECTION_TYPE(TTL74123_NOT_GROUNDED_NO_DIODE) |
| 1183 | MCFG_TTL74123_RESISTOR_VALUE(RES_K(68.1)) |
| 1184 | MCFG_TTL74123_CAPACITOR_VALUE(CAP_U(16)) |
| 1185 | MCFG_TTL74123_B_PIN_VALUE(1) |
| 1186 | MCFG_TTL74123_CLEAR_PIN_VALUE(1) |
| 1187 | MCFG_TTL74123_OUTPUT_CHANGED_CB(WRITE8(hp64k_state , hp64k_floppy1_rdy)); |
1188 | 1188 | |
1189 | | MCFG_SPEAKER_STANDARD_MONO("mono") |
1190 | | MCFG_SOUND_ADD("beeper" , BEEP , 2500) |
1191 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS , "mono" , 1.00) |
| 1189 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 1190 | MCFG_SOUND_ADD("beeper" , BEEP , 2500) |
| 1191 | MCFG_SOUND_ROUTE(ALL_OUTPUTS , "mono" , 1.00) |
1192 | 1192 | |
1193 | | MCFG_TIMER_DRIVER_ADD("beep_timer" , hp64k_state , hp64k_beeper_off); |
| 1193 | MCFG_TIMER_DRIVER_ADD("beep_timer" , hp64k_state , hp64k_beeper_off); |
1194 | 1194 | MACHINE_CONFIG_END |
1195 | 1195 | |
1196 | 1196 | ROM_START(hp64k) |
trunk/src/mess/drivers/i7000.c
r248551 | r248552 | |
55 | 55 | public: |
56 | 56 | i7000_state(const machine_config &mconfig, device_type type, const char *tag) |
57 | 57 | : driver_device(mconfig, type, tag), |
58 | | m_maincpu(*this, "maincpu"), |
59 | | m_card(*this, "cardslot"), |
60 | | m_gfxdecode(*this, "gfxdecode"), |
61 | | m_videoram(*this, "videoram") |
62 | | { } |
| 58 | m_maincpu(*this, "maincpu"), |
| 59 | m_card(*this, "cardslot"), |
| 60 | m_gfxdecode(*this, "gfxdecode"), |
| 61 | m_videoram(*this, "videoram") |
| 62 | { } |
63 | 63 | |
64 | 64 | void video_start(); |
65 | 65 | void machine_start(); |
r248551 | r248552 | |
92 | 92 | { |
93 | 93 | UINT8 data = 0xff; |
94 | 94 | |
95 | | for (int i=0; i<40*25; i++){ |
96 | | m_bg_tilemap->mark_tile_dirty(i); |
97 | | } |
| 95 | for (int i=0; i<40*25; i++){ |
| 96 | m_bg_tilemap->mark_tile_dirty(i); |
| 97 | } |
98 | 98 | |
99 | 99 | if (m_row < 8) |
100 | 100 | { |
r248551 | r248552 | |
108 | 108 | /* Input ports */ |
109 | 109 | static INPUT_PORTS_START( i7000 ) |
110 | 110 | PORT_START("X0") |
111 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1) |
112 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9) |
113 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("U") PORT_CODE(KEYCODE_U) |
114 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("ESC") PORT_CODE(KEYCODE_ESC) |
115 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("K") PORT_CODE(KEYCODE_K) |
116 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("N") PORT_CODE(KEYCODE_N) |
117 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("!") PORT_CHAR('!') |
118 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("ENTER") PORT_CODE(KEYCODE_ENTER) |
| 111 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1) |
| 112 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9) |
| 113 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("U") PORT_CODE(KEYCODE_U) |
| 114 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("ESC") PORT_CODE(KEYCODE_ESC) |
| 115 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("K") PORT_CODE(KEYCODE_K) |
| 116 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("N") PORT_CODE(KEYCODE_N) |
| 117 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("!") PORT_CHAR('!') |
| 118 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("ENTER") PORT_CODE(KEYCODE_ENTER) |
119 | 119 | |
120 | 120 | PORT_START("X1") |
121 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2) |
122 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0) |
123 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("T") PORT_CODE(KEYCODE_T) |
124 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0x9D") |
125 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("L") PORT_CODE(KEYCODE_L) |
126 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("X") PORT_CODE(KEYCODE_X) |
127 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0x8F") |
128 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("^R DC2") //0x12 |
| 121 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2) |
| 122 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0) |
| 123 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("T") PORT_CODE(KEYCODE_T) |
| 124 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0x9D") |
| 125 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("L") PORT_CODE(KEYCODE_L) |
| 126 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("X") PORT_CODE(KEYCODE_X) |
| 127 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0x8F") |
| 128 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("^R DC2") //0x12 |
129 | 129 | |
130 | 130 | PORT_START("X2") |
131 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("3") PORT_CODE(KEYCODE_3) |
132 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("$ ^") PORT_CHAR('$') PORT_CHAR('^') |
133 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("R") PORT_CODE(KEYCODE_R) |
134 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("S") PORT_CODE(KEYCODE_S) |
135 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0xA0") |
136 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C) |
137 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("- _") PORT_CODE(KEYCODE_MINUS) |
138 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("BACKSPACE") PORT_CODE(KEYCODE_BACKSPACE) |
| 131 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("3") PORT_CODE(KEYCODE_3) |
| 132 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("$ ^") PORT_CHAR('$') PORT_CHAR('^') |
| 133 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("R") PORT_CODE(KEYCODE_R) |
| 134 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("S") PORT_CODE(KEYCODE_S) |
| 135 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0xA0") |
| 136 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C) |
| 137 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("- _") PORT_CODE(KEYCODE_MINUS) |
| 138 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("BACKSPACE") PORT_CODE(KEYCODE_BACKSPACE) |
139 | 139 | |
140 | 140 | PORT_START("X3") |
141 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("4") PORT_CODE(KEYCODE_4) |
142 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("% +") PORT_CHAR('%') PORT_CHAR('+') |
143 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("I") PORT_CODE(KEYCODE_I) |
144 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D) |
145 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0x9C") |
146 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("M") PORT_CODE(KEYCODE_M) |
147 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("]") PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(']') |
148 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("@") PORT_CHAR('@') |
| 141 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("4") PORT_CODE(KEYCODE_4) |
| 142 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("% +") PORT_CHAR('%') PORT_CHAR('+') |
| 143 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("I") PORT_CODE(KEYCODE_I) |
| 144 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D) |
| 145 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0x9C") |
| 146 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("M") PORT_CODE(KEYCODE_M) |
| 147 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("]") PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(']') |
| 148 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("@") PORT_CHAR('@') |
149 | 149 | |
150 | 150 | PORT_START("X4") |
151 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("5 *") PORT_CODE(KEYCODE_5) |
152 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("^U NAK") //0x15 |
153 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("O") PORT_CODE(KEYCODE_O) |
154 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F) |
155 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("| <") PORT_CHAR('<') |
156 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(", ;") PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR(';') |
157 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("[") PORT_CODE(KEYCODE_OPENBRACE) |
158 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("^E ENQ") //0x05 |
| 151 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("5 *") PORT_CODE(KEYCODE_5) |
| 152 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("^U NAK") //0x15 |
| 153 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("O") PORT_CODE(KEYCODE_O) |
| 154 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F) |
| 155 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("| <") PORT_CHAR('<') |
| 156 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(", ;") PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR(';') |
| 157 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("[") PORT_CODE(KEYCODE_OPENBRACE) |
| 158 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("^E ENQ") //0x05 |
159 | 159 | |
160 | 160 | PORT_START("X5") |
161 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6) |
162 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("^O SI") //0x0F |
163 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P") PORT_CODE(KEYCODE_P) |
164 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G") PORT_CODE(KEYCODE_G) |
165 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("J") PORT_CODE(KEYCODE_J) |
166 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(".") PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') |
167 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("#") PORT_CHAR('#') |
168 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("{") PORT_CHAR('{') |
| 161 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6) |
| 162 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("^O SI") //0x0F |
| 163 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P") PORT_CODE(KEYCODE_P) |
| 164 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G") PORT_CODE(KEYCODE_G) |
| 165 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("J") PORT_CODE(KEYCODE_J) |
| 166 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(".") PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') |
| 167 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("#") PORT_CHAR('#') |
| 168 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("{") PORT_CHAR('{') |
169 | 169 | |
170 | 170 | PORT_START("X6") |
171 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_7) |
172 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Q") PORT_CODE(KEYCODE_Q) |
173 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E) |
174 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A) |
175 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("H") PORT_CODE(KEYCODE_H) |
176 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("V") PORT_CODE(KEYCODE_V) |
177 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("^L FF") //0x0C |
178 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("^T DC4") //0x14 |
| 171 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_7) |
| 172 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Q") PORT_CODE(KEYCODE_Q) |
| 173 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E) |
| 174 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A) |
| 175 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("H") PORT_CODE(KEYCODE_H) |
| 176 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("V") PORT_CODE(KEYCODE_V) |
| 177 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("^L FF") //0x0C |
| 178 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("^T DC4") //0x14 |
179 | 179 | |
180 | 180 | PORT_START("X7") |
181 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8) |
182 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("W") PORT_CODE(KEYCODE_W) |
183 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Y") PORT_CODE(KEYCODE_Y) |
184 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(">") PORT_CHAR('>') |
185 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Z") PORT_CODE(KEYCODE_Z) |
186 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B) |
187 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("SPACEBAR") PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') |
188 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("}") PORT_CHAR('}') |
| 181 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8) |
| 182 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("W") PORT_CODE(KEYCODE_W) |
| 183 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Y") PORT_CODE(KEYCODE_Y) |
| 184 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(">") PORT_CHAR('>') |
| 185 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Z") PORT_CODE(KEYCODE_Z) |
| 186 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B) |
| 187 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("SPACEBAR") PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') |
| 188 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("}") PORT_CHAR('}') |
189 | 189 | |
190 | 190 | PORT_START("DSW") /* DP01 */ |
191 | | PORT_DIPNAME( 0x80, 0x80, "1") |
192 | | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) |
193 | | PORT_DIPSETTING( 0x80, DEF_STR( Yes ) ) |
194 | | PORT_DIPNAME( 0x40, 0x40, "2") |
195 | | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) |
196 | | PORT_DIPSETTING( 0x40, DEF_STR( Yes ) ) |
197 | | PORT_DIPNAME( 0x20, 0x00, "3") |
198 | | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) |
199 | | PORT_DIPSETTING( 0x20, DEF_STR( Yes ) ) |
200 | | PORT_DIPNAME( 0x10, 0x10, "4") |
201 | | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) |
202 | | PORT_DIPSETTING( 0x10, DEF_STR( Yes ) ) |
203 | | PORT_DIPNAME( 0x08, 0x08, "5") |
204 | | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) |
205 | | PORT_DIPSETTING( 0x08, DEF_STR( Yes ) ) |
206 | | PORT_DIPNAME( 0x04, 0x04, "6") |
207 | | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) |
208 | | PORT_DIPSETTING( 0x04, DEF_STR( Yes ) ) |
209 | | PORT_DIPNAME( 0x02, 0x00, "7") |
210 | | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) |
211 | | PORT_DIPSETTING( 0x02, DEF_STR( Yes ) ) |
212 | | PORT_DIPNAME( 0x01, 0x01, "8") |
213 | | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) |
214 | | PORT_DIPSETTING( 0x01, DEF_STR( Yes ) ) |
| 191 | PORT_DIPNAME( 0x80, 0x80, "1") |
| 192 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) |
| 193 | PORT_DIPSETTING( 0x80, DEF_STR( Yes ) ) |
| 194 | PORT_DIPNAME( 0x40, 0x40, "2") |
| 195 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) |
| 196 | PORT_DIPSETTING( 0x40, DEF_STR( Yes ) ) |
| 197 | PORT_DIPNAME( 0x20, 0x00, "3") |
| 198 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) |
| 199 | PORT_DIPSETTING( 0x20, DEF_STR( Yes ) ) |
| 200 | PORT_DIPNAME( 0x10, 0x10, "4") |
| 201 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) |
| 202 | PORT_DIPSETTING( 0x10, DEF_STR( Yes ) ) |
| 203 | PORT_DIPNAME( 0x08, 0x08, "5") |
| 204 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) |
| 205 | PORT_DIPSETTING( 0x08, DEF_STR( Yes ) ) |
| 206 | PORT_DIPNAME( 0x04, 0x04, "6") |
| 207 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) |
| 208 | PORT_DIPSETTING( 0x04, DEF_STR( Yes ) ) |
| 209 | PORT_DIPNAME( 0x02, 0x00, "7") |
| 210 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) |
| 211 | PORT_DIPSETTING( 0x02, DEF_STR( Yes ) ) |
| 212 | PORT_DIPNAME( 0x01, 0x01, "8") |
| 213 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) |
| 214 | PORT_DIPSETTING( 0x01, DEF_STR( Yes ) ) |
215 | 215 | INPUT_PORTS_END |
216 | 216 | |
217 | 217 | DRIVER_INIT_MEMBER(i7000_state, i7000) |
r248551 | r248552 | |
238 | 238 | /*FIXME: we still need to figure out the proper memory map |
239 | 239 | for the maincpu and where the cartridge slot maps to. */ |
240 | 240 | static ADDRESS_MAP_START(i7000_mem, AS_PROGRAM, 8, i7000_state) |
241 | | AM_RANGE(0x0000, 0x0fff) AM_ROM AM_REGION("boot", 0) |
242 | | AM_RANGE(0x2000, 0x2fff) AM_RAM AM_SHARE("videoram") |
243 | | AM_RANGE(0x4000, 0xffff) AM_RAM |
| 241 | AM_RANGE(0x0000, 0x0fff) AM_ROM AM_REGION("boot", 0) |
| 242 | AM_RANGE(0x2000, 0x2fff) AM_RAM AM_SHARE("videoram") |
| 243 | AM_RANGE(0x4000, 0xffff) AM_RAM |
244 | 244 | // AM_RANGE(0x4000, 0xbfff) AM_ROM AM_REGION("cardslot", 0) |
245 | 245 | ADDRESS_MAP_END |
246 | 246 | |
247 | 247 | static ADDRESS_MAP_START( i7000_io , AS_IO, 8, i7000_state) |
248 | 248 | ADDRESS_MAP_UNMAP_HIGH |
249 | 249 | ADDRESS_MAP_GLOBAL_MASK (0xff) |
250 | | // AM_RANGE(0x06, 0x06) AM_WRITE(i7000_io_?_w) |
251 | | // AM_RANGE(0x08, 0x09) AM_WRITE(i7000_io_?_w) //printer perhaps? |
252 | | // AM_RANGE(0x0c, 0x0c) AM_WRITE(i7000_io_?_w) //0x0C and 0x10 may be related to mem page swapping. (self-test "4. PAG") |
253 | | // AM_RANGE(0x10, 0x10) AM_WRITE(i7000_io_?_w) |
254 | | // AM_RANGE(0x14, 0x15) AM_WRITE(i7000_io_?_w) |
| 250 | // AM_RANGE(0x06, 0x06) AM_WRITE(i7000_io_?_w) |
| 251 | // AM_RANGE(0x08, 0x09) AM_WRITE(i7000_io_?_w) //printer perhaps? |
| 252 | // AM_RANGE(0x0c, 0x0c) AM_WRITE(i7000_io_?_w) //0x0C and 0x10 may be related to mem page swapping. (self-test "4. PAG") |
| 253 | // AM_RANGE(0x10, 0x10) AM_WRITE(i7000_io_?_w) |
| 254 | // AM_RANGE(0x14, 0x15) AM_WRITE(i7000_io_?_w) |
255 | 255 | |
256 | 256 | AM_RANGE(0x18, 0x1b) AM_DEVREADWRITE("pit8253", pit8253_device, read, write) |
257 | 257 | |
258 | | // AM_RANGE(0x1c, 0x1c) AM_WRITE(i7000_io_printer_data_w) //ASCII data |
| 258 | // AM_RANGE(0x1c, 0x1c) AM_WRITE(i7000_io_printer_data_w) //ASCII data |
259 | 259 | AM_RANGE(0x1d, 0x1d) AM_READ_PORT("DSW") |
260 | | // AM_RANGE(0x1e, 0x1e) AM_READWRITE(i7000_io_printer_status_r, i7000_io_?_w) |
261 | | // AM_RANGE(0x1f, 0x1f) AM_WRITE(i7000_io_printer_strobe_w) //self-test routine writes 0x08 and 0x09 (it seems that bit 0 is the strobe and bit 3 is an enable signal) |
262 | | // AM_RANGE(0x20, 0x21) AM_READWRITE(i7000_io_keyboard_r, i7000_io_keyboard_w) |
| 260 | // AM_RANGE(0x1e, 0x1e) AM_READWRITE(i7000_io_printer_status_r, i7000_io_?_w) |
| 261 | // AM_RANGE(0x1f, 0x1f) AM_WRITE(i7000_io_printer_strobe_w) //self-test routine writes 0x08 and 0x09 (it seems that bit 0 is the strobe and bit 3 is an enable signal) |
| 262 | // AM_RANGE(0x20, 0x21) AM_READWRITE(i7000_io_keyboard_r, i7000_io_keyboard_w) |
263 | 263 | |
264 | 264 | AM_RANGE( 0x20, 0x20 ) AM_DEVREADWRITE("i8279", i8279_device, data_r, data_w) |
265 | 265 | AM_RANGE( 0x21, 0x21 ) AM_DEVREADWRITE("i8279", i8279_device, status_r, cmd_w) |
266 | 266 | |
267 | | // AM_RANGE(0x24, 0x24) AM_READ(i7000_io_?_r) |
268 | | // AM_RANGE(0x25, 0x25) AM_WRITE(i7000_io_?_w) |
| 267 | // AM_RANGE(0x24, 0x24) AM_READ(i7000_io_?_r) |
| 268 | // AM_RANGE(0x25, 0x25) AM_WRITE(i7000_io_?_w) |
269 | 269 | |
270 | | // AM_RANGE(0x28, 0x2d) AM_READWRITE(i7000_io_joystick_r, i7000_io_joystick_w) |
| 270 | // AM_RANGE(0x28, 0x2d) AM_READWRITE(i7000_io_joystick_r, i7000_io_joystick_w) |
271 | 271 | |
272 | | // AM_RANGE(0x3b, 0x3b) AM_WRITE(i7000_io_?_w) |
273 | | // AM_RANGE(0x66, 0x67) AM_WRITE(i7000_io_?_w) |
274 | | // AM_RANGE(0xbb, 0xbb) AM_WRITE(i7000_io_?_w) //may be related to page-swapping... |
| 272 | // AM_RANGE(0x3b, 0x3b) AM_WRITE(i7000_io_?_w) |
| 273 | // AM_RANGE(0x66, 0x67) AM_WRITE(i7000_io_?_w) |
| 274 | // AM_RANGE(0xbb, 0xbb) AM_WRITE(i7000_io_?_w) //may be related to page-swapping... |
275 | 275 | ADDRESS_MAP_END |
276 | 276 | |
277 | 277 | DEVICE_IMAGE_LOAD_MEMBER( i7000_state, i7000_card ) |
r248551 | r248552 | |
358 | 358 | MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) |
359 | 359 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
360 | 360 | |
361 | | /* Programmable timer */ |
| 361 | /* Programmable timer */ |
362 | 362 | MCFG_DEVICE_ADD("pit8253", PIT8253, 0) |
363 | | // MCFG_PIT8253_CLK0(XTAL_4MHz / 2) /* TODO: verify on PCB */ |
364 | | // MCFG_PIT8253_OUT0_HANDLER(WRITELINE(i7000_state,i7000_pit_out0)) |
365 | | // MCFG_PIT8253_CLK1(XTAL_4MHz / 2) /* TODO: verify on PCB */ |
366 | | // MCFG_PIT8253_OUT1_HANDLER(WRITELINE(i7000_state,i7000_pit_out1)) |
| 363 | // MCFG_PIT8253_CLK0(XTAL_4MHz / 2) /* TODO: verify on PCB */ |
| 364 | // MCFG_PIT8253_OUT0_HANDLER(WRITELINE(i7000_state,i7000_pit_out0)) |
| 365 | // MCFG_PIT8253_CLK1(XTAL_4MHz / 2) /* TODO: verify on PCB */ |
| 366 | // MCFG_PIT8253_OUT1_HANDLER(WRITELINE(i7000_state,i7000_pit_out1)) |
367 | 367 | MCFG_PIT8253_CLK2(XTAL_4MHz / 2) /* TODO: verify on PCB */ |
368 | 368 | MCFG_PIT8253_OUT2_HANDLER(DEVWRITELINE("speaker", speaker_sound_device, level_w)) |
369 | 369 | |
trunk/src/mess/drivers/rambo.c
r248551 | r248552 | |
11 | 11 | http://reprap.org/mediawiki/images/7/75/Rambo1-1-schematic.png |
12 | 12 | |
13 | 13 | 3d printers currently supported by this driver: |
14 | | * Metamáquina 2 |
| 14 | * Metam??quina 2 |
15 | 15 | |
16 | 16 | 3d printers known to use this board: |
17 | 17 | * TODO: list them all here |
r248551 | r248552 | |
31 | 31 | class rambo_state : public driver_device |
32 | 32 | { |
33 | 33 | public: |
34 | | rambo_state(const machine_config &mconfig, device_type type, const char *tag) |
35 | | : driver_device(mconfig, type, tag), |
36 | | m_maincpu(*this, "maincpu") |
37 | | { |
38 | | } |
| 34 | rambo_state(const machine_config &mconfig, device_type type, const char *tag) |
| 35 | : driver_device(mconfig, type, tag), |
| 36 | m_maincpu(*this, "maincpu") |
| 37 | { |
| 38 | } |
39 | 39 | |
40 | | UINT8 m_port_a; |
41 | | UINT8 m_port_b; |
42 | | UINT8 m_port_c; |
43 | | UINT8 m_port_d; |
44 | | UINT8 m_port_e; |
45 | | UINT8 m_port_f; |
46 | | UINT8 m_port_g; |
47 | | UINT8 m_port_h; |
48 | | UINT8 m_port_j; |
49 | | UINT8 m_port_k; |
50 | | UINT8 m_port_l; |
51 | | required_device<avr8_device> m_maincpu; |
| 40 | UINT8 m_port_a; |
| 41 | UINT8 m_port_b; |
| 42 | UINT8 m_port_c; |
| 43 | UINT8 m_port_d; |
| 44 | UINT8 m_port_e; |
| 45 | UINT8 m_port_f; |
| 46 | UINT8 m_port_g; |
| 47 | UINT8 m_port_h; |
| 48 | UINT8 m_port_j; |
| 49 | UINT8 m_port_k; |
| 50 | UINT8 m_port_l; |
| 51 | required_device<avr8_device> m_maincpu; |
52 | 52 | |
53 | | DECLARE_READ8_MEMBER(port_r); |
54 | | DECLARE_WRITE8_MEMBER(port_w); |
| 53 | DECLARE_READ8_MEMBER(port_r); |
| 54 | DECLARE_WRITE8_MEMBER(port_w); |
55 | 55 | |
56 | | DECLARE_DRIVER_INIT(rambo); |
57 | | virtual void machine_start(); |
58 | | virtual void machine_reset(); |
| 56 | DECLARE_DRIVER_INIT(rambo); |
| 57 | virtual void machine_start(); |
| 58 | virtual void machine_reset(); |
59 | 59 | }; |
60 | 60 | |
61 | 61 | void rambo_state::machine_start() |
r248551 | r248552 | |
64 | 64 | |
65 | 65 | READ8_MEMBER(rambo_state::port_r) |
66 | 66 | { |
67 | | switch( offset ) |
68 | | { |
69 | | case AVR8_IO_PORTA: |
70 | | { |
| 67 | switch( offset ) |
| 68 | { |
| 69 | case AVR8_IO_PORTA: |
| 70 | { |
71 | 71 | #if LOG_PORTS |
72 | | printf("[%08X] Port A READ \n", m_maincpu->m_shifted_pc); |
| 72 | printf("[%08X] Port A READ \n", m_maincpu->m_shifted_pc); |
73 | 73 | #endif |
74 | | return m_port_a; |
75 | | } |
76 | | default: |
77 | | break; |
78 | | } |
79 | | return 0; |
| 74 | return m_port_a; |
| 75 | } |
| 76 | default: |
| 77 | break; |
| 78 | } |
| 79 | return 0; |
80 | 80 | } |
81 | 81 | |
82 | 82 | WRITE8_MEMBER(rambo_state::port_w) |
83 | 83 | { |
84 | | switch( offset ) |
85 | | { |
86 | | case AVR8_IO_PORTA: |
87 | | { |
88 | | if (data == m_port_a) break; |
| 84 | switch( offset ) |
| 85 | { |
| 86 | case AVR8_IO_PORTA: |
| 87 | { |
| 88 | if (data == m_port_a) break; |
89 | 89 | |
90 | 90 | #if LOG_PORTS |
91 | | UINT8 old_port_a = m_port_a; |
92 | | UINT8 changed = data ^ old_port_a; |
| 91 | UINT8 old_port_a = m_port_a; |
| 92 | UINT8 changed = data ^ old_port_a; |
93 | 93 | #endif |
94 | | m_port_a = data; |
95 | | break; |
96 | | } |
97 | | default: |
98 | | break; |
99 | | } |
| 94 | m_port_a = data; |
| 95 | break; |
| 96 | } |
| 97 | default: |
| 98 | break; |
| 99 | } |
100 | 100 | } |
101 | 101 | |
102 | 102 | /****************************************************\ |
r248551 | r248552 | |
104 | 104 | \****************************************************/ |
105 | 105 | |
106 | 106 | static ADDRESS_MAP_START( rambo_prg_map, AS_PROGRAM, 8, rambo_state ) |
107 | | AM_RANGE(0x0000, 0x1FFFF) AM_ROM |
| 107 | AM_RANGE(0x0000, 0x1FFFF) AM_ROM |
108 | 108 | ADDRESS_MAP_END |
109 | 109 | |
110 | 110 | static ADDRESS_MAP_START( rambo_data_map, AS_DATA, 8, rambo_state ) |
111 | | AM_RANGE(0x0200, 0x21FF) AM_RAM /* ATMEGA2560 Internal SRAM */ |
| 111 | AM_RANGE(0x0200, 0x21FF) AM_RAM /* ATMEGA2560 Internal SRAM */ |
112 | 112 | ADDRESS_MAP_END |
113 | 113 | |
114 | 114 | static ADDRESS_MAP_START( rambo_io_map, AS_IO, 8, rambo_state ) |
115 | | AM_RANGE(AVR8_IO_PORTA, AVR8_IO_PORTL) AM_READWRITE( port_r, port_w ) |
| 115 | AM_RANGE(AVR8_IO_PORTA, AVR8_IO_PORTL) AM_READWRITE( port_r, port_w ) |
116 | 116 | ADDRESS_MAP_END |
117 | 117 | |
118 | 118 | /****************************************************\ |
r248551 | r248552 | |
125 | 125 | |
126 | 126 | void rambo_state::machine_reset() |
127 | 127 | { |
128 | | m_port_a = 0; |
129 | | m_port_b = 0; |
130 | | m_port_c = 0; |
131 | | m_port_d = 0; |
132 | | m_port_e = 0; |
133 | | m_port_f = 0; |
134 | | m_port_g = 0; |
135 | | m_port_h = 0; |
136 | | m_port_j = 0; |
137 | | m_port_k = 0; |
138 | | m_port_l = 0; |
| 128 | m_port_a = 0; |
| 129 | m_port_b = 0; |
| 130 | m_port_c = 0; |
| 131 | m_port_d = 0; |
| 132 | m_port_e = 0; |
| 133 | m_port_f = 0; |
| 134 | m_port_g = 0; |
| 135 | m_port_h = 0; |
| 136 | m_port_j = 0; |
| 137 | m_port_k = 0; |
| 138 | m_port_l = 0; |
139 | 139 | } |
140 | 140 | |
141 | 141 | static MACHINE_CONFIG_START( rambo, rambo_state ) |
142 | 142 | |
143 | | MCFG_CPU_ADD("maincpu", ATMEGA2560, MASTER_CLOCK) |
144 | | MCFG_CPU_PROGRAM_MAP(rambo_prg_map) |
145 | | MCFG_CPU_DATA_MAP(rambo_data_map) |
146 | | MCFG_CPU_IO_MAP(rambo_io_map) |
| 143 | MCFG_CPU_ADD("maincpu", ATMEGA2560, MASTER_CLOCK) |
| 144 | MCFG_CPU_PROGRAM_MAP(rambo_prg_map) |
| 145 | MCFG_CPU_DATA_MAP(rambo_data_map) |
| 146 | MCFG_CPU_IO_MAP(rambo_io_map) |
147 | 147 | |
148 | | MCFG_CPU_AVR8_EEPROM("eeprom") |
149 | | MCFG_CPU_AVR8_LFUSE(0xFF) |
150 | | MCFG_CPU_AVR8_HFUSE(0xDA) |
151 | | MCFG_CPU_AVR8_EFUSE(0xF4) |
152 | | MCFG_CPU_AVR8_LOCK(0x0F) |
| 148 | MCFG_CPU_AVR8_EEPROM("eeprom") |
| 149 | MCFG_CPU_AVR8_LFUSE(0xFF) |
| 150 | MCFG_CPU_AVR8_HFUSE(0xDA) |
| 151 | MCFG_CPU_AVR8_EFUSE(0xF4) |
| 152 | MCFG_CPU_AVR8_LOCK(0x0F) |
153 | 153 | |
154 | | /*TODO: Add an ATMEGA32U2 for USB-Serial communications */ |
155 | | /*TODO: Emulate the AD5206 digipot */ |
156 | | /*TODO: Emulate the A4982 stepper motor drivers and instantiate 5 of these here |
157 | | for controlling the X, Y, Z, E1 (and optionally E2) motors */ |
158 | | /*TODO: Simulate the heating elements */ |
159 | | /*TODO: Implement the thermistor measurements */ |
| 154 | /*TODO: Add an ATMEGA32U2 for USB-Serial communications */ |
| 155 | /*TODO: Emulate the AD5206 digipot */ |
| 156 | /*TODO: Emulate the A4982 stepper motor drivers and instantiate 5 of these here |
| 157 | for controlling the X, Y, Z, E1 (and optionally E2) motors */ |
| 158 | /*TODO: Simulate the heating elements */ |
| 159 | /*TODO: Implement the thermistor measurements */ |
160 | 160 | MACHINE_CONFIG_END |
161 | 161 | |
162 | 162 | ROM_START( metamaq2 ) |
163 | | ROM_REGION( 0x20000, "maincpu", 0 ) |
164 | | ROM_DEFAULT_BIOS("20131015") |
| 163 | ROM_REGION( 0x20000, "maincpu", 0 ) |
| 164 | ROM_DEFAULT_BIOS("20131015") |
165 | 165 | |
166 | | ROM_SYSTEM_BIOS( 0, "20130619", "June 19th, 2013" ) |
167 | | /* SOURCE(https://github.com/Metamaquina/Repetier-Firmware/tree/MM2_2013_06_19) */ |
168 | | ROMX_LOAD("repetier-fw-metamaquina2-2013-06-19.bin", 0x0000, 0x1000e, CRC(4279b178) SHA1(e4d3c9d6421287c980639c2df32d07b754adc8fc), ROM_BIOS(1)) |
| 166 | ROM_SYSTEM_BIOS( 0, "20130619", "June 19th, 2013" ) |
| 167 | /* SOURCE(https://github.com/Metamaquina/Repetier-Firmware/tree/MM2_2013_06_19) */ |
| 168 | ROMX_LOAD("repetier-fw-metamaquina2-2013-06-19.bin", 0x0000, 0x1000e, CRC(4279b178) SHA1(e4d3c9d6421287c980639c2df32d07b754adc8fc), ROM_BIOS(1)) |
169 | 169 | |
170 | | ROM_SYSTEM_BIOS( 1, "20130624", "June 24th, 2013" ) |
171 | | /* SOURCE(https://github.com/Metamaquina/Repetier-Firmware/tree/MM2_RC2_RAMBo_rev10e_2013_06_24) */ |
172 | | ROMX_LOAD("repetier-fw-metamaquina2-2013-06-24_mm2rc2_rambo_rev10e.bin", 0x0000, 0xcebc, CRC(82400a3c) SHA1(0781ce29406ce69b63edb93d776b9c081bed841e), ROM_BIOS(2)) |
| 170 | ROM_SYSTEM_BIOS( 1, "20130624", "June 24th, 2013" ) |
| 171 | /* SOURCE(https://github.com/Metamaquina/Repetier-Firmware/tree/MM2_RC2_RAMBo_rev10e_2013_06_24) */ |
| 172 | ROMX_LOAD("repetier-fw-metamaquina2-2013-06-24_mm2rc2_rambo_rev10e.bin", 0x0000, 0xcebc, CRC(82400a3c) SHA1(0781ce29406ce69b63edb93d776b9c081bed841e), ROM_BIOS(2)) |
173 | 173 | |
174 | | ROM_SYSTEM_BIOS( 2, "20130625", "June 25th, 2013" ) |
175 | | /* SOURCE(https://github.com/Metamaquina/Repetier-Firmware/tree/MM2_2013_06_25) */ |
176 | | ROMX_LOAD("repetier-fw-metamaquina2-2013-06-25.bin", 0x0000, 0x10076, CRC(e7e4db38) SHA1(0c307bb0a0ee4e9d38253936e7030d0efb3c1845), ROM_BIOS(3)) |
| 174 | ROM_SYSTEM_BIOS( 2, "20130625", "June 25th, 2013" ) |
| 175 | /* SOURCE(https://github.com/Metamaquina/Repetier-Firmware/tree/MM2_2013_06_25) */ |
| 176 | ROMX_LOAD("repetier-fw-metamaquina2-2013-06-25.bin", 0x0000, 0x10076, CRC(e7e4db38) SHA1(0c307bb0a0ee4e9d38253936e7030d0efb3c1845), ROM_BIOS(3)) |
177 | 177 | |
178 | | ROM_SYSTEM_BIOS( 3, "20130709", "July 9th, 2013" ) |
179 | | /* SOURCE(https://github.com/Metamaquina/Repetier-Firmware/tree/MM2_2013_07_09) */ |
180 | | ROMX_LOAD("repetier-fw-metamaquina2-2013-07-09.bin", 0x0000, 0x10078, CRC(9a45509f) SHA1(3a2e6516b45cc0ea1aef039335b02208847aaebf), ROM_BIOS(4)) |
| 178 | ROM_SYSTEM_BIOS( 3, "20130709", "July 9th, 2013" ) |
| 179 | /* SOURCE(https://github.com/Metamaquina/Repetier-Firmware/tree/MM2_2013_07_09) */ |
| 180 | ROMX_LOAD("repetier-fw-metamaquina2-2013-07-09.bin", 0x0000, 0x10078, CRC(9a45509f) SHA1(3a2e6516b45cc0ea1aef039335b02208847aaebf), ROM_BIOS(4)) |
181 | 181 | |
182 | | ROM_SYSTEM_BIOS( 4, "20130712", "July 12th, 2013" ) |
183 | | /* SOURCE(https://github.com/Metamaquina/Repetier-Firmware/tree/MM2_2013_07_12) */ |
184 | | ROMX_LOAD("repetier-fw-metamaquina2-2013-07-12.bin", 0x0000, 0x10184, CRC(9aeac87c) SHA1(c1441096553c214c12a34da87fa42cc3f0eaf74d), ROM_BIOS(5)) |
| 182 | ROM_SYSTEM_BIOS( 4, "20130712", "July 12th, 2013" ) |
| 183 | /* SOURCE(https://github.com/Metamaquina/Repetier-Firmware/tree/MM2_2013_07_12) */ |
| 184 | ROMX_LOAD("repetier-fw-metamaquina2-2013-07-12.bin", 0x0000, 0x10184, CRC(9aeac87c) SHA1(c1441096553c214c12a34da87fa42cc3f0eaf74d), ROM_BIOS(5)) |
185 | 185 | |
186 | | ROM_SYSTEM_BIOS( 5, "20130717", "July 17th, 2013" ) |
187 | | /* SOURCE(https://github.com/Metamaquina/Repetier-Firmware/tree/MM2_2013_07_17) */ |
188 | | ROMX_LOAD("repetier-fw-metamaquina2-2013-07-17.bin", 0x0000, 0x10180, CRC(7c053ed0) SHA1(7abeabcbfdb411b6e681e2d0c9398c40b142f76b), ROM_BIOS(6)) |
| 186 | ROM_SYSTEM_BIOS( 5, "20130717", "July 17th, 2013" ) |
| 187 | /* SOURCE(https://github.com/Metamaquina/Repetier-Firmware/tree/MM2_2013_07_17) */ |
| 188 | ROMX_LOAD("repetier-fw-metamaquina2-2013-07-17.bin", 0x0000, 0x10180, CRC(7c053ed0) SHA1(7abeabcbfdb411b6e681e2d0c9398c40b142f76b), ROM_BIOS(6)) |
189 | 189 | |
190 | | ROM_SYSTEM_BIOS( 6, "20130806", "August 6th, 2013" ) |
191 | | /* SOURCE(https://github.com/Metamaquina/Repetier-Firmware/tree/MM2_2013_08_06) */ |
192 | | ROMX_LOAD("repetier-fw-metamaquina2-2013-08-06.bin", 0x0000, 0x1017e, CRC(6aaf5a14) SHA1(93cebee8ab9eda9d81e70504b407268a198577f0), ROM_BIOS(7)) |
| 190 | ROM_SYSTEM_BIOS( 6, "20130806", "August 6th, 2013" ) |
| 191 | /* SOURCE(https://github.com/Metamaquina/Repetier-Firmware/tree/MM2_2013_08_06) */ |
| 192 | ROMX_LOAD("repetier-fw-metamaquina2-2013-08-06.bin", 0x0000, 0x1017e, CRC(6aaf5a14) SHA1(93cebee8ab9eda9d81e70504b407268a198577f0), ROM_BIOS(7)) |
193 | 193 | |
194 | | ROM_SYSTEM_BIOS( 7, "20130809", "August 9th, 2013" ) |
195 | | /* SOURCE(https://github.com/Metamaquina/Repetier-Firmware/tree/MM2_2013_08_09) */ |
196 | | ROMX_LOAD("repetier-fw-metamaquina2-2013-08-09.bin", 0x0000, 0x1018a, CRC(ee53a011) SHA1(666d09fe69220a172528fe8d1c358e3ddaaa743a), ROM_BIOS(8)) |
| 194 | ROM_SYSTEM_BIOS( 7, "20130809", "August 9th, 2013" ) |
| 195 | /* SOURCE(https://github.com/Metamaquina/Repetier-Firmware/tree/MM2_2013_08_09) */ |
| 196 | ROMX_LOAD("repetier-fw-metamaquina2-2013-08-09.bin", 0x0000, 0x1018a, CRC(ee53a011) SHA1(666d09fe69220a172528fe8d1c358e3ddaaa743a), ROM_BIOS(8)) |
197 | 197 | |
198 | | ROM_SYSTEM_BIOS( 8, "20130822", "August 22nd, 2013" ) |
199 | | /* SOURCE(https://github.com/Metamaquina/Repetier-Firmware/tree/MM2_2013_08_22) */ |
200 | | ROMX_LOAD("repetier-fw-metamaquina2-2013-08-22.bin", 0x0000, 0x1018a, CRC(70a5a3c9) SHA1(20e52ea7bf40e71020b815b9fb6385d880677927), ROM_BIOS(9)) |
| 198 | ROM_SYSTEM_BIOS( 8, "20130822", "August 22nd, 2013" ) |
| 199 | /* SOURCE(https://github.com/Metamaquina/Repetier-Firmware/tree/MM2_2013_08_22) */ |
| 200 | ROMX_LOAD("repetier-fw-metamaquina2-2013-08-22.bin", 0x0000, 0x1018a, CRC(70a5a3c9) SHA1(20e52ea7bf40e71020b815b9fb6385d880677927), ROM_BIOS(9)) |
201 | 201 | |
202 | | ROM_SYSTEM_BIOS( 9, "20130913", "September 13th, 2013" ) |
203 | | /* source code for this one is unavailable as it was an unreleased internal development build */ |
204 | | ROMX_LOAD("repetier-fw-metamaquina2-2013-09-13-devel.bin", 0x0000, 0x101bc, CRC(5e7c7933) SHA1(5b9bfe919daf705ad7a9a2de3cf4c51e3338ec47), ROM_BIOS(10)) |
| 202 | ROM_SYSTEM_BIOS( 9, "20130913", "September 13th, 2013" ) |
| 203 | /* source code for this one is unavailable as it was an unreleased internal development build */ |
| 204 | ROMX_LOAD("repetier-fw-metamaquina2-2013-09-13-devel.bin", 0x0000, 0x101bc, CRC(5e7c7933) SHA1(5b9bfe919daf705ad7a9a2de3cf4c51e3338ec47), ROM_BIOS(10)) |
205 | 205 | |
206 | | ROM_SYSTEM_BIOS( 10, "20130920", "September 20th, 2013" ) |
207 | | /* SOURCE(https://github.com/Metamaquina/Repetier-Firmware/tree/MM2_2013_09_20) */ |
208 | | ROMX_LOAD("repetier-fw-metamaquina2-2013-09-20.bin", 0x0000, 0x10384, CRC(48378e58) SHA1(513f0a0c65219875cc467420cc091e3489b58919), ROM_BIOS(11)) |
| 206 | ROM_SYSTEM_BIOS( 10, "20130920", "September 20th, 2013" ) |
| 207 | /* SOURCE(https://github.com/Metamaquina/Repetier-Firmware/tree/MM2_2013_09_20) */ |
| 208 | ROMX_LOAD("repetier-fw-metamaquina2-2013-09-20.bin", 0x0000, 0x10384, CRC(48378e58) SHA1(513f0a0c65219875cc467420cc091e3489b58919), ROM_BIOS(11)) |
209 | 209 | |
210 | | ROM_SYSTEM_BIOS( 11, "20131015", "October 15th, 2013" ) |
211 | | /* SOURCE(https://github.com/Metamaquina/Repetier-Firmware/tree/MM2_2013_10_15) */ |
212 | | ROMX_LOAD("repetier-fw-metamaquina2-2013-10-15.bin", 0x0000, 0x102c8, CRC(520134bd) SHA1(dfe2251aad06972f237eb4920ce14ccb32da5af0), ROM_BIOS(12)) |
| 210 | ROM_SYSTEM_BIOS( 11, "20131015", "October 15th, 2013" ) |
| 211 | /* SOURCE(https://github.com/Metamaquina/Repetier-Firmware/tree/MM2_2013_10_15) */ |
| 212 | ROMX_LOAD("repetier-fw-metamaquina2-2013-10-15.bin", 0x0000, 0x102c8, CRC(520134bd) SHA1(dfe2251aad06972f237eb4920ce14ccb32da5af0), ROM_BIOS(12)) |
213 | 213 | |
214 | | /*Arduino MEGA bootloader */ |
215 | | /* This is marked as a BAD_DUMP because we're not sure this is the bootloader we're actually using. |
216 | | This is inherited from the Replicator 1 driver. |
217 | | A proper dump would be good. |
218 | | Also, it is not clear whether there's any difference in the bootloader |
219 | | between the ATMEGA1280 and the ATMEGA2560 MCUs */ |
220 | | ROM_LOAD( "atmegaboot_168_atmega1280.bin", 0x1f000, 0x0f16, BAD_DUMP CRC(c041f8db) SHA1(d995ebf360a264cccacec65f6dc0c2257a3a9224) ) |
| 214 | /*Arduino MEGA bootloader */ |
| 215 | /* This is marked as a BAD_DUMP because we're not sure this is the bootloader we're actually using. |
| 216 | This is inherited from the Replicator 1 driver. |
| 217 | A proper dump would be good. |
| 218 | Also, it is not clear whether there's any difference in the bootloader |
| 219 | between the ATMEGA1280 and the ATMEGA2560 MCUs */ |
| 220 | ROM_LOAD( "atmegaboot_168_atmega1280.bin", 0x1f000, 0x0f16, BAD_DUMP CRC(c041f8db) SHA1(d995ebf360a264cccacec65f6dc0c2257a3a9224) ) |
221 | 221 | |
222 | | /* on-die 4kbyte eeprom */ |
223 | | ROM_REGION( 0x1000, "eeprom", ROMREGION_ERASEFF ) |
| 222 | /* on-die 4kbyte eeprom */ |
| 223 | ROM_REGION( 0x1000, "eeprom", ROMREGION_ERASEFF ) |
224 | 224 | ROM_END |
225 | 225 | |
226 | 226 | /* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME */ |