| Previous | 199869 Revisions | Next |
| r29306 Saturday 5th April, 2014 at 11:06:01 UTC by Nathan Woods |
|---|
| Merge branch 'master' of ssh://mess.org/mame into new_menus |
| [/shelves/new_menus/src/emu] | delegate.h memory.c |
| [/shelves/new_menus/src/emu/bus/epson_sio] | tf20.c |
| [/shelves/new_menus/src/emu/bus/nes] | bootleg.c jy.c pirate.c |
| [/shelves/new_menus/src/emu/bus/ti99_peb] | tn_ide.c |
| [/shelves/new_menus/src/emu/cpu] | cpu.mak |
| [/shelves/new_menus/src/emu/cpu/alph8201] | 8201dasm.c |
| [/shelves/new_menus/src/emu/cpu/m68000] | m68kmake.c |
| [/shelves/new_menus/src/emu/cpu/m6809] | 6309dasm.c 6809dasm.c |
| [/shelves/new_menus/src/emu/cpu/pic16c5x] | 16c5xdsm.c |
| [/shelves/new_menus/src/emu/cpu/pic16c62x] | 16c62xdsm.c |
| [/shelves/new_menus/src/emu/cpu/tlcs90] | tlcs90.c |
| [/shelves/new_menus/src/emu/cpu/tms32010] | 32010dsm.c |
| [/shelves/new_menus/src/emu/cpu/tms32025] | 32025dsm.c |
| [/shelves/new_menus/src/emu/cpu/z80] | tlcs_z80.c* z80.h |
| [/shelves/new_menus/src/emu/debug] | debughlp.c |
| [/shelves/new_menus/src/emu/machine] | 53c810.c 6526cia.c i8355.c i8355.h nscsi_bus.c pckeybrd.c rtc65271.c rtc65271.h |
| [/shelves/new_menus/src/emu/sound] | samples.c spu_tables.c wave.c |
| [/shelves/new_menus/src/emu/video] | i8275x.c i8275x.h mc6847.c mc6847.h upd3301.c upd3301.h |
| [/shelves/new_menus/src/mame] | mame.mak |
| [/shelves/new_menus/src/mame/drivers] | 3do.c dblcrown.c deco_ld.c famibox.c firebeat.c jalmah.c kaneko16.c mjkjidai.c plygonet.c psikyosh.c seicross.c skydiver.c skylncr.c snowbros.c spcforce.c tmspoker.c twinkle.c vlc.c |
| [/shelves/new_menus/src/mame/includes] | 3do.h kaneko16.h mjkjidai.h seicross.h |
| [/shelves/new_menus/src/mame/layout] | dblcrown.lay* |
| [/shelves/new_menus/src/mame/machine] | 3do.c |
| [/shelves/new_menus/src/mame/video] | kaneko16.c kaneko_spr.c kaneko_spr.h kaneko_tmap.c kaneko_tmap.h lordgun.c starshp1.c |
| [/shelves/new_menus/src/mess] | mess.lst mess.mak |
| [/shelves/new_menus/src/mess/drivers] | altos5.c clcd.c exp85.c gmaster.c lisa.c micronic.c mkit09.c nc.c pc8001.c pecom.c psion.c pve500.c ql.c wicat.c x07.c zorba.c |
| [/shelves/new_menus/src/mess/includes] | lisa.h micronic.h mikromik.h nc.h pc8001.h psion.h x07.h |
| [/shelves/new_menus/src/mess/layout] | pve500.lay* |
| [/shelves/new_menus/src/mess/machine] | 6883sam.c coco.c lisa.c swtpc09.c |
| [/shelves/new_menus/src/mess/tools/floptool] | main.c |
| [/shelves/new_menus/src/mess/tools/imgtool] | imgtool.c modules.c |
| [/shelves/new_menus/src/mess/tools/imgtool/modules] | ti99.c |
| [/shelves/new_menus/src/mess/video] | mikromik.c stic.c |
| [/shelves/new_menus/src/osd/windows] | drawgdi.c input.c windows.mak |
| [/shelves/new_menus/src/tools] | jedutil.c |
| r29305 | r29306 | |
|---|---|---|
| 166 | 166 | endif |
| 167 | 167 | |
| 168 | 168 | ifdef MSVC_ANALYSIS |
| 169 | CCOMFLAGS += /analyze /wd6011 /wd6328 /wd6204 /wd6244 /wd6385 /wd6308 /wd6246 /wd6031 /wd6326 /analyze:stacksize384112 | |
| 169 | CCOMFLAGS += /analyze /wd6011 /wd6328 /wd6204 /wd6244 /wd6385 /wd6308 /wd6246 /wd6031 /wd6326 /wd6255 /wd6330 /wd28251 /wd6054 /wd6340 /wd28125 /wd6053 /wd6001 /wd6386 /wd28278 /wd6297 /wd28183 /wd28159 /wd28182 /wd6237 /wd6239 /wd6240 /wd6323 /wd28199 /wd6235 /wd6285 /wd6286 /wd6384 /wd6293 /analyze:stacksize384112 | |
| 170 | 170 | endif |
| 171 | 171 | |
| 172 | 172 | # enable exception handling for C++ |
| r29305 | r29306 | |
|---|---|---|
| 82 | 82 | static int drawgdi_window_init(win_window_info *window) |
| 83 | 83 | { |
| 84 | 84 | gdi_info *gdi; |
| 85 | | |
| 85 | int i; | |
| 86 | 86 | |
| 87 | 87 | // allocate memory for our structures |
| 88 | 88 | gdi = global_alloc_clear(gdi_info); |
| r29305 | r29306 | |
|---|---|---|
| 1732 | 1732 | RAWINPUTDEVICELIST *device = &devlist[devnum]; |
| 1733 | 1733 | |
| 1734 | 1734 | // handle keyboards |
| 1735 | if (device->dwType == RIM_TYPEKEYBOARD | |
| 1735 | if (!FORCE_DIRECTINPUT && device->dwType == RIM_TYPEKEYBOARD) | |
| 1736 | 1736 | rawinput_keyboard_enum(machine, device); |
| 1737 | 1737 | |
| 1738 | 1738 | // handle mice |
| 1739 | else if (device->dwType == RIM_TYPEMOUSE | |
| 1739 | else if (!FORCE_DIRECTINPUT && device->dwType == RIM_TYPEMOUSE) | |
| 1740 | 1740 | rawinput_mouse_enum(machine, device); |
| 1741 | 1741 | } |
| 1742 | 1742 |
| r29305 | r29306 | |
|---|---|---|
| 123 | 123 | s_to_rate(6080.0f) |
| 124 | 124 | }; |
| 125 | 125 | |
| 126 | static const int num_linear_rates= | |
| 126 | static const int num_linear_rates=ARRAY_LENGTH(linear_rate); | |
| 127 | 127 | |
| 128 | 128 | static const float pos_exp_rate[]= |
| 129 | 129 | { |
| r29305 | r29306 | |
| 229 | 229 | s_to_rate(2664.0f) |
| 230 | 230 | }; |
| 231 | 231 | |
| 232 | static const int num_pos_exp_rates= | |
| 232 | static const int num_pos_exp_rates=ARRAY_LENGTH(pos_exp_rate); | |
| 233 | 233 | |
| 234 | 234 | static const float neg_exp_rate[]= |
| 235 | 235 | { |
| r29305 | r29306 | |
| 343 | 343 | s_to_rate(11200.0f) |
| 344 | 344 | }; |
| 345 | 345 | |
| 346 | static const int num_neg_exp_rates= | |
| 346 | static const int num_neg_exp_rates=ARRAY_LENGTH(neg_exp_rate); | |
| 347 | 347 | |
| 348 | 348 | static const float decay_rate[16]= |
| 349 | 349 | { |
| r29305 | r29306 | |
| 396 | 396 | s_to_rate(3040.0f) |
| 397 | 397 | }; |
| 398 | 398 | |
| 399 | static const int num_linear_release_rates= | |
| 399 | static const int num_linear_release_rates=ARRAY_LENGTH(linear_release_rate); | |
| 400 | 400 | |
| 401 | 401 | static const float exp_release_rate[]= |
| 402 | 402 | { |
| r29305 | r29306 | |
| 429 | 429 | s_to_rate(7008.0f) |
| 430 | 430 | }; |
| 431 | 431 | |
| 432 | static const int num_exp_release_rates= | |
| 432 | static const int num_exp_release_rates=ARRAY_LENGTH(exp_release_rate); | |
| 433 | 433 | |
| 434 | 434 | // |
| 435 | 435 | // |
| r29305 | r29306 | |
|---|---|---|
| 30 | 30 | const device_type WAVE = &device_creator<wave_device>; |
| 31 | 31 | |
| 32 | 32 | wave_device::wave_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 33 | : device_t(mconfig, WAVE, "Wave", tag, owner, clock, "wa | |
| 33 | : device_t(mconfig, WAVE, "Wave", tag, owner, clock, "wave", __FILE__), | |
| 34 | 34 | device_sound_interface(mconfig, *this) |
| 35 | 35 | { |
| 36 | 36 | m_cassette_tag = 0; |
| r29305 | r29306 | |
|---|---|---|
| 426 | 426 | |
| 427 | 427 | bool samples_device::read_wav_sample(emu_file &file, sample_t &sample) |
| 428 | 428 | { |
| 429 | // we already read the opening ' | |
| 429 | // we already read the opening 'RIFF' tag | |
| 430 | 430 | UINT32 offset = 4; |
| 431 | 431 | |
| 432 | 432 | // get the total size |
| r29305 | r29306 | |
| 448 | 448 | return false; |
| 449 | 449 | } |
| 450 | 450 | if (memcmp(&buf[0], "WAVE", 4) != 0) |
| 451 | { | |
| 452 | mame_printf_warning("Could not find WAVE header (%s)\n", file.filename()); | |
| 451 | 453 | return false; |
| 454 | } | |
| 452 | 455 | |
| 453 | 456 | // seek until we find a format tag |
| 454 | 457 | UINT32 length; |
| r29305 | r29306 | |
|---|---|---|
| 5 | 5 | Thierry Nouspikel's IDE card emulation |
| 6 | 6 | |
| 7 | 7 | This card is just a prototype. It has been designed by Thierry Nouspikel, |
| 8 | and its description was published in 2001. The card ha | |
| 8 | and its description was published in 2001. The card has been revised in | |
| 9 | 9 | 2004. |
| 10 | 10 | |
| 11 | 11 | The specs have been published in <http://www.nouspikel.com/ti99/ide.html>. |
| r29305 | r29306 | |
| 332 | 332 | m_tms9995_mode = false; // (device->type()==TMS9995); |
| 333 | 333 | } |
| 334 | 334 | |
| 335 | static const rtc65271_interface ide_rtc_cfg = | |
| 336 | { | |
| 337 | DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, nouspikel_ide_interface_device, clock_interrupt_callback) | |
| 338 | }; | |
| 339 | ||
| 340 | 335 | MACHINE_CONFIG_FRAGMENT( tn_ide ) |
| 341 | MCFG_RTC65271_ADD( "ide_rtc", ide_rtc_cfg ) | |
| 336 | MCFG_DEVICE_ADD( "ide_rtc", RTC65271, 0 ) | |
| 337 | MCFG_RTC65271_INTERRUPT_CB(WRITELINE(nouspikel_ide_interface_device, clock_interrupt_callback)) | |
| 342 | 338 | MCFG_ATA_INTERFACE_ADD( "ata", ata_devices, "hdd", NULL, false) |
| 343 | 339 | MCFG_ATA_INTERFACE_IRQ_HANDLER(WRITELINE(nouspikel_ide_interface_device, ide_interrupt_callback)) |
| 344 | 340 | MACHINE_CONFIG_END |
| r29305 | r29306 | |
|---|---|---|
| 167 | 167 | return; |
| 168 | 168 | |
| 169 | 169 | // no counter changes if both Up/Down are set or clear |
| 170 | if ((m_irq_down && m_irq_up) || (!m_irq_down && !m_irq_ | |
| 170 | if ((m_irq_down && m_irq_up) || (!m_irq_down && !m_irq_up)) | |
| 171 | 171 | return; |
| 172 | 172 | |
| 173 | 173 | // update prescaler |
| r29305 | r29306 | |
|---|---|---|
| 1101 | 1101 | LOG_MMC(("smb2jb write_l, offset: %04x, data: %02x\n", offset, data)); |
| 1102 | 1102 | offset += 0x100; |
| 1103 | 1103 | |
| 1104 | switch (offset & 0x1 | |
| 1104 | switch (offset & 0x1e0) | |
| 1105 | 1105 | { |
| 1106 | 1106 | case 0x020: |
| 1107 | 1107 | case 0x0a0: |
| r29305 | r29306 | |
|---|---|---|
| 1324 | 1324 | case 0x4000: |
| 1325 | 1325 | case 0x4004: |
| 1326 | 1326 | case 0x4008: |
| 1327 | case 0x400 | |
| 1327 | case 0x400c: | |
| 1328 | 1328 | m_prg_mode = data & 1; |
| 1329 | 1329 | |
| 1330 | 1330 | case 0x7000: |
| r29305 | r29306 | |
|---|---|---|
| 289 | 289 | WRITE_LINE_MEMBER( epson_tf20_device::rxc_w ) |
| 290 | 290 | { |
| 291 | 291 | m_rxc = state; |
| 292 | m_sio_input->rx_w(m_txda & m_rxc); | |
| 292 | m_sio_input->rx_w(m_txda && m_rxc); | |
| 293 | 293 | } |
| 294 | 294 | |
| 295 | 295 | //------------------------------------------------- |
| r29305 | r29306 | |
| 299 | 299 | WRITE_LINE_MEMBER( epson_tf20_device::pinc_w ) |
| 300 | 300 | { |
| 301 | 301 | m_pinc = state; |
| 302 | m_sio_input->pin_w(!m_dtra | m_pinc); | |
| 302 | m_sio_input->pin_w(!m_dtra || m_pinc); | |
| 303 | 303 | } |
| 304 | 304 | |
| 305 | 305 | //------------------------------------------------- |
| r29305 | r29306 | |
| 309 | 309 | WRITE_LINE_MEMBER( epson_tf20_device::txda_w ) |
| 310 | 310 | { |
| 311 | 311 | m_txda = state; |
| 312 | m_sio_input->rx_w(m_txda & m_rxc); | |
| 312 | m_sio_input->rx_w(m_txda && m_rxc); | |
| 313 | 313 | } |
| 314 | 314 | |
| 315 | 315 | //------------------------------------------------- |
| r29305 | r29306 | |
| 319 | 319 | WRITE_LINE_MEMBER( epson_tf20_device::dtra_w ) |
| 320 | 320 | { |
| 321 | 321 | m_dtra = state; |
| 322 | m_sio_input->pin_w(!m_dtra | m_pinc); | |
| 322 | m_sio_input->pin_w(!m_dtra || m_pinc); | |
| 323 | 323 | } |
| 324 | 324 | |
| 325 | 325 | //------------------------------------------------- |
| r29305 | r29306 | |
|---|---|---|
| 156 | 156 | // and member function pointer of the appropriate type and number of parameters; we use |
| 157 | 157 | // partial template specialization to support fewer parameters by defaulting the later |
| 158 | 158 | // parameters to the special type _noparam |
| 159 | template<typename _ClassType, typename _ReturnType, typename _P1Type, typename _P2Type, typename _P3Type, typename _P4Type, typename _P5Type, typename _P6Type, typename _P7Type, typename _P8Type> | |
| 159 | ||
| 160 | // dummy class used to indicate a non-existant parameter | |
| 161 | class _noparam { }; | |
| 162 | ||
| 163 | // specialization for 12 parameters | |
| 164 | template<typename _ClassType, typename _ReturnType, typename _P1Type, typename _P2Type, typename _P3Type, typename _P4Type, typename _P5Type, typename _P6Type, typename _P7Type, typename _P8Type, typename _P9Type, typename _P10Type, typename _P11Type, typename _P12Type> | |
| 160 | 165 | struct delegate_traits |
| 161 | 166 | { |
| 167 | typedef _ReturnType (*static_func_type)(_ClassType *, _P1Type, _P2Type, _P3Type, _P4Type, _P5Type, _P6Type, _P7Type, _P8Type, _P9Type, _P10Type, _P11Type, _P12Type); | |
| 168 | typedef _ReturnType (*static_ref_func_type)(_ClassType &, _P1Type, _P2Type, _P3Type, _P4Type, _P5Type, _P6Type, _P7Type, _P8Type, _P9Type, _P10Type, _P11Type, _P12Type); | |
| 169 | typedef _ReturnType (_ClassType::*member_func_type)(_P1Type, _P2Type, _P3Type, _P4Type, _P5Type, _P6Type, _P7Type, _P8Type, _P9Type, _P10Type, _P11Type, _P12Type); | |
| 170 | }; | |
| 171 | ||
| 172 | // specialization for 11 parameters | |
| 173 | template<typename _ClassType, typename _ReturnType, typename _P1Type, typename _P2Type, typename _P3Type, typename _P4Type, typename _P5Type, typename _P6Type, typename _P7Type, typename _P8Type, typename _P9Type, typename _P10Type, typename _P11Type> | |
| 174 | struct delegate_traits<_ClassType, _ReturnType, _P1Type, _P2Type, _P3Type, _P4Type, _P5Type, _P6Type, _P7Type, _P8Type, _P9Type, _P10Type, _P11Type, _noparam> | |
| 175 | { | |
| 176 | typedef _ReturnType (*static_func_type)(_ClassType *, _P1Type, _P2Type, _P3Type, _P4Type, _P5Type, _P6Type, _P7Type, _P8Type, _P9Type, _P10Type, _P11Type); | |
| 177 | typedef _ReturnType (*static_ref_func_type)(_ClassType &, _P1Type, _P2Type, _P3Type, _P4Type, _P5Type, _P6Type, _P7Type, _P8Type, _P9Type, _P10Type, _P11Type); | |
| 178 | typedef _ReturnType (_ClassType::*member_func_type)(_P1Type, _P2Type, _P3Type, _P4Type, _P5Type, _P6Type, _P7Type, _P8Type, _P9Type, _P10Type, _P11Type); | |
| 179 | }; | |
| 180 | ||
| 181 | // specialization for 10 parameters | |
| 182 | template<typename _ClassType, typename _ReturnType, typename _P1Type, typename _P2Type, typename _P3Type, typename _P4Type, typename _P5Type, typename _P6Type, typename _P7Type, typename _P8Type, typename _P9Type, typename _P10Type> | |
| 183 | struct delegate_traits<_ClassType, _ReturnType, _P1Type, _P2Type, _P3Type, _P4Type, _P5Type, _P6Type, _P7Type, _P8Type, _P9Type, _P10Type, _noparam, _noparam> | |
| 184 | { | |
| 185 | typedef _ReturnType (*static_func_type)(_ClassType *, _P1Type, _P2Type, _P3Type, _P4Type, _P5Type, _P6Type, _P7Type, _P8Type, _P9Type, _P10Type); | |
| 186 | typedef _ReturnType (*static_ref_func_type)(_ClassType &, _P1Type, _P2Type, _P3Type, _P4Type, _P5Type, _P6Type, _P7Type, _P8Type, _P9Type, _P10Type); | |
| 187 | typedef _ReturnType (_ClassType::*member_func_type)(_P1Type, _P2Type, _P3Type, _P4Type, _P5Type, _P6Type, _P7Type, _P8Type, _P9Type, _P10Type); | |
| 188 | }; | |
| 189 | ||
| 190 | // specialization for 9 parameters | |
| 191 | template<typename _ClassType, typename _ReturnType, typename _P1Type, typename _P2Type, typename _P3Type, typename _P4Type, typename _P5Type, typename _P6Type, typename _P7Type, typename _P8Type, typename _P9Type> | |
| 192 | struct delegate_traits<_ClassType, _ReturnType, _P1Type, _P2Type, _P3Type, _P4Type, _P5Type, _P6Type, _P7Type, _P8Type, _P9Type, _noparam, _noparam, _noparam> | |
| 193 | { | |
| 194 | typedef _ReturnType (*static_func_type)(_ClassType *, _P1Type, _P2Type, _P3Type, _P4Type, _P5Type, _P6Type, _P7Type, _P8Type, _P9Type); | |
| 195 | typedef _ReturnType (*static_ref_func_type)(_ClassType &, _P1Type, _P2Type, _P3Type, _P4Type, _P5Type, _P6Type, _P7Type, _P8Type, _P9Type); | |
| 196 | typedef _ReturnType (_ClassType::*member_func_type)(_P1Type, _P2Type, _P3Type, _P4Type, _P5Type, _P6Type, _P7Type, _P8Type, _P9Type); | |
| 197 | }; | |
| 198 | ||
| 199 | // specialization for 8 parameters | |
| 200 | template<typename _ClassType, typename _ReturnType, typename _P1Type, typename _P2Type, typename _P3Type, typename _P4Type, typename _P5Type, typename _P6Type, typename _P7Type, typename _P8Type> | |
| 201 | struct delegate_traits<_ClassType, _ReturnType, _P1Type, _P2Type, _P3Type, _P4Type, _P5Type, _P6Type, _P7Type, _P8Type, _noparam, _noparam, _noparam, _noparam> | |
| 202 | { | |
| 162 | 203 | typedef _ReturnType (*static_func_type)(_ClassType *, _P1Type, _P2Type, _P3Type, _P4Type, _P5Type, _P6Type, _P7Type, _P8Type); |
| 163 | 204 | typedef _ReturnType (*static_ref_func_type)(_ClassType &, _P1Type, _P2Type, _P3Type, _P4Type, _P5Type, _P6Type, _P7Type, _P8Type); |
| 164 | 205 | typedef _ReturnType (_ClassType::*member_func_type)(_P1Type, _P2Type, _P3Type, _P4Type, _P5Type, _P6Type, _P7Type, _P8Type); |
| 165 | 206 | }; |
| 166 | 207 | |
| 167 | // dummy class used to indicate a non-existant parameter | |
| 168 | class _noparam { }; | |
| 169 | ||
| 208 | // specialization for 7 parameters | |
| 170 | 209 | template<typename _ClassType, typename _ReturnType, typename _P1Type, typename _P2Type, typename _P3Type, typename _P4Type, typename _P5Type, typename _P6Type, typename _P7Type> |
| 171 | struct delegate_traits<_ClassType, _ReturnType, _P1Type, _P2Type, _P3Type, _P4Type, _P5Type, _P6Type, _P7Type, _noparam> | |
| 210 | struct delegate_traits<_ClassType, _ReturnType, _P1Type, _P2Type, _P3Type, _P4Type, _P5Type, _P6Type, _P7Type, _noparam, _noparam, _noparam, _noparam, _noparam> | |
| 172 | 211 | { |
| 173 | 212 | typedef _ReturnType (*static_func_type)(_ClassType *, _P1Type, _P2Type, _P3Type, _P4Type, _P5Type, _P6Type, _P7Type); |
| 174 | 213 | typedef _ReturnType (*static_ref_func_type)(_ClassType &, _P1Type, _P2Type, _P3Type, _P4Type, _P5Type, _P6Type, _P7Type); |
| 175 | 214 | typedef _ReturnType (_ClassType::*member_func_type)(_P1Type, _P2Type, _P3Type, _P4Type, _P5Type, _P6Type, _P7Type); |
| 176 | 215 | }; |
| 177 | 216 | |
| 217 | // specialization for 6 parameters | |
| 178 | 218 | template<typename _ClassType, typename _ReturnType, typename _P1Type, typename _P2Type, typename _P3Type, typename _P4Type, typename _P5Type, typename _P6Type> |
| 179 | struct delegate_traits<_ClassType, _ReturnType, _P1Type, _P2Type, _P3Type, _P4Type, _P5Type, _P6Type, _noparam, _noparam> | |
| 219 | struct delegate_traits<_ClassType, _ReturnType, _P1Type, _P2Type, _P3Type, _P4Type, _P5Type, _P6Type, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam> | |
| 180 | 220 | { |
| 181 | 221 | typedef _ReturnType (*static_func_type)(_ClassType *, _P1Type, _P2Type, _P3Type, _P4Type, _P5Type, _P6Type); |
| 182 | 222 | typedef _ReturnType (*static_ref_func_type)(_ClassType &, _P1Type, _P2Type, _P3Type, _P4Type, _P5Type, _P6Type); |
| 183 | 223 | typedef _ReturnType (_ClassType::*member_func_type)(_P1Type, _P2Type, _P3Type, _P4Type, _P5Type, _P6Type); |
| 184 | 224 | }; |
| 185 | 225 | |
| 226 | // specialization for 5 parameters | |
| 186 | 227 | template<typename _ClassType, typename _ReturnType, typename _P1Type, typename _P2Type, typename _P3Type, typename _P4Type, typename _P5Type> |
| 187 | struct delegate_traits<_ClassType, _ReturnType, _P1Type, _P2Type, _P3Type, _P4Type, _P5Type, _noparam, _noparam, _noparam> | |
| 228 | struct delegate_traits<_ClassType, _ReturnType, _P1Type, _P2Type, _P3Type, _P4Type, _P5Type, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam> | |
| 188 | 229 | { |
| 189 | 230 | typedef _ReturnType (*static_func_type)(_ClassType *, _P1Type, _P2Type, _P3Type, _P4Type, _P5Type); |
| 190 | 231 | typedef _ReturnType (*static_ref_func_type)(_ClassType &, _P1Type, _P2Type, _P3Type, _P4Type, _P5Type); |
| r29305 | r29306 | |
| 193 | 234 | |
| 194 | 235 | // specialization for 4 parameters |
| 195 | 236 | template<typename _ClassType, typename _ReturnType, typename _P1Type, typename _P2Type, typename _P3Type, typename _P4Type> |
| 196 | struct delegate_traits<_ClassType, _ReturnType, _P1Type, _P2Type, _P3Type, _P4Type, _noparam, _noparam, _noparam, _noparam> | |
| 237 | struct delegate_traits<_ClassType, _ReturnType, _P1Type, _P2Type, _P3Type, _P4Type, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam> | |
| 197 | 238 | { |
| 198 | 239 | typedef _ReturnType (*static_func_type)(_ClassType *, _P1Type, _P2Type, _P3Type, _P4Type); |
| 199 | 240 | typedef _ReturnType (*static_ref_func_type)(_ClassType &, _P1Type, _P2Type, _P3Type, _P4Type); |
| r29305 | r29306 | |
| 202 | 243 | |
| 203 | 244 | // specialization for 3 parameters |
| 204 | 245 | template<typename _ClassType, typename _ReturnType, typename _P1Type, typename _P2Type, typename _P3Type> |
| 205 | struct delegate_traits<_ClassType, _ReturnType, _P1Type, _P2Type, _P3Type, _noparam, _noparam, _noparam, _noparam, _noparam> | |
| 246 | struct delegate_traits<_ClassType, _ReturnType, _P1Type, _P2Type, _P3Type, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam> | |
| 206 | 247 | { |
| 207 | 248 | typedef _ReturnType (*static_func_type)(_ClassType *, _P1Type, _P2Type, _P3Type); |
| 208 | 249 | typedef _ReturnType (*static_ref_func_type)(_ClassType &, _P1Type, _P2Type, _P3Type); |
| r29305 | r29306 | |
| 211 | 252 | |
| 212 | 253 | // specialization for 2 parameters |
| 213 | 254 | template<typename _ClassType, typename _ReturnType, typename _P1Type, typename _P2Type> |
| 214 | struct delegate_traits<_ClassType, _ReturnType, _P1Type, _P2Type, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam> | |
| 255 | struct delegate_traits<_ClassType, _ReturnType, _P1Type, _P2Type, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam> | |
| 215 | 256 | { |
| 216 | 257 | typedef _ReturnType (*static_func_type)(_ClassType *, _P1Type, _P2Type); |
| 217 | 258 | typedef _ReturnType (*static_ref_func_type)(_ClassType &, _P1Type, _P2Type); |
| r29305 | r29306 | |
| 220 | 261 | |
| 221 | 262 | // specialization for 1 parameter |
| 222 | 263 | template<typename _ClassType, typename _ReturnType, typename _P1Type> |
| 223 | struct delegate_traits<_ClassType, _ReturnType, _P1Type, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam> | |
| 264 | struct delegate_traits<_ClassType, _ReturnType, _P1Type, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam> | |
| 224 | 265 | { |
| 225 | 266 | typedef _ReturnType (*static_func_type)(_ClassType *, _P1Type); |
| 226 | 267 | typedef _ReturnType (*static_ref_func_type)(_ClassType &, _P1Type); |
| r29305 | r29306 | |
| 229 | 270 | |
| 230 | 271 | // specialization for no parameters |
| 231 | 272 | template<typename _ClassType, typename _ReturnType> |
| 232 | struct delegate_traits<_ClassType, _ReturnType, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam> | |
| 273 | struct delegate_traits<_ClassType, _ReturnType, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam> | |
| 233 | 274 | { |
| 234 | 275 | typedef _ReturnType (*static_func_type)(_ClassType *); |
| 235 | 276 | typedef _ReturnType (*static_ref_func_type)(_ClassType &); |
| r29305 | r29306 | |
| 375 | 416 | return (reinterpret_cast<_FunctionClass *>(_this->m_realobject)->*mfp)(p1, p2, p3, p4, p5, p6, p7, p8); |
| 376 | 417 | } |
| 377 | 418 | |
| 419 | template<class _FunctionClass, typename _ReturnType, typename _P1Type, typename _P2Type, typename _P3Type, typename _P4Type, typename _P5Type, typename _P6Type, typename _P7Type, typename _P8Type, typename _P9Type> | |
| 420 | static _ReturnType method_stub(delegate_generic_class *object, _P1Type p1, _P2Type p2, _P3Type p3, _P4Type p4, _P5Type p5, _P6Type p6, _P7Type p7, _P8Type p8, _P9Type p9) | |
| 421 | { | |
| 422 | delegate_mfp *_this = reinterpret_cast<delegate_mfp *>(object); | |
| 423 | typedef _ReturnType (_FunctionClass::*mfptype)(_P1Type p1, _P2Type p2, _P3Type p3, _P4Type p4, _P5Type p5, _P6Type p6, _P7Type p7, _P8Type p8, _P9Type p9); | |
| 424 | mfptype &mfp = *reinterpret_cast<mfptype *>(&_this->m_rawdata); | |
| 425 | return (reinterpret_cast<_FunctionClass *>(_this->m_realobject)->*mfp)(p1, p2, p3, p4, p5, p6, p7, p8, p9); | |
| 426 | } | |
| 427 | ||
| 428 | template<class _FunctionClass, typename _ReturnType, typename _P1Type, typename _P2Type, typename _P3Type, typename _P4Type, typename _P5Type, typename _P6Type, typename _P7Type, typename _P8Type, typename _P9Type, typename _P10Type> | |
| 429 | static _ReturnType method_stub(delegate_generic_class *object, _P1Type p1, _P2Type p2, _P3Type p3, _P4Type p4, _P5Type p5, _P6Type p6, _P7Type p7, _P8Type p8, _P9Type p9, _P10Type p10) | |
| 430 | { | |
| 431 | delegate_mfp *_this = reinterpret_cast<delegate_mfp *>(object); | |
| 432 | typedef _ReturnType (_FunctionClass::*mfptype)(_P1Type p1, _P2Type p2, _P3Type p3, _P4Type p4, _P5Type p5, _P6Type p6, _P7Type p7, _P8Type p8, _P9Type p9, _P10Type p10); | |
| 433 | mfptype &mfp = *reinterpret_cast<mfptype *>(&_this->m_rawdata); | |
| 434 | return (reinterpret_cast<_FunctionClass *>(_this->m_realobject)->*mfp)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10); | |
| 435 | } | |
| 436 | ||
| 437 | template<class _FunctionClass, typename _ReturnType, typename _P1Type, typename _P2Type, typename _P3Type, typename _P4Type, typename _P5Type, typename _P6Type, typename _P7Type, typename _P8Type, typename _P9Type, typename _P10Type, typename _P11Type> | |
| 438 | static _ReturnType method_stub(delegate_generic_class *object, _P1Type p1, _P2Type p2, _P3Type p3, _P4Type p4, _P5Type p5, _P6Type p6, _P7Type p7, _P8Type p8, _P9Type p9, _P10Type p10, _P11Type p11) | |
| 439 | { | |
| 440 | delegate_mfp *_this = reinterpret_cast<delegate_mfp *>(object); | |
| 441 | typedef _ReturnType (_FunctionClass::*mfptype)(_P1Type p1, _P2Type p2, _P3Type p3, _P4Type p4, _P5Type p5, _P6Type p6, _P7Type p7, _P8Type p8, _P9Type p9, _P10Type p10, _P11Type p11); | |
| 442 | mfptype &mfp = *reinterpret_cast<mfptype *>(&_this->m_rawdata); | |
| 443 | return (reinterpret_cast<_FunctionClass *>(_this->m_realobject)->*mfp)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11); | |
| 444 | } | |
| 445 | ||
| 446 | template<class _FunctionClass, typename _ReturnType, typename _P1Type, typename _P2Type, typename _P3Type, typename _P4Type, typename _P5Type, typename _P6Type, typename _P7Type, typename _P8Type, typename _P9Type, typename _P10Type, typename _P11Type, typename _P12Type> | |
| 447 | static _ReturnType method_stub(delegate_generic_class *object, _P1Type p1, _P2Type p2, _P3Type p3, _P4Type p4, _P5Type p5, _P6Type p6, _P7Type p7, _P8Type p8, _P9Type p9, _P10Type p10, _P11Type p11, _P12Type p12) | |
| 448 | { | |
| 449 | delegate_mfp *_this = reinterpret_cast<delegate_mfp *>(object); | |
| 450 | typedef _ReturnType (_FunctionClass::*mfptype)(_P1Type p1, _P2Type p2, _P3Type p3, _P4Type p4, _P5Type p5, _P6Type p6, _P7Type p7, _P8Type p8, _P9Type p9, _P10Type p10, _P11Type p11, _P12Type p12); | |
| 451 | mfptype &mfp = *reinterpret_cast<mfptype *>(&_this->m_rawdata); | |
| 452 | return (reinterpret_cast<_FunctionClass *>(_this->m_realobject)->*mfp)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12); | |
| 453 | } | |
| 378 | 454 | // helper to convert a function of a given type to a generic function, forcing template |
| 379 | 455 | // instantiation to match the source type |
| 380 | 456 | template <typename _SourceType> |
| r29305 | r29306 | |
| 463 | 539 | // ======================> delegate_base |
| 464 | 540 | |
| 465 | 541 | // general delegate class template supporting up to 5 parameters |
| 466 | template<typename _ReturnType, typename _P1Type = _noparam, typename _P2Type = _noparam, typename _P3Type = _noparam, typename _P4Type = _noparam, typename _P5Type = _noparam, typename _P6Type = _noparam, typename _P7Type = _noparam, typename _P8Type = _noparam> | |
| 542 | template<typename _ReturnType, typename _P1Type = _noparam, typename _P2Type = _noparam, typename _P3Type = _noparam, typename _P4Type = _noparam, typename _P5Type = _noparam, typename _P6Type = _noparam, typename _P7Type = _noparam, typename _P8Type = _noparam, typename _P9Type = _noparam, typename _P10Type = _noparam, typename _P11Type = _noparam, typename _P12Type = _noparam> | |
| 467 | 543 | class delegate_base |
| 468 | 544 | { |
| 469 | 545 | public: |
| r29305 | r29306 | |
| 471 | 547 | template<class _FunctionClass> |
| 472 | 548 | struct traits |
| 473 | 549 | { |
| 474 | typedef typename delegate_traits<_FunctionClass, _ReturnType, _P1Type, _P2Type, _P3Type, _P4Type, _P5Type, _P6Type, _P7Type, _P8Type>::member_func_type member_func_type; | |
| 475 | typedef typename delegate_traits<_FunctionClass, _ReturnType, _P1Type, _P2Type, _P3Type, _P4Type, _P5Type, _P6Type, _P7Type, _P8Type>::static_func_type static_func_type; | |
| 476 | typedef typename delegate_traits<_FunctionClass, _ReturnType, _P1Type, _P2Type, _P3Type, _P4Type, _P5Type, _P6Type, _P7Type, _P8Type>::static_ref_func_type static_ref_func_type; | |
| 550 | typedef typename delegate_traits<_FunctionClass, _ReturnType, _P1Type, _P2Type, _P3Type, _P4Type, _P5Type, _P6Type, _P7Type, _P8Type, _P9Type, _P10Type, _P11Type, _P12Type>::member_func_type member_func_type; | |
| 551 | typedef typename delegate_traits<_FunctionClass, _ReturnType, _P1Type, _P2Type, _P3Type, _P4Type, _P5Type, _P6Type, _P7Type, _P8Type, _P9Type, _P10Type, _P11Type, _P12Type>::static_func_type static_func_type; | |
| 552 | typedef typename delegate_traits<_FunctionClass, _ReturnType, _P1Type, _P2Type, _P3Type, _P4Type, _P5Type, _P6Type, _P7Type, _P8Type, _P9Type, _P10Type, _P11Type, _P12Type>::static_ref_func_type static_ref_func_type; | |
| 477 | 553 | }; |
| 478 | 554 | typedef typename traits<delegate_generic_class>::static_func_type generic_static_func; |
| 479 | 555 | |
| r29305 | r29306 | |
| 578 | 654 | _ReturnType operator()(_P1Type p1, _P2Type p2, _P3Type p3, _P4Type p4, _P5Type p5, _P6Type p6) const { return (*m_function)(m_object, p1, p2, p3, p4, p5, p6); } |
| 579 | 655 | _ReturnType operator()(_P1Type p1, _P2Type p2, _P3Type p3, _P4Type p4, _P5Type p5, _P6Type p6, _P7Type p7) const { return (*m_function)(m_object, p1, p2, p3, p4, p5, p6, p7); } |
| 580 | 656 | _ReturnType operator()(_P1Type p1, _P2Type p2, _P3Type p3, _P4Type p4, _P5Type p5, _P6Type p6, _P7Type p7, _P8Type p8) const { return (*m_function)(m_object, p1, p2, p3, p4, p5, p6, p7, p8); } |
| 657 | _ReturnType operator()(_P1Type p1, _P2Type p2, _P3Type p3, _P4Type p4, _P5Type p5, _P6Type p6, _P7Type p7, _P8Type p8, _P9Type p9) const { return (*m_function)(m_object, p1, p2, p3, p4, p5, p6, p7, p8, p9); } | |
| 658 | _ReturnType operator()(_P1Type p1, _P2Type p2, _P3Type p3, _P4Type p4, _P5Type p5, _P6Type p6, _P7Type p7, _P8Type p8, _P9Type p9, _P10Type p10) const { return (*m_function)(m_object, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10); } | |
| 659 | _ReturnType operator()(_P1Type p1, _P2Type p2, _P3Type p3, _P4Type p4, _P5Type p5, _P6Type p6, _P7Type p7, _P8Type p8, _P9Type p9, _P10Type p10, _P11Type p11) const { return (*m_function)(m_object, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11); } | |
| 660 | _ReturnType operator()(_P1Type p1, _P2Type p2, _P3Type p3, _P4Type p4, _P5Type p5, _P6Type p6, _P7Type p7, _P8Type p8, _P9Type p9, _P10Type p10, _P11Type p11, _P12Type p12) const { return (*m_function)(m_object, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12); } | |
| 581 | 661 | |
| 582 | 662 | // getters |
| 583 | 663 | bool has_object() const { return (object() != NULL); } |
| r29305 | r29306 | |
| 791 | 871 | delegate &operator=(const basetype &src) { *static_cast<basetype *>(this) = src; return *this; } |
| 792 | 872 | }; |
| 793 | 873 | |
| 874 | // specialize for 9 parameters | |
| 875 | template<typename _ReturnType, typename _P1Type, typename _P2Type, typename _P3Type, typename _P4Type, typename _P5Type, typename _P6Type, typename _P7Type, typename _P8Type, typename _P9Type> | |
| 876 | class delegate<_ReturnType (_P1Type, _P2Type, _P3Type, _P4Type, _P5Type, _P6Type, _P7Type, _P8Type, _P9Type)> : public delegate_base<_ReturnType, _P1Type, _P2Type, _P3Type, _P4Type, _P5Type, _P6Type, _P7Type, _P8Type, _P9Type> | |
| 877 | { | |
| 878 | typedef delegate_base<_ReturnType, _P1Type, _P2Type, _P3Type, _P4Type, _P5Type, _P6Type, _P7Type, _P8Type, _P9Type> basetype; | |
| 879 | ||
| 880 | public: | |
| 881 | // create a standard set of constructors | |
| 882 | delegate() : basetype() { } | |
| 883 | delegate(const basetype &src) : basetype(src) { } | |
| 884 | delegate(const basetype &src, delegate_late_bind &object) : basetype(src, object) { } | |
| 885 | template<class _FunctionClass> delegate(typename basetype::template traits<_FunctionClass>::member_func_type funcptr, const char *name, _FunctionClass *object) : basetype(funcptr, name, object) { } | |
| 886 | template<class _FunctionClass> delegate(typename basetype::template traits<_FunctionClass>::static_func_type funcptr, const char *name, _FunctionClass *object) : basetype(funcptr, name, object) { } | |
| 887 | template<class _FunctionClass> delegate(typename basetype::template traits<_FunctionClass>::static_ref_func_type funcptr, const char *name, _FunctionClass *object) : basetype(funcptr, name, object) { } | |
| 888 | delegate &operator=(const basetype &src) { *static_cast<basetype *>(this) = src; return *this; } | |
| 889 | }; | |
| 890 | ||
| 891 | // specialize for 10 parameters | |
| 892 | template<typename _ReturnType, typename _P1Type, typename _P2Type, typename _P3Type, typename _P4Type, typename _P5Type, typename _P6Type, typename _P7Type, typename _P8Type, typename _P9Type, typename _P10Type> | |
| 893 | class delegate<_ReturnType (_P1Type, _P2Type, _P3Type, _P4Type, _P5Type, _P6Type, _P7Type, _P8Type, _P9Type, _P10Type)> : public delegate_base<_ReturnType, _P1Type, _P2Type, _P3Type, _P4Type, _P5Type, _P6Type, _P7Type, _P8Type, _P9Type, _P10Type> | |
| 894 | { | |
| 895 | typedef delegate_base<_ReturnType, _P1Type, _P2Type, _P3Type, _P4Type, _P5Type, _P6Type, _P7Type, _P8Type, _P9Type, _P10Type> basetype; | |
| 896 | ||
| 897 | public: | |
| 898 | // create a standard set of constructors | |
| 899 | delegate() : basetype() { } | |
| 900 | delegate(const basetype &src) : basetype(src) { } | |
| 901 | delegate(const basetype &src, delegate_late_bind &object) : basetype(src, object) { } | |
| 902 | template<class _FunctionClass> delegate(typename basetype::template traits<_FunctionClass>::member_func_type funcptr, const char *name, _FunctionClass *object) : basetype(funcptr, name, object) { } | |
| 903 | template<class _FunctionClass> delegate(typename basetype::template traits<_FunctionClass>::static_func_type funcptr, const char *name, _FunctionClass *object) : basetype(funcptr, name, object) { } | |
| 904 | template<class _FunctionClass> delegate(typename basetype::template traits<_FunctionClass>::static_ref_func_type funcptr, const char *name, _FunctionClass *object) : basetype(funcptr, name, object) { } | |
| 905 | delegate &operator=(const basetype &src) { *static_cast<basetype *>(this) = src; return *this; } | |
| 906 | }; | |
| 907 | ||
| 908 | // specialize for 11 parameters | |
| 909 | template<typename _ReturnType, typename _P1Type, typename _P2Type, typename _P3Type, typename _P4Type, typename _P5Type, typename _P6Type, typename _P7Type, typename _P8Type, typename _P9Type, typename _P10Type, typename _P11Type> | |
| 910 | class delegate<_ReturnType (_P1Type, _P2Type, _P3Type, _P4Type, _P5Type, _P6Type, _P7Type, _P8Type, _P9Type, _P10Type, _P11Type)> : public delegate_base<_ReturnType, _P1Type, _P2Type, _P3Type, _P4Type, _P5Type, _P6Type, _P7Type, _P8Type, _P9Type, _P10Type, _P11Type> | |
| 911 | { | |
| 912 | typedef delegate_base<_ReturnType, _P1Type, _P2Type, _P3Type, _P4Type, _P5Type, _P6Type, _P7Type, _P8Type, _P9Type, _P10Type, _P11Type> basetype; | |
| 913 | ||
| 914 | public: | |
| 915 | // create a standard set of constructors | |
| 916 | delegate() : basetype() { } | |
| 917 | delegate(const basetype &src) : basetype(src) { } | |
| 918 | delegate(const basetype &src, delegate_late_bind &object) : basetype(src, object) { } | |
| 919 | template<class _FunctionClass> delegate(typename basetype::template traits<_FunctionClass>::member_func_type funcptr, const char *name, _FunctionClass *object) : basetype(funcptr, name, object) { } | |
| 920 | template<class _FunctionClass> delegate(typename basetype::template traits<_FunctionClass>::static_func_type funcptr, const char *name, _FunctionClass *object) : basetype(funcptr, name, object) { } | |
| 921 | template<class _FunctionClass> delegate(typename basetype::template traits<_FunctionClass>::static_ref_func_type funcptr, const char *name, _FunctionClass *object) : basetype(funcptr, name, object) { } | |
| 922 | delegate &operator=(const basetype &src) { *static_cast<basetype *>(this) = src; return *this; } | |
| 923 | }; | |
| 924 | ||
| 925 | // specialize for 12 parameters | |
| 926 | template<typename _ReturnType, typename _P1Type, typename _P2Type, typename _P3Type, typename _P4Type, typename _P5Type, typename _P6Type, typename _P7Type, typename _P8Type, typename _P9Type, typename _P10Type, typename _P11Type, typename _P12Type> | |
| 927 | class delegate<_ReturnType (_P1Type, _P2Type, _P3Type, _P4Type, _P5Type, _P6Type, _P7Type, _P8Type, _P9Type, _P10Type, _P11Type, _P12Type)> : public delegate_base<_ReturnType, _P1Type, _P2Type, _P3Type, _P4Type, _P5Type, _P6Type, _P7Type, _P8Type, _P9Type, _P10Type, _P11Type, _P12Type> | |
| 928 | { | |
| 929 | typedef delegate_base<_ReturnType, _P1Type, _P2Type, _P3Type, _P4Type, _P5Type, _P6Type, _P7Type, _P8Type, _P9Type, _P10Type, _P11Type, _P12Type> basetype; | |
| 930 | ||
| 931 | public: | |
| 932 | // create a standard set of constructors | |
| 933 | delegate() : basetype() { } | |
| 934 | delegate(const basetype &src) : basetype(src) { } | |
| 935 | delegate(const basetype &src, delegate_late_bind &object) : basetype(src, object) { } | |
| 936 | template<class _FunctionClass> delegate(typename basetype::template traits<_FunctionClass>::member_func_type funcptr, const char *name, _FunctionClass *object) : basetype(funcptr, name, object) { } | |
| 937 | template<class _FunctionClass> delegate(typename basetype::template traits<_FunctionClass>::static_func_type funcptr, const char *name, _FunctionClass *object) : basetype(funcptr, name, object) { } | |
| 938 | template<class _FunctionClass> delegate(typename basetype::template traits<_FunctionClass>::static_ref_func_type funcptr, const char *name, _FunctionClass *object) : basetype(funcptr, name, object) { } | |
| 939 | delegate &operator=(const basetype &src) { *static_cast<basetype *>(this) = src; return *this; } | |
| 940 | }; | |
| 941 | ||
| 794 | 942 | #endif /* __DELEGATE_H__ */ |
| r29305 | r29306 | |
|---|---|---|
| 393 | 393 | |
| 394 | 394 | m_queue[m_head] = data; |
| 395 | 395 | m_head++; |
| 396 | m_head %= | |
| 396 | m_head %= ARRAY_LENGTH(m_queue); | |
| 397 | 397 | } |
| 398 | 398 | |
| 399 | 399 | |
| r29305 | r29306 | |
| 402 | 402 | int queue_size; |
| 403 | 403 | queue_size = m_head - m_tail; |
| 404 | 404 | if (queue_size < 0) |
| 405 | queue_size += | |
| 405 | queue_size += ARRAY_LENGTH(m_queue); | |
| 406 | 406 | return queue_size; |
| 407 | 407 | } |
| 408 | 408 | |
| r29305 | r29306 | |
| 669 | 669 | logerror("read(): Keyboard Read 0x%02x\n",data); |
| 670 | 670 | |
| 671 | 671 | m_tail++; |
| 672 | m_tail %= | |
| 672 | m_tail %= ARRAY_LENGTH(m_queue); | |
| 673 | 673 | return data; |
| 674 | 674 | } |
| 675 | 675 |
| r29305 | r29306 | |
|---|---|---|
| 65 | 65 | |
| 66 | 66 | if (m_ddr[port] != 0xff) |
| 67 | 67 | { |
| 68 | data |= m_in_port_func[port](0) & ~m_ddr[port]; | |
| 68 | if (port == 0) {data |= m_in_pa_cb(0) & ~m_ddr[port];} | |
| 69 | else { data |= m_in_pb_cb(0) & ~m_ddr[port];} | |
| 69 | 70 | } |
| 70 | 71 | |
| 71 | 72 | return data; |
| r29305 | r29306 | |
| 80 | 81 | { |
| 81 | 82 | m_output[port] = data; |
| 82 | 83 | |
| 83 | m_out_port_func[port](0, m_output[port] & m_ddr[port]); | |
| 84 | if (port == 0) {m_out_pa_cb((offs_t)0, m_output[port] & m_ddr[port]);} | |
| 85 | else {m_out_pb_cb((offs_t)0, m_output[port] & m_ddr[port]);} | |
| 84 | 86 | } |
| 85 | 87 | |
| 86 | 88 | |
| r29305 | r29306 | |
| 96 | 98 | i8355_device::i8355_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 97 | 99 | : device_t(mconfig, I8355, "Intel 8355", tag, owner, clock, "i8355", __FILE__), |
| 98 | 100 | device_memory_interface(mconfig, *this), |
| 101 | m_in_pa_cb(*this), | |
| 102 | m_out_pa_cb(*this), | |
| 103 | m_in_pb_cb(*this), | |
| 104 | m_out_pb_cb(*this), | |
| 99 | 105 | m_space_config("ram", ENDIANNESS_LITTLE, 8, 11, 0, NULL, *ADDRESS_MAP_NAME(i8355)) |
| 100 | 106 | { |
| 101 | 107 | } |
| 102 | 108 | |
| 103 | ||
| 104 | 109 | //------------------------------------------------- |
| 105 | // device_config_complete - perform any | |
| 106 | // operations now that the configuration is | |
| 107 | // complete | |
| 108 | //------------------------------------------------- | |
| 109 | ||
| 110 | void i8355_device::device_config_complete() | |
| 111 | { | |
| 112 | // inherit a copy of the static data | |
| 113 | const i8355_interface *intf = reinterpret_cast<const i8355_interface *>(static_config()); | |
| 114 | if (intf != NULL) | |
| 115 | *static_cast<i8355_interface *>(this) = *intf; | |
| 116 | ||
| 117 | // or initialize to defaults if none provided | |
| 118 | else | |
| 119 | { | |
| 120 | memset(&m_in_pa_cb, 0, sizeof(m_in_pa_cb)); | |
| 121 | memset(&m_out_pa_cb, 0, sizeof(m_out_pa_cb)); | |
| 122 | memset(&m_in_pb_cb, 0, sizeof(m_in_pb_cb)); | |
| 123 | memset(&m_out_pb_cb, 0, sizeof(m_out_pb_cb)); | |
| 124 | } | |
| 125 | } | |
| 126 | ||
| 127 | ||
| 128 | //------------------------------------------------- | |
| 129 | 110 | // device_start - device-specific startup |
| 130 | 111 | //------------------------------------------------- |
| 131 | 112 | |
| 132 | 113 | void i8355_device::device_start() |
| 133 | 114 | { |
| 134 | 115 | // resolve callbacks |
| 135 | m_in_port_func[0].resolve(m_in_pa_cb, *this); | |
| 136 | m_in_port_func[1].resolve(m_in_pb_cb, *this); | |
| 137 | m_out_port_func[0].resolve(m_out_pa_cb, *this); | |
| 138 | m_out_port_func[1].resolve(m_out_pb_cb, *this); | |
| 116 | m_in_pa_cb.resolve_safe(0); | |
| 117 | m_in_pb_cb.resolve_safe(0); | |
| 118 | m_out_pa_cb.resolve_safe(); | |
| 119 | m_out_pb_cb.resolve_safe(); | |
| 139 | 120 | |
| 140 | 121 | // register for state saving |
| 141 | 122 | save_item(NAME(m_output)); |
| r29305 | r29306 | |
|---|---|---|
| 52 | 52 | // INTERFACE CONFIGURATION MACROS |
| 53 | 53 | ///************************************************************************* |
| 54 | 54 | |
| 55 | #define MCFG_I8355_ADD(_tag, _clock, _config) \ | |
| 56 | MCFG_DEVICE_ADD((_tag), I8355, _clock) \ | |
| 57 | MCFG_DEVICE_CONFIG(_config) | |
| 55 | #define MCFG_I8355_IN_PA_CB(_devcb) \ | |
| 56 | devcb = &i8355_device::set_in_pa_callback(*device, DEVCB2_##_devcb); | |
| 58 | 57 | |
| 59 | #define I8355_INTERFACE(name) \ | |
| 60 | const i8355_interface (name) = | |
| 58 | #define MCFG_I8355_OUT_PA_CB(_devcb) \ | |
| 59 | devcb = &i8355_device::set_out_pa_callback(*device, DEVCB2_##_devcb); | |
| 60 | ||
| 61 | #define MCFG_I8355_IN_PB_CB(_devcb) \ | |
| 62 | devcb = &i8355_device::set_in_pb_callback(*device, DEVCB2_##_devcb); | |
| 63 | ||
| 64 | #define MCFG_I8355_OUT_PB_CB(_devcb) \ | |
| 65 | devcb = &i8355_device::set_out_pb_callback(*device, DEVCB2_##_devcb); | |
| 66 | ||
| 61 | 67 | |
| 62 | ||
| 63 | ||
| 64 | 68 | ///************************************************************************* |
| 65 | 69 | // TYPE DEFINITIONS |
| 66 | 70 | ///************************************************************************* |
| 67 | 71 | |
| 68 | // ======================> i8355_interface | |
| 69 | ||
| 70 | struct i8355_interface | |
| 71 | { | |
| 72 | devcb_read8 m_in_pa_cb; | |
| 73 | devcb_write8 m_out_pa_cb; | |
| 74 | ||
| 75 | devcb_read8 m_in_pb_cb; | |
| 76 | devcb_write8 m_out_pb_cb; | |
| 77 | }; | |
| 78 | ||
| 79 | ||
| 80 | ||
| 81 | 72 | // ======================> i8355_device |
| 82 | 73 | |
| 83 | 74 | class i8355_device : public device_t, |
| 84 | public device_memory_interface, | |
| 85 | public i8355_interface | |
| 75 | public device_memory_interface | |
| 86 | 76 | { |
| 87 | 77 | public: |
| 88 | 78 | // construction/destruction |
| 89 | 79 | i8355_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 90 | 80 | |
| 81 | template<class _Object> static devcb2_base &set_in_pa_callback(device_t &device, _Object object) { return downcast<i8355_device &>(device).m_in_pa_cb.set_callback(object); } | |
| 82 | template<class _Object> static devcb2_base &set_out_pa_callback(device_t &device, _Object object) { return downcast<i8355_device &>(device).m_out_pa_cb.set_callback(object); } | |
| 83 | template<class _Object> static devcb2_base &set_in_pb_callback(device_t &device, _Object object) { return downcast<i8355_device &>(device).m_in_pb_cb.set_callback(object); } | |
| 84 | template<class _Object> static devcb2_base &set_out_pb_callback(device_t &device, _Object object) { return downcast<i8355_device &>(device).m_out_pb_cb.set_callback(object); } | |
| 85 | ||
| 91 | 86 | DECLARE_READ8_MEMBER( io_r ); |
| 92 | 87 | DECLARE_WRITE8_MEMBER( io_w ); |
| 93 | 88 | |
| r29305 | r29306 | |
| 96 | 91 | |
| 97 | 92 | protected: |
| 98 | 93 | // device-level overrides |
| 99 | virtual void device_config_complete(); | |
| 100 | 94 | virtual void device_start(); |
| 101 | 95 | virtual void device_reset(); |
| 102 | 96 | |
| r29305 | r29306 | |
| 107 | 101 | inline void write_port(int port, UINT8 data); |
| 108 | 102 | |
| 109 | 103 | private: |
| 110 | devcb_resolved_read8 m_in_port_func[2]; | |
| 111 | devcb_resolved_write8 m_out_port_func[2]; | |
| 104 | devcb2_read8 m_in_pa_cb; | |
| 105 | devcb2_write8 m_out_pa_cb; | |
| 112 | 106 | |
| 107 | devcb2_read8 m_in_pb_cb; | |
| 108 | devcb2_write8 m_out_pb_cb; | |
| 109 | ||
| 113 | 110 | // registers |
| 114 | 111 | UINT8 m_output[2]; // output latches |
| 115 | 112 | UINT8 m_ddr[2]; // DDR latches |
| r29305 | r29306 | |
|---|---|---|
| 449 | 449 | if (m_regs[reg_C] & m_regs[reg_B] & (reg_C_PF | reg_C_AF | reg_C_UF)) |
| 450 | 450 | { |
| 451 | 451 | m_regs[reg_C] |= reg_C_IRQF; |
| 452 | if (!m_interrupt_func.isnull()) | |
| 453 | m_interrupt_func(1); | |
| 452 | if (!m_interrupt_cb.isnull()) | |
| 453 | m_interrupt_cb(1); | |
| 454 | 454 | } |
| 455 | 455 | else |
| 456 | 456 | { |
| 457 | 457 | m_regs[reg_C] &= ~reg_C_IRQF; |
| 458 | if (!m_interrupt_func.isnull()) | |
| 459 | m_interrupt_func(0); | |
| 458 | if (!m_interrupt_cb.isnull()) | |
| 459 | m_interrupt_cb(0); | |
| 460 | 460 | } |
| 461 | 461 | } |
| 462 | 462 | |
| r29305 | r29306 | |
| 672 | 672 | |
| 673 | 673 | rtc65271_device::rtc65271_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 674 | 674 | : device_t(mconfig, RTC65271, "RTC65271", tag, owner, clock, "rtc65271", __FILE__), |
| 675 | device_nvram_interface(mconfig, *this) | |
| 675 | device_nvram_interface(mconfig, *this), | |
| 676 | m_interrupt_cb(*this) | |
| 676 | 677 | { |
| 677 | 678 | } |
| 678 | 679 | |
| 679 | 680 | //------------------------------------------------- |
| 680 | // device_config_complete - perform any | |
| 681 | // operations now that the configuration is | |
| 682 | // complete | |
| 683 | //------------------------------------------------- | |
| 684 | ||
| 685 | void rtc65271_device::device_config_complete() | |
| 686 | { | |
| 687 | // inherit a copy of the static data | |
| 688 | const rtc65271_interface *intf = reinterpret_cast<const rtc65271_interface *>(static_config()); | |
| 689 | if (intf != NULL) | |
| 690 | *static_cast<rtc65271_interface *>(this) = *intf; | |
| 691 | ||
| 692 | // or initialize to defaults if none provided | |
| 693 | else | |
| 694 | { | |
| 695 | memset(&m_interrupt_cb, 0, sizeof(m_interrupt_cb)); | |
| 696 | } | |
| 697 | } | |
| 698 | ||
| 699 | //------------------------------------------------- | |
| 700 | 681 | // device_start - device-specific startup |
| 701 | 682 | //------------------------------------------------- |
| 702 | 683 | void rtc65271_device::device_start() |
| r29305 | r29306 | |
| 704 | 685 | m_update_timer = machine().scheduler().timer_alloc(FUNC(rtc_begin_update_callback), (void *)this); |
| 705 | 686 | m_update_timer->adjust(attotime::from_seconds(1), 0, attotime::from_seconds(1)); |
| 706 | 687 | m_SQW_timer = machine().scheduler().timer_alloc(FUNC(rtc_SQW_callback), (void *)this); |
| 707 | m_interrupt_ | |
| 688 | m_interrupt_cb.resolve(); | |
| 708 | 689 | |
| 709 | 690 | save_item(NAME(m_regs)); |
| 710 | 691 | save_item(NAME(m_cur_reg)); |
| r29305 | r29306 | |
|---|---|---|
| 9 | 9 | // INTERFACE CONFIGURATION MACROS |
| 10 | 10 | //************************************************************************** |
| 11 | 11 | |
| 12 | #define MCFG_RTC65271_ADD(_tag, _config) \ | |
| 13 | MCFG_DEVICE_ADD(_tag, RTC65271, 0) \ | |
| 14 | MCFG_DEVICE_CONFIG(_config) | |
| 15 | // ======================> rtc65271_interface | |
| 12 | #define MCFG_RTC65271_INTERRUPT_CB(_devcb) \ | |
| 13 | devcb = &rtc65271_device::set_interrupt_callback(*device, DEVCB2_##_devcb); | |
| 16 | 14 | |
| 17 | struct rtc65271_interface | |
| 18 | { | |
| 19 | devcb_write_line m_interrupt_cb; | |
| 20 | }; | |
| 21 | 15 | |
| 22 | 16 | // ======================> rtc65271_device |
| 23 | 17 | |
| 24 | 18 | class rtc65271_device : public device_t, |
| 25 | public device_nvram_interface, | |
| 26 | public rtc65271_interface | |
| 19 | public device_nvram_interface | |
| 27 | 20 | { |
| 28 | 21 | public: |
| 29 | 22 | // construction/destruction |
| 30 | 23 | rtc65271_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 31 | 24 | protected: |
| 32 | 25 | // device-level overrides |
| 33 | virtual void device_config_complete(); | |
| 34 | 26 | virtual void device_start(); |
| 35 | 27 | // device_nvram_interface overrides |
| 36 | 28 | virtual void nvram_default(); |
| 37 | 29 | virtual void nvram_read(emu_file &file); |
| 38 | 30 | virtual void nvram_write(emu_file &file); |
| 39 | 31 | public: |
| 32 | ||
| 33 | template<class _Object> static devcb2_base &set_interrupt_callback(device_t &device, _Object object) { return downcast<rtc65271_device &>(device).m_interrupt_cb.set_callback(object); } | |
| 34 | ||
| 40 | 35 | DECLARE_READ8_MEMBER( rtc_r ); |
| 41 | 36 | DECLARE_READ8_MEMBER( xram_r ); |
| 42 | 37 | DECLARE_WRITE8_MEMBER( rtc_w ); |
| r29305 | r29306 | |
| 70 | 65 | UINT8 m_SQW_internal_state; |
| 71 | 66 | |
| 72 | 67 | /* callback called when interrupt pin state changes (may be NULL) */ |
| 73 | devcb_ | |
| 68 | devcb2_write_line m_interrupt_cb; | |
| 74 | 69 | }; |
| 75 | 70 | |
| 76 | 71 | // device type definition |
| r29305 | r29306 | |
|---|---|---|
| 759 | 759 | buf += sprintf(buf, "%s ", op_mnemonic); |
| 760 | 760 | need_cojunction = FALSE; |
| 761 | 761 | |
| 762 | for (i = 0; i < | |
| 762 | for (i = 0; i < ARRAY_LENGTH(flags); i++) | |
| 763 | 763 | { |
| 764 | 764 | if (op & flags[i].flag) |
| 765 | 765 | { |
| r29305 | r29306 | |
|---|---|---|
| 169 | 169 | m_flag = 1; |
| 170 | 170 | |
| 171 | 171 | /* setup ports */ |
| 172 | for (int p = 0; p < | |
| 172 | for (int p = 0; p < ARRAY_LENGTH(m_port); p++) | |
| 173 | 173 | { |
| 174 | 174 | m_port[p].m_mask_value = 0xff; |
| 175 | 175 | } |
| r29305 | r29306 | |
| 177 | 177 | /* setup timers */ |
| 178 | 178 | m_pc_timer = timer_alloc(TIMER_PC); |
| 179 | 179 | |
| 180 | for (int t = 0; t < | |
| 180 | for (int t = 0; t < ARRAY_LENGTH(m_timer); t++) | |
| 181 | 181 | { |
| 182 | 182 | cia_timer *timer = &m_timer[t]; |
| 183 | 183 | timer->m_timer = machine().scheduler().timer_alloc(FUNC(timer_proc), (void*)this); |
| r29305 | r29306 | |
|---|---|---|
| 447 | 447 | |
| 448 | 448 | nscsi_full_device::control *nscsi_full_device::buf_control_push() |
| 449 | 449 | { |
| 450 | if(buf_control_wpos == int( | |
| 450 | if(buf_control_wpos == int(ARRAY_LENGTH(buf_control))) | |
| 451 | 451 | throw emu_fatalerror("%s: buf_control overflow\n", tag()); |
| 452 | 452 | |
| 453 | 453 | control *c = buf_control + buf_control_wpos; |
| r29305 | r29306 | |
|---|---|---|
| 1481 | 1481 | tagcopy[i] = tolower((UINT8)tag[i]); |
| 1482 | 1482 | |
| 1483 | 1483 | /* find a match */ |
| 1484 | for (i = 0; i < | |
| 1484 | for (i = 0; i < ARRAY_LENGTH(static_help_list); i++) | |
| 1485 | 1485 | if (!strncmp(static_help_list[i].tag, tagcopy, taglen)) |
| 1486 | 1486 | { |
| 1487 | 1487 | foundcount++; |
| r29305 | r29306 | |
| 1503 | 1503 | |
| 1504 | 1504 | /* otherwise, indicate ambiguous help */ |
| 1505 | 1505 | msglen = sprintf(ambig_message, "Ambiguous help request, did you mean:\n"); |
| 1506 | for (i = 0; i < | |
| 1506 | for (i = 0; i < ARRAY_LENGTH(static_help_list); i++) | |
| 1507 | 1507 | if (!strncmp(static_help_list[i].tag, tagcopy, taglen)) |
| 1508 | 1508 | msglen += sprintf(&ambig_message[msglen], " help %s?\n", static_help_list[i].tag); |
| 1509 | 1509 | return ambig_message; |
| r29305 | r29306 | |
|---|---|---|
| 154 | 154 | NULL |
| 155 | 155 | }; |
| 156 | 156 | |
| 157 | #define MAX_OPS (( | |
| 157 | #define MAX_OPS ((ARRAY_LENGTH(TMS32010Formats) - 1) / PTRS_PER_FORMAT) | |
| 158 | 158 | |
| 159 | 159 | struct TMS32010Opcode { |
| 160 | 160 | word mask; /* instruction mask */ |
| r29305 | r29306 | |
|---|---|---|
| 74 | 74 | |
| 75 | 75 | #if defined(__GNUC__) && (__GNUC__ >= 3) |
| 76 | 76 | #define ATTR_PRINTF(x,y) __attribute__((format(printf, x, y))) |
| 77 | #define ATTR_NORETURN __attribute__((noreturn)) | |
| 77 | 78 | #else |
| 78 | 79 | #define ATTR_PRINTF(x,y) |
| 80 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) | |
| 81 | #define ATTR_NORETURN __declspec(noreturn) | |
| 82 | #else | |
| 83 | #define ATTR_NORETURN | |
| 79 | 84 | #endif |
| 85 | #endif | |
| 80 | 86 | |
| 81 | 87 | #define M68K_MAX_PATH 1024 |
| 82 | 88 | #define M68K_MAX_DIR 1024 |
| r29305 | r29306 | |
| 224 | 230 | |
| 225 | 231 | |
| 226 | 232 | /* Function Prototypes */ |
| 227 | static void error_exit(const char* fmt, ...) ATTR_PRINTF(1,2); | |
| 228 | static void perror_exit(const char* fmt, ...) ATTR_PRINTF(1,2); | |
| 233 | static void ATTR_NORETURN error_exit(const char* fmt, ...) ATTR_PRINTF(1,2); | |
| 234 | static void ATTR_NORETURN perror_exit(const char* fmt, ...) ATTR_PRINTF(1,2); | |
| 229 | 235 | static int check_strsncpy(char* dst, char* src, int maxlength); |
| 230 | 236 | static int check_atoi(char* str, int *result); |
| 231 | 237 | static int skip_spaces(char* str); |
| r29305 | r29306 | |
|---|---|---|
| 257 | 257 | NULL |
| 258 | 258 | }; |
| 259 | 259 | |
| 260 | #define MAX_OPS ((( | |
| 260 | #define MAX_OPS ((ARRAY_LENGTH(Formats) - 1) / PTRS_PER_FORMAT) | |
| 261 | 261 | |
| 262 | 262 | struct AD8201Opcode { |
| 263 | 263 | byte mask; |
| r29305 | r29306 | |
|---|---|---|
| 975 | 975 | const char *tlcs90_device::internal_registers_names(UINT16 x) |
| 976 | 976 | { |
| 977 | 977 | int ir = x - T90_IOBASE; |
| 978 | if ( ir >= 0 && ir < | |
| 978 | if ( ir >= 0 && ir < ARRAY_LENGTH(ir_names) ) | |
| 979 | 979 | return ir_names[ir]; |
| 980 | 980 | return NULL; |
| 981 | 981 | } |
| r29305 | r29306 | |
|---|---|---|
| 582 | 582 | |
| 583 | 583 | static const int hd6309_numops[3] = |
| 584 | 584 | { |
| 585 | sizeof(hd6309_pg0opcodes) / sizeof(hd6309_pg0opcodes[0]), | |
| 586 | sizeof(hd6309_pg1opcodes) / sizeof(hd6309_pg1opcodes[0]), | |
| 587 | sizeof(hd6309_pg2opcodes) / sizeof(hd6309_pg2opcodes[0]) | |
| 585 | ARRAY_LENGTH(hd6309_pg0opcodes), | |
| 586 | ARRAY_LENGTH(hd6309_pg1opcodes), | |
| 587 | ARRAY_LENGTH(hd6309_pg2opcodes) | |
| 588 | 588 | }; |
| 589 | 589 | |
| 590 | 590 | static const char *const hd6309_regs[5] = { "X", "Y", "U", "S", "PC" }; |
| r29305 | r29306 | |
|---|---|---|
| 351 | 351 | |
| 352 | 352 | static const int m6809_numops[3] = |
| 353 | 353 | { |
| 354 | sizeof(m6809_pg0opcodes) / sizeof(m6809_pg0opcodes[0]), | |
| 355 | sizeof(m6809_pg1opcodes) / sizeof(m6809_pg1opcodes[0]), | |
| 356 | sizeof(m6809_pg2opcodes) / sizeof(m6809_pg2opcodes[0]) | |
| 354 | ARRAY_LENGTH(m6809_pg0opcodes), | |
| 355 | ARRAY_LENGTH(m6809_pg1opcodes), | |
| 356 | ARRAY_LENGTH(m6809_pg2opcodes) | |
| 357 | 357 | }; |
| 358 | 358 | |
| 359 | 359 | static const char *const m6809_regs[5] = { "X", "Y", "U", "S", "PC" }; |
| r29305 | r29306 | |
|---|---|---|
| 94 | 94 | NULL |
| 95 | 95 | }; |
| 96 | 96 | |
| 97 | #define MAX_OPS ((( | |
| 97 | #define MAX_OPS ((ARRAY_LENGTH(PIC16C62xFormats) - 1) / PTRS_PER_FORMAT) | |
| 98 | 98 | |
| 99 | 99 | struct PIC16C62xOpcode { |
| 100 | 100 | word mask; /* instruction mask */ |
| r29305 | r29306 | |
|---|---|---|
| 314 | 314 | NULL |
| 315 | 315 | }; |
| 316 | 316 | |
| 317 | #define MAX_OPS (( | |
| 317 | #define MAX_OPS ((ARRAY_LENGTH(TMS32025Formats) - 1) / PTRS_PER_FORMAT) | |
| 318 | 318 | |
| 319 | 319 | struct TMS32025Opcode { |
| 320 | 320 | word mask; /* instruction mask */ |
| r29305 | r29306 | |
|---|---|---|
| 84 | 84 | NULL |
| 85 | 85 | }; |
| 86 | 86 | |
| 87 | #define MAX_OPS ((( | |
| 87 | #define MAX_OPS ((ARRAY_LENGTH(PIC16C5xFormats) - 1) / PTRS_PER_FORMAT) | |
| 88 | 88 | |
| 89 | 89 | struct PIC16C5xOpcode { |
| 90 | 90 | word mask; /* instruction mask */ |
| r0 | r29306 | |
|---|---|---|
| 1 | /***************************************************************************** | |
| 2 | * | |
| 3 | * tlcs_z80.c | |
| 4 | * TOSHIBA TLCS Z80 emulation | |
| 5 | */ | |
| 6 | ||
| 7 | #include "emu.h" | |
| 8 | #include "z80.h" | |
| 9 | #include "machine/z80ctc.h" | |
| 10 | #include "machine/z80pio.h" | |
| 11 | #include "machine/z80sio.h" | |
| 12 | ||
| 13 | //TODO: These interfaces should default to DEVCB_NULL pointers and | |
| 14 | // the actual callbacks should be provided by the driver that instantiates the TLCS-Z80 CPU. | |
| 15 | // We need methods for the driver to provide these interface configurations to the CPU core. | |
| 16 | // something like: | |
| 17 | // m_tlcsz80->set_internal_ctc_interface (ctc_intf); | |
| 18 | // m_tlcsz80->set_internal_pio_interface (pio_intf); | |
| 19 | // m_tlcsz80->set_internal_sio_interface (sio_intf); | |
| 20 | ||
| 21 | static Z80CTC_INTERFACE( ctc_intf ) | |
| 22 | { | |
| 23 | DEVCB_CPU_INPUT_LINE(DEVICE_SELF_OWNER, INPUT_LINE_IRQ0), /* interrupt handler */ | |
| 24 | DEVCB_NULL, /* ZC/TO0 callback */ | |
| 25 | DEVCB_NULL, /* ZC/TO1 callback */ | |
| 26 | DEVCB_NULL /* ZC/TO2 callback */ | |
| 27 | }; | |
| 28 | ||
| 29 | static Z80PIO_INTERFACE( pio_intf ) | |
| 30 | { | |
| 31 | DEVCB_CPU_INPUT_LINE(DEVICE_SELF_OWNER, INPUT_LINE_IRQ0), | |
| 32 | DEVCB_NULL, | |
| 33 | DEVCB_NULL, | |
| 34 | DEVCB_NULL, | |
| 35 | DEVCB_NULL, | |
| 36 | DEVCB_NULL, | |
| 37 | DEVCB_NULL | |
| 38 | }; | |
| 39 | ||
| 40 | static const z80sio_interface sio_intf = | |
| 41 | { | |
| 42 | DEVCB_CPU_INPUT_LINE(DEVICE_SELF_OWNER, INPUT_LINE_IRQ0), /* interrupt handler */ | |
| 43 | DEVCB_NULL, /* DTR changed handler */ | |
| 44 | DEVCB_NULL, /* RTS changed handler */ | |
| 45 | DEVCB_NULL, /* BREAK changed handler */ | |
| 46 | DEVCB_NULL, /* transmit handler */ | |
| 47 | DEVCB_NULL /* receive handler */ | |
| 48 | }; | |
| 49 | ||
| 50 | /* Daisy Chaining */ | |
| 51 | ||
| 52 | #ifdef UNUSED | |
| 53 | static const z80_daisy_config tlcsz80_daisy_chain[] = | |
| 54 | { | |
| 55 | { TLCSZ80_INTERNAL_CTC_TAG }, | |
| 56 | { TLCSZ80_INTERNAL_PIO_TAG }, | |
| 57 | { TLCSZ80_INTERNAL_SIO_TAG }, | |
| 58 | { NULL } | |
| 59 | }; | |
| 60 | #endif | |
| 61 | ||
| 62 | static ADDRESS_MAP_START( tlcs_z80_internal_io_map, AS_IO, 8, tlcs_z80_device ) | |
| 63 | AM_RANGE(0x10, 0x13) AM_DEVREADWRITE(TLCSZ80_INTERNAL_CTC_TAG, z80ctc_device, read, write) | |
| 64 | AM_RANGE(0x18, 0x1B) AM_DEVREADWRITE(TLCSZ80_INTERNAL_SIO_TAG, z80sio_device, read, write) | |
| 65 | AM_RANGE(0x1C, 0x1F) AM_DEVREADWRITE(TLCSZ80_INTERNAL_PIO_TAG, z80pio_device, read, write) | |
| 66 | // AM_RANGE(0xF0, 0xF0) TODO: Watchdog Timer: Stand-by mode Register | |
| 67 | // AM_RANGE(0xF1, 0xF1) TODO: Watchdog Timer: command Register | |
| 68 | // AM_RANGE(0xF4, 0xF4) TODO: Daisy chain interrupt precedence Register | |
| 69 | ADDRESS_MAP_END | |
| 70 | ||
| 71 | //This is wrong! | |
| 72 | //We should use the same clock as declared in the TLCS_Z80 instantiation in the driver that uses it. | |
| 73 | #define TLCS_Z80_CLOCK 8000000 | |
| 74 | ||
| 75 | static MACHINE_CONFIG_FRAGMENT( tlcs_z80 ) | |
| 76 | MCFG_Z80CTC_ADD(TLCSZ80_INTERNAL_CTC_TAG, TLCS_Z80_CLOCK, ctc_intf) | |
| 77 | MCFG_Z80SIO_ADD(TLCSZ80_INTERNAL_SIO_TAG, TLCS_Z80_CLOCK, sio_intf) | |
| 78 | MCFG_Z80PIO_ADD(TLCSZ80_INTERNAL_PIO_TAG, TLCS_Z80_CLOCK, pio_intf) | |
| 79 | MACHINE_CONFIG_END | |
| 80 | ||
| 81 | tlcs_z80_device::tlcs_z80_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) | |
| 82 | : z80_device(mconfig, TLCS_Z80, "TLCS-Z80", tag, owner, clock, "tlcs_z80", __FILE__), | |
| 83 | m_z80ctc(*this, TLCSZ80_INTERNAL_CTC_TAG), | |
| 84 | m_io_space_config( "io", ENDIANNESS_LITTLE, 8, 8, 0, ADDRESS_MAP_NAME( tlcs_z80_internal_io_map ) ) | |
| 85 | { } | |
| 86 | ||
| 87 | ||
| 88 | WRITE_LINE_MEMBER( tlcs_z80_device::ctc_trg0 ) { m_z80ctc->trg0(state ? 0 : 1); } | |
| 89 | WRITE_LINE_MEMBER( tlcs_z80_device::ctc_trg1 ) { m_z80ctc->trg1(state ? 0 : 1); } | |
| 90 | WRITE_LINE_MEMBER( tlcs_z80_device::ctc_trg2 ) { m_z80ctc->trg2(state ? 0 : 1); } | |
| 91 | WRITE_LINE_MEMBER( tlcs_z80_device::ctc_trg3 ) { m_z80ctc->trg3(state ? 0 : 1); } | |
| 92 | ||
| 93 | ||
| 94 | machine_config_constructor tlcs_z80_device::device_mconfig_additions() const | |
| 95 | { | |
| 96 | return MACHINE_CONFIG_NAME( tlcs_z80 ); | |
| 97 | } | |
| 98 | ||
| 99 | const device_type TLCS_Z80 = &device_creator<tlcs_z80_device>; | |
| 100 |
| Added: svn:mime-type + text/plain Added: svn:eol-style + native |
| r29305 | r29306 | |
|---|---|---|
| 4 | 4 | #define __Z80_H__ |
| 5 | 5 | |
| 6 | 6 | #include "z80daisy.h" |
| 7 | #include "machine/z80ctc.h" | |
| 7 | 8 | |
| 9 | #define TLCSZ80_INTERNAL_CTC_TAG "tlcsz80_int_ctc" | |
| 10 | #define TLCSZ80_INTERNAL_PIO_TAG "tlcsz80_int_pio" | |
| 11 | #define TLCSZ80_INTERNAL_SIO_TAG "tlcsz80_int_sio" | |
| 12 | ||
| 8 | 13 | enum |
| 9 | 14 | { |
| 10 | 15 | NSC800_RSTA = INPUT_LINE_IRQ0 + 1, |
| r29305 | r29306 | |
| 301 | 306 | |
| 302 | 307 | extern const device_type NSC800; |
| 303 | 308 | |
| 309 | class tlcs_z80_device : public z80_device | |
| 310 | { | |
| 311 | public: | |
| 312 | tlcs_z80_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32); | |
| 313 | ||
| 314 | required_device<z80ctc_device> m_z80ctc; | |
| 315 | ||
| 316 | DECLARE_WRITE8_MEMBER( ctc_w ); | |
| 317 | DECLARE_WRITE_LINE_MEMBER( ctc_trg0 ); | |
| 318 | DECLARE_WRITE_LINE_MEMBER( ctc_trg1 ); | |
| 319 | DECLARE_WRITE_LINE_MEMBER( ctc_trg2 ); | |
| 320 | DECLARE_WRITE_LINE_MEMBER( ctc_trg3 ); | |
| 321 | ||
| 322 | protected: | |
| 323 | virtual machine_config_constructor device_mconfig_additions() const; | |
| 324 | ||
| 325 | const address_space_config m_io_space_config; | |
| 326 | ||
| 327 | const address_space_config *memory_space_config(address_spacenum spacenum) const | |
| 328 | { | |
| 329 | switch (spacenum) | |
| 330 | { | |
| 331 | case AS_IO: return &m_io_space_config; | |
| 332 | default: return z80_device::memory_space_config(spacenum); | |
| 333 | } | |
| 334 | } | |
| 335 | }; | |
| 336 | ||
| 337 | extern const device_type TLCS_Z80; | |
| 338 | ||
| 304 | 339 | #endif /* __Z80_H__ */ |
| r29305 | r29306 | |
|---|---|---|
| 2209 | 2209 | |
| 2210 | 2210 | ifneq ($(filter Z80,$(CPUS)),) |
| 2211 | 2211 | OBJDIRS += $(CPUOBJ)/z80 |
| 2212 | CPUOBJS += $(CPUOBJ)/z80/z80.o $(CPUOBJ)/z80/z80daisy.o | |
| 2212 | CPUOBJS += $(CPUOBJ)/z80/z80.o $(CPUOBJ)/z80/tlcs_z80.o $(CPUOBJ)/z80/z80daisy.o | |
| 2213 | 2213 | DASMOBJS += $(CPUOBJ)/z80/z80dasm.o |
| 2214 | 2214 | endif |
| 2215 | 2215 | |
| 2216 | 2216 | $(CPUOBJ)/z80/z80.o: $(CPUSRC)/z80/z80.c \ |
| 2217 | 2217 | $(CPUSRC)/z80/z80.h |
| 2218 | 2218 | |
| 2219 | $(CPUOBJ)/z80/tlcs_z80.o: $(CPUSRC)/z80/tlcs_z80.c \ | |
| 2220 | $(CPUSRC)/z80/z80.h | |
| 2219 | 2221 | |
| 2220 | ||
| 2221 | 2222 | #------------------------------------------------- |
| 2222 | 2223 | # Sharp LR35902 (Game Boy CPU) |
| 2223 | 2224 | #@src/emu/cpu/lr35902/lr35902.h,CPUS += LR35902 |
| r29305 | r29306 | |
|---|---|---|
| 22 | 22 | |
| 23 | 23 | */ |
| 24 | 24 | |
| 25 | #include "emu.h" | |
| 26 | 25 | #include "upd3301.h" |
| 27 | 26 | |
| 28 | 27 | |
| 29 | // device type definition | |
| 30 | const device_type UPD3301 = &device_creator<upd3301_device>; | |
| 31 | 28 | |
| 32 | ||
| 33 | 29 | //************************************************************************** |
| 34 | 30 | // MACROS / CONSTANTS |
| 35 | 31 | //************************************************************************** |
| r29305 | r29306 | |
| 66 | 62 | |
| 67 | 63 | |
| 68 | 64 | //************************************************************************** |
| 69 | // I | |
| 65 | // DEVICE DEFINITIONS | |
| 70 | 66 | //************************************************************************** |
| 71 | 67 | |
| 72 | //------------------------------------------------- | |
| 73 | // set_interrupt - | |
| 74 | //------------------------------------------------- | |
| 68 | const device_type UPD3301 = &device_creator<upd3301_device>; | |
| 75 | 69 | |
| 76 | inline void upd3301_device::set_interrupt(int state) | |
| 77 | { | |
| 78 | if (LOG) logerror("UPD3301 '%s' Interrupt: %u\n", tag(), state); | |
| 79 | 70 | |
| 80 | m_out_int_func(state); | |
| 81 | 71 | |
| 82 | if (!state) | |
| 83 | { | |
| 84 | m_status &= ~(STATUS_N | STATUS_E); | |
| 85 | } | |
| 86 | } | |
| 87 | ||
| 88 | ||
| 89 | //------------------------------------------------- | |
| 90 | // set_drq - | |
| 91 | //------------------------------------------------- | |
| 92 | ||
| 93 | inline void upd3301_device::set_drq(int state) | |
| 94 | { | |
| 95 | if (LOG) logerror("UPD3301 '%s' DRQ: %u\n", tag(), state); | |
| 96 | ||
| 97 | m_out_drq_func(state); | |
| 98 | } | |
| 99 | ||
| 100 | ||
| 101 | //------------------------------------------------- | |
| 102 | // set_display - | |
| 103 | //------------------------------------------------- | |
| 104 | ||
| 105 | inline void upd3301_device::set_display(int state) | |
| 106 | { | |
| 107 | if (state) | |
| 108 | { | |
| 109 | m_status |= STATUS_VE; | |
| 110 | } | |
| 111 | else | |
| 112 | { | |
| 113 | m_status &= ~STATUS_VE; | |
| 114 | } | |
| 115 | } | |
| 116 | ||
| 117 | ||
| 118 | //------------------------------------------------- | |
| 119 | // reset_counters - | |
| 120 | //------------------------------------------------- | |
| 121 | ||
| 122 | inline void upd3301_device::reset_counters() | |
| 123 | { | |
| 124 | set_interrupt(0); | |
| 125 | set_drq(0); | |
| 126 | } | |
| 127 | ||
| 128 | ||
| 129 | //------------------------------------------------- | |
| 130 | // update_hrtc_timer - | |
| 131 | //------------------------------------------------- | |
| 132 | ||
| 133 | inline void upd3301_device::update_hrtc_timer(int state) | |
| 134 | { | |
| 135 | int y = m_screen->vpos(); | |
| 136 | ||
| 137 | int next_x = state ? m_h : 0; | |
| 138 | int next_y = state ? y : ((y + 1) % ((m_l + m_v) * m_width)); | |
| 139 | ||
| 140 | attotime duration = m_screen->time_until_pos(next_y, next_x); | |
| 141 | ||
| 142 | m_hrtc_timer->adjust(duration, !state); | |
| 143 | } | |
| 144 | ||
| 145 | ||
| 146 | //------------------------------------------------- | |
| 147 | // update_vrtc_timer - | |
| 148 | //------------------------------------------------- | |
| 149 | ||
| 150 | inline void upd3301_device::update_vrtc_timer(int state) | |
| 151 | { | |
| 152 | int next_y = state ? (m_l * m_r) : 0; | |
| 153 | ||
| 154 | attotime duration = m_screen->time_until_pos(next_y, 0); | |
| 155 | ||
| 156 | m_vrtc_timer->adjust(duration, !state); | |
| 157 | } | |
| 158 | ||
| 159 | ||
| 160 | //------------------------------------------------- | |
| 161 | // recompute_parameters - | |
| 162 | //------------------------------------------------- | |
| 163 | ||
| 164 | inline void upd3301_device::recompute_parameters() | |
| 165 | { | |
| 166 | int horiz_pix_total = (m_h + m_z) * m_width; | |
| 167 | int vert_pix_total = (m_l + m_v) * m_r; | |
| 168 | ||
| 169 | attoseconds_t refresh = HZ_TO_ATTOSECONDS(clock()) * horiz_pix_total * vert_pix_total; | |
| 170 | ||
| 171 | rectangle visarea; | |
| 172 | ||
| 173 | visarea.set(0, (m_h * m_width) - 1, 0, (m_l * m_r) - 1); | |
| 174 | ||
| 175 | if (LOG) | |
| 176 | { | |
| 177 | if (LOG) logerror("UPD3301 '%s' Screen: %u x %u @ %f Hz\n", tag(), horiz_pix_total, vert_pix_total, 1 / ATTOSECONDS_TO_DOUBLE(refresh)); | |
| 178 | if (LOG) logerror("UPD3301 '%s' Visible Area: (%u, %u) - (%u, %u)\n", tag(), visarea.min_x, visarea.min_y, visarea.max_x, visarea.max_y); | |
| 179 | } | |
| 180 | ||
| 181 | m_screen->configure(horiz_pix_total, vert_pix_total, visarea, refresh); | |
| 182 | ||
| 183 | update_hrtc_timer(0); | |
| 184 | update_vrtc_timer(0); | |
| 185 | } | |
| 186 | ||
| 187 | ||
| 188 | ||
| 189 | 72 | //************************************************************************** |
| 190 | 73 | // LIVE DEVICE |
| 191 | 74 | //************************************************************************** |
| r29305 | r29306 | |
| 194 | 77 | // upd3301_device - constructor |
| 195 | 78 | //------------------------------------------------- |
| 196 | 79 | |
| 197 | upd3301_device::upd3301_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) | |
| 198 | : device_t(mconfig, UPD3301, "UPD3301", tag, owner, clock, "upd3301", __FILE__), | |
| 199 | device_video_interface(mconfig, *this), | |
| 200 | m_status(0), | |
| 201 | m_param_count(0), | |
| 202 | m_data_fifo_pos(0), | |
| 203 | m_attr_fifo_pos(0), | |
| 204 | m_input_fifo(0), | |
| 205 | m_me(0), | |
| 206 | m_h(80), | |
| 207 | m_l(20), | |
| 208 | m_r(10), | |
| 209 | m_v(6), | |
| 210 | m_z(32), | |
| 211 | m_attr_blink(0), | |
| 212 | m_attr_frame(0), | |
| 213 | m_cm(0), | |
| 214 | m_cx(0), | |
| 215 | m_cy(0), | |
| 216 | m_cursor_blink(0), | |
| 217 | m_cursor_frame(0) | |
| 80 | upd3301_device::upd3301_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : | |
| 81 | device_t(mconfig, UPD3301, "UPD3301", tag, owner, clock, "upd3301", __FILE__), | |
| 82 | device_video_interface(mconfig, *this), | |
| 83 | m_write_int(*this), | |
| 84 | m_write_drq(*this), | |
| 85 | m_write_hrtc(*this), | |
| 86 | m_write_vrtc(*this), | |
| 87 | m_width(0), | |
| 88 | m_status(0), | |
| 89 | m_param_count(0), | |
| 90 | m_data_fifo_pos(0), | |
| 91 | m_attr_fifo_pos(0), | |
| 92 | m_input_fifo(0), | |
| 93 | m_me(0), | |
| 94 | m_h(80), | |
| 95 | m_l(20), | |
| 96 | m_r(10), | |
| 97 | m_v(6), | |
| 98 | m_z(32), | |
| 99 | m_attr_blink(0), | |
| 100 | m_attr_frame(0), | |
| 101 | m_cm(0), | |
| 102 | m_cx(0), | |
| 103 | m_cy(0), | |
| 104 | m_cursor_blink(0), | |
| 105 | m_cursor_frame(0) | |
| 218 | 106 | { |
| 219 | 107 | } |
| 220 | 108 | |
| 221 | 109 | |
| 222 | 110 | //------------------------------------------------- |
| 223 | // device_config_complete - perform any | |
| 224 | // operations now that the configuration is | |
| 225 | // complete | |
| 226 | //------------------------------------------------- | |
| 227 | ||
| 228 | void upd3301_device::device_config_complete() | |
| 229 | { | |
| 230 | // inherit a copy of the static data | |
| 231 | const upd3301_interface *intf = reinterpret_cast<const upd3301_interface *>(static_config()); | |
| 232 | if (intf != NULL) | |
| 233 | *static_cast<upd3301_interface *>(this) = *intf; | |
| 234 | ||
| 235 | // or initialize to defaults if none provided | |
| 236 | else | |
| 237 | { | |
| 238 | memset(&m_out_int_cb, 0, sizeof(m_out_int_cb)); | |
| 239 | memset(&m_out_drq_cb, 0, sizeof(m_out_drq_cb)); | |
| 240 | memset(&m_out_hrtc_cb, 0, sizeof(m_out_hrtc_cb)); | |
| 241 | memset(&m_out_vrtc_cb, 0, sizeof(m_out_vrtc_cb)); | |
| 242 | } | |
| 243 | } | |
| 244 | ||
| 245 | ||
| 246 | //------------------------------------------------- | |
| 247 | 111 | // device_start - device-specific startup |
| 248 | 112 | //------------------------------------------------- |
| 249 | 113 | |
| 250 | 114 | void upd3301_device::device_start() |
| 251 | 115 | { |
| 116 | // resolve callbacks | |
| 117 | m_display_cb.bind_relative_to(*owner()); | |
| 118 | m_write_drq.resolve_safe(); | |
| 119 | m_write_int.resolve_safe(); | |
| 120 | m_write_hrtc.resolve_safe(); | |
| 121 | m_write_vrtc.resolve_safe(); | |
| 122 | ||
| 252 | 123 | // allocate timers |
| 253 | 124 | m_hrtc_timer = timer_alloc(TIMER_HRTC); |
| 254 | 125 | m_vrtc_timer = timer_alloc(TIMER_VRTC); |
| 255 | 126 | m_drq_timer = timer_alloc(TIMER_DRQ); |
| 256 | 127 | |
| 257 | // resolve callbacks | |
| 258 | m_out_int_func.resolve(m_out_int_cb, *this); | |
| 259 | m_out_drq_func.resolve(m_out_drq_cb, *this); | |
| 260 | m_out_hrtc_func.resolve(m_out_hrtc_cb, *this); | |
| 261 | m_out_vrtc_func.resolve(m_out_vrtc_cb, *this); | |
| 262 | ||
| 263 | 128 | // state saving |
| 264 | 129 | save_item(NAME(m_y)); |
| 265 | 130 | save_item(NAME(m_hrtc)); |
| r29305 | r29306 | |
| 329 | 194 | case TIMER_HRTC: |
| 330 | 195 | if (LOG) logerror("UPD3301 '%s' HRTC: %u\n", tag(), param); |
| 331 | 196 | |
| 332 | m_ | |
| 197 | m_write_hrtc(param); | |
| 333 | 198 | m_hrtc = param; |
| 334 | 199 | |
| 335 | 200 | update_hrtc_timer(param); |
| r29305 | r29306 | |
| 338 | 203 | case TIMER_VRTC: |
| 339 | 204 | if (LOG) logerror("UPD3301 '%s' VRTC: %u\n", tag(), param); |
| 340 | 205 | |
| 341 | m_ | |
| 206 | m_write_vrtc(param); | |
| 342 | 207 | m_vrtc = param; |
| 343 | 208 | |
| 344 | 209 | if (param && !m_me) |
| r29305 | r29306 | |
| 609 | 474 | int csr = m_cm && m_cursor_blink && ((y / m_r) == m_cy) && (sx == m_cx); |
| 610 | 475 | int gpa = 0; // TODO |
| 611 | 476 | |
| 612 | m_display_cb( | |
| 477 | m_display_cb(*m_bitmap, y, sx, cc, lc, hlgt, rvv, vsp, sl0, sl12, csr, gpa); | |
| 613 | 478 | } |
| 614 | 479 | } |
| 615 | 480 | |
| r29305 | r29306 | |
| 655 | 520 | } |
| 656 | 521 | return 0; |
| 657 | 522 | } |
| 523 | ||
| 524 | ||
| 525 | //------------------------------------------------- | |
| 526 | // set_interrupt - | |
| 527 | //------------------------------------------------- | |
| 528 | ||
| 529 | void upd3301_device::set_interrupt(int state) | |
| 530 | { | |
| 531 | if (LOG) logerror("UPD3301 '%s' Interrupt: %u\n", tag(), state); | |
| 532 | ||
| 533 | m_write_int(state); | |
| 534 | ||
| 535 | if (!state) | |
| 536 | { | |
| 537 | m_status &= ~(STATUS_N | STATUS_E); | |
| 538 | } | |
| 539 | } | |
| 540 | ||
| 541 | ||
| 542 | //------------------------------------------------- | |
| 543 | // set_drq - | |
| 544 | //------------------------------------------------- | |
| 545 | ||
| 546 | void upd3301_device::set_drq(int state) | |
| 547 | { | |
| 548 | if (LOG) logerror("UPD3301 '%s' DRQ: %u\n", tag(), state); | |
| 549 | ||
| 550 | m_write_drq(state); | |
| 551 | } | |
| 552 | ||
| 553 | ||
| 554 | //------------------------------------------------- | |
| 555 | // set_display - | |
| 556 | //------------------------------------------------- | |
| 557 | ||
| 558 | void upd3301_device::set_display(int state) | |
| 559 | { | |
| 560 | if (state) | |
| 561 | { | |
| 562 | m_status |= STATUS_VE; | |
| 563 | } | |
| 564 | else | |
| 565 | { | |
| 566 | m_status &= ~STATUS_VE; | |
| 567 | } | |
| 568 | } | |
| 569 | ||
| 570 | ||
| 571 | //------------------------------------------------- | |
| 572 | // reset_counters - | |
| 573 | //------------------------------------------------- | |
| 574 | ||
| 575 | void upd3301_device::reset_counters() | |
| 576 | { | |
| 577 | set_interrupt(0); | |
| 578 | set_drq(0); | |
| 579 | } | |
| 580 | ||
| 581 | ||
| 582 | //------------------------------------------------- | |
| 583 | // update_hrtc_timer - | |
| 584 | //------------------------------------------------- | |
| 585 | ||
| 586 | void upd3301_device::update_hrtc_timer(int state) | |
| 587 | { | |
| 588 | int y = m_screen->vpos(); | |
| 589 | ||
| 590 | int next_x = state ? m_h : 0; | |
| 591 | int next_y = state ? y : ((y + 1) % ((m_l + m_v) * m_width)); | |
| 592 | ||
| 593 | attotime duration = m_screen->time_until_pos(next_y, next_x); | |
| 594 | ||
| 595 | m_hrtc_timer->adjust(duration, !state); | |
| 596 | } | |
| 597 | ||
| 598 | ||
| 599 | //------------------------------------------------- | |
| 600 | // update_vrtc_timer - | |
| 601 | //------------------------------------------------- | |
| 602 | ||
| 603 | void upd3301_device::update_vrtc_timer(int state) | |
| 604 | { | |
| 605 | int next_y = state ? (m_l * m_r) : 0; | |
| 606 | ||
| 607 | attotime duration = m_screen->time_until_pos(next_y, 0); | |
| 608 | ||
| 609 | m_vrtc_timer->adjust(duration, !state); | |
| 610 | } | |
| 611 | ||
| 612 | ||
| 613 | //------------------------------------------------- | |
| 614 | // recompute_parameters - | |
| 615 | //------------------------------------------------- | |
| 616 | ||
| 617 | void upd3301_device::recompute_parameters() | |
| 618 | { | |
| 619 | int horiz_pix_total = (m_h + m_z) * m_width; | |
| 620 | int vert_pix_total = (m_l + m_v) * m_r; | |
| 621 | ||
| 622 | attoseconds_t refresh = HZ_TO_ATTOSECONDS(clock()) * horiz_pix_total * vert_pix_total; | |
| 623 | ||
| 624 | rectangle visarea; | |
| 625 | ||
| 626 | visarea.set(0, (m_h * m_width) - 1, 0, (m_l * m_r) - 1); | |
| 627 | ||
| 628 | if (LOG) | |
| 629 | { | |
| 630 | if (LOG) logerror("UPD3301 '%s' Screen: %u x %u @ %f Hz\n", tag(), horiz_pix_total, vert_pix_total, 1 / ATTOSECONDS_TO_DOUBLE(refresh)); | |
| 631 | if (LOG) logerror("UPD3301 '%s' Visible Area: (%u, %u) - (%u, %u)\n", tag(), visarea.min_x, visarea.min_y, visarea.max_x, visarea.max_y); | |
| 632 | } | |
| 633 | ||
| 634 | m_screen->configure(horiz_pix_total, vert_pix_total, visarea, refresh); | |
| 635 | ||
| 636 | update_hrtc_timer(0); | |
| 637 | update_vrtc_timer(0); | |
| 638 | } | |
| 639 |
| r29305 | r29306 | |
|---|---|---|
| 42 | 42 | |
| 43 | 43 | |
| 44 | 44 | //************************************************************************** |
| 45 | // | |
| 45 | // INTERFACE CONFIGURATION MACROS | |
| 46 | 46 | //************************************************************************** |
| 47 | 47 | |
| 48 | #define UPD3301_DRAW_CHARACTER_MEMBER(_name) void _name(bitmap_rgb32 &bitmap, int y, int sx, UINT8 cc, UINT8 lc, int hlgt, int rvv, int vsp, int sl0, int sl12, int csr, int gpa) | |
| 48 | 49 | |
| 49 | 50 | |
| 51 | #define MCFG_UPD3301_CHARACTER_WIDTH(_value) \ | |
| 52 | upd3301_device::static_set_character_width(*device, _value); | |
| 50 | 53 | |
| 51 | //************************************************************************** | |
| 52 | // INTERFACE CONFIGURATION MACROS | |
| 53 | //************************************************************************** | |
| 54 | #define MCFG_UPD3301_DRAW_CHARACTER_CALLBACK_OWNER(_class, _method) \ | |
| 55 | upd3301_device::static_set_display_callback(*device, upd3301_draw_character_delegate(&_class::_method, #_class "::" #_method, downcast<_class *>(owner))); | |
| 54 | 56 | |
| 55 | #define MCFG_UPD3301_ADD(_tag, _clock, _intrf) \ | |
| 56 | MCFG_DEVICE_ADD(_tag, UPD3301, _clock) \ | |
| 57 | MCFG_DEVICE_CONFIG(_intrf) | |
| 57 | #define MCFG_UPD3301_DRQ_CALLBACK(_write) \ | |
| 58 | devcb = &upd3301_device::set_drq_wr_callback(*device, DEVCB2_##_write); | |
| 58 | 59 | |
| 60 | #define MCFG_UPD3301_INT_CALLBACK(_write) \ | |
| 61 | devcb = &upd3301_device::set_int_wr_callback(*device, DEVCB2_##_write); | |
| 59 | 62 | |
| 60 | #define UPD3301_INTERFACE(name) \ | |
| 61 | const upd3301_interface (name) = | |
| 63 | #define MCFG_UPD3301_HRTC_CALLBACK(_write) \ | |
| 64 | devcb = &upd3301_device::set_hrtc_wr_callback(*device, DEVCB2_##_write); | |
| 62 | 65 | |
| 66 | #define MCFG_UPD3301_VRTC_CALLBACK(_write) \ | |
| 67 | devcb = &upd3301_device::set_vrtc_wr_callback(*device, DEVCB2_##_write); | |
| 63 | 68 | |
| 64 | 69 | |
| 70 | ||
| 65 | 71 | //************************************************************************** |
| 66 | 72 | // TYPE DEFINITIONS |
| 67 | 73 | //************************************************************************** |
| 68 | 74 | |
| 69 | ||
| 75 | typedef device_delegate<void (bitmap_rgb32 &bitmap, int y, int sx, UINT8 cc, UINT8 lc, int hlgt, int rvv, int vsp, int sl0, int sl12, int csr, int gpa)> upd3301_draw_character_delegate; | |
| 70 | 76 | |
| 71 | typedef void (*upd3301_display_pixels_func)(device_t *device, bitmap_rgb32 &bitmap, int y, int sx, UINT8 cc, UINT8 lc, int hlgt, int rvv, int vsp, int sl0, int sl12, int csr, int gpa); | |
| 72 | #define UPD3301_DISPLAY_PIXELS(name) void name(device_t *device, bitmap_rgb32 &bitmap, int y, int sx, UINT8 cc, UINT8 lc, int hlgt, int rvv, int vsp, int sl0, int sl12, int csr, int gpa) | |
| 73 | 77 | |
| 74 | ||
| 75 | // ======================> upd3301_interface | |
| 76 | ||
| 77 | struct upd3301_interface | |
| 78 | { | |
| 79 | int m_width; // char width in pixels | |
| 80 | ||
| 81 | upd3301_display_pixels_func m_display_cb; | |
| 82 | ||
| 83 | devcb_write_line m_out_int_cb; | |
| 84 | devcb_write_line m_out_drq_cb; | |
| 85 | devcb_write_line m_out_hrtc_cb; | |
| 86 | devcb_write_line m_out_vrtc_cb; | |
| 87 | }; | |
| 88 | ||
| 89 | ||
| 90 | ||
| 91 | 78 | // ======================> upd3301_device |
| 92 | 79 | |
| 93 | 80 | class upd3301_device : public device_t, |
| 94 | public device_video_interface, | |
| 95 | public upd3301_interface | |
| 81 | public device_video_interface | |
| 96 | 82 | { |
| 97 | 83 | public: |
| 98 | 84 | // construction/destruction |
| 99 | 85 | upd3301_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 100 | 86 | |
| 87 | static void static_set_character_width(device_t &device, int value) { downcast<upd3301_device &>(device).m_width = value; } | |
| 88 | static void static_set_display_callback(device_t &device, upd3301_draw_character_delegate callback) { downcast<upd3301_device &>(device).m_display_cb = callback; } | |
| 89 | ||
| 90 | template<class _Object> static devcb2_base &set_drq_wr_callback(device_t &device, _Object object) { return downcast<upd3301_device &>(device).m_write_drq.set_callback(object); } | |
| 91 | template<class _Object> static devcb2_base &set_int_wr_callback(device_t &device, _Object object) { return downcast<upd3301_device &>(device).m_write_int.set_callback(object); } | |
| 92 | template<class _Object> static devcb2_base &set_hrtc_wr_callback(device_t &device, _Object object) { return downcast<upd3301_device &>(device).m_write_hrtc.set_callback(object); } | |
| 93 | template<class _Object> static devcb2_base &set_vrtc_wr_callback(device_t &device, _Object object) { return downcast<upd3301_device &>(device).m_write_vrtc.set_callback(object); } | |
| 94 | ||
| 101 | 95 | DECLARE_READ8_MEMBER( read ); |
| 102 | 96 | DECLARE_WRITE8_MEMBER( write ); |
| 103 | 97 | DECLARE_WRITE8_MEMBER( dack_w ); |
| r29305 | r29306 | |
| 109 | 103 | |
| 110 | 104 | protected: |
| 111 | 105 | // device-level overrides |
| 112 | virtual void device_config_complete(); | |
| 113 | 106 | virtual void device_start(); |
| 114 | 107 | virtual void device_reset(); |
| 115 | 108 | virtual void device_clock_changed(); |
| 116 | 109 | virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); |
| 117 | 110 | |
| 118 | 111 | private: |
| 119 | static const device_timer_id TIMER_HRTC = 0; | |
| 120 | static const device_timer_id TIMER_VRTC = 1; | |
| 121 | static const device_timer_id TIMER_DRQ = 2; | |
| 112 | enum | |
| 113 | { | |
| 114 | TIMER_HRTC, | |
| 115 | TIMER_VRTC, | |
| 116 | TIMER_DRQ | |
| 117 | }; | |
| 122 | 118 | |
| 123 | inline void set_interrupt(int state); | |
| 124 | inline void set_drq(int state); | |
| 125 | inline void set_display(int state); | |
| 126 | inline void reset_counters(); | |
| 127 | inline void update_hrtc_timer(int state); | |
| 128 | inline void update_vrtc_timer(int state); | |
| 129 | inline void recompute_parameters(); | |
| 119 | void set_interrupt(int state); | |
| 120 | void set_drq(int state); | |
| 121 | void set_display(int state); | |
| 122 | void reset_counters(); | |
| 123 | void update_hrtc_timer(int state); | |
| 124 | void update_vrtc_timer(int state); | |
| 125 | void recompute_parameters(); | |
| 130 | 126 | |
| 131 | 127 | void draw_scanline(); |
| 132 | 128 | |
| 133 | devcb_resolved_write_line m_out_int_func; | |
| 134 | devcb_resolved_write_line m_out_drq_func; | |
| 135 | devcb_resolved_write_line m_out_hrtc_func; | |
| 136 | devcb_resolved_write_line m_out_vrtc_func; | |
| 129 | devcb2_write_line m_write_int; | |
| 130 | devcb2_write_line m_write_drq; | |
| 131 | devcb2_write_line m_write_hrtc; | |
| 132 | devcb2_write_line m_write_vrtc; | |
| 137 | 133 | |
| 134 | upd3301_draw_character_delegate m_display_cb; | |
| 135 | int m_width; | |
| 136 | ||
| 138 | 137 | // screen drawing |
| 139 | 138 | bitmap_rgb32 *m_bitmap; // bitmap |
| 140 | 139 | int m_y; // current scanline |
| r29305 | r29306 | |
|---|---|---|
| 93 | 93 | m_write_drq(*this), |
| 94 | 94 | m_write_hrtc(*this), |
| 95 | 95 | m_write_vrtc(*this), |
| 96 | m_display_cb(NULL), | |
| 97 | 96 | m_status(0), |
| 98 | 97 | m_param_idx(0), |
| 99 | 98 | m_param_end(0), |
| r29305 | r29306 | |
| 124 | 123 | m_screen->register_screen_bitmap(m_bitmap); |
| 125 | 124 | |
| 126 | 125 | // resolve callbacks |
| 126 | m_display_cb.bind_relative_to(*owner()); | |
| 127 | 127 | m_write_drq.resolve_safe(); |
| 128 | 128 | m_write_irq.resolve_safe(); |
| 129 | 129 | m_write_hrtc.resolve_safe(); |
| r29305 | r29306 | |
| 334 | 334 | lc = (lc - 1) & 0x0f; |
| 335 | 335 | } |
| 336 | 336 | |
| 337 | if (m_display_cb) | |
| 338 | m_display_cb(this, m_bitmap, | |
| 337 | if (!m_display_cb.isnull()) | |
| 338 | m_display_cb(m_bitmap, | |
| 339 | 339 | sx * m_hpixels_per_column, // x position on screen of starting point |
| 340 | 340 | m_scanline, // y position on screen |
| 341 | 341 | lc, // current line of char |
| r29305 | r29306 | |
|---|---|---|
| 45 | 45 | // INTERFACE CONFIGURATION MACROS |
| 46 | 46 | //************************************************************************** |
| 47 | 47 | |
| 48 | #define I8275_DRAW_CHARACTER_MEMBER(_name) void _name(bitmap_rgb32 &bitmap, int x, int y, UINT8 linecount, UINT8 charcode, UINT8 lineattr, UINT8 lten, UINT8 rvv, UINT8 vsp, UINT8 gpa, UINT8 hlgt) | |
| 49 | ||
| 50 | ||
| 48 | 51 | #define MCFG_I8275_CHARACTER_WIDTH(_value) \ |
| 49 | 52 | i8275x_device::static_set_character_width(*device, _value); |
| 50 | 53 | |
| 51 | #define MCFG_I8275_DISPLAY_CALLBACK(_func) \ | |
| 52 | i8275x_device::static_set_display_callback(*device, _func); | |
| 54 | #define MCFG_I8275_DRAW_CHARACTER_CALLBACK_OWNER(_class, _method) \ | |
| 55 | i8275x_device::static_set_display_callback(*device, i8275_draw_character_delegate(&_class::_method, #_class "::" #_method, downcast<_class *>(owner))); | |
| 53 | 56 | |
| 54 | 57 | #define MCFG_I8275_DRQ_CALLBACK(_write) \ |
| 55 | 58 | devcb = &i8275x_device::set_drq_wr_callback(*device, DEVCB2_##_write); |
| r29305 | r29306 | |
| 70 | 73 | // TYPE DEFINITIONS |
| 71 | 74 | //************************************************************************** |
| 72 | 75 | |
| 73 | clas | |
| 76 | typedef device_delegate<void (bitmap_rgb32 &bitmap, int x, int y, UINT8 linecount, UINT8 charcode, UINT8 lineattr, UINT8 lten, UINT8 rvv, UINT8 vsp, UINT8 gpa, UINT8 hlgt)> i8275_draw_character_delegate; | |
| 74 | 77 | |
| 75 | 78 | |
| 76 | // ======================> i8275_display_pixels_func | |
| 77 | ||
| 78 | typedef void (*i8275_display_pixels_func)(i8275x_device *device, bitmap_rgb32 &bitmap, int x, int y, UINT8 linecount, UINT8 charcode, UINT8 lineattr, UINT8 lten, UINT8 rvv, UINT8 vsp, UINT8 gpa, UINT8 hlgt); | |
| 79 | #define I8275_DISPLAY_PIXELS(name) void name(i8275x_device *device, bitmap_rgb32 &bitmap, int x, int y, UINT8 linecount, UINT8 charcode, UINT8 lineattr, UINT8 lten, UINT8 rvv, UINT8 vsp, UINT8 gpa, UINT8 hlgt) | |
| 80 | ||
| 81 | ||
| 82 | 79 | // ======================> i8275x_device |
| 83 | 80 | |
| 84 | 81 | class i8275x_device : public device_t, |
| r29305 | r29306 | |
| 89 | 86 | i8275x_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 90 | 87 | |
| 91 | 88 | static void static_set_character_width(device_t &device, int value) { downcast<i8275x_device &>(device).m_hpixels_per_column = value; } |
| 92 | static void static_set_display_callback(device_t &device, i8275_d | |
| 89 | static void static_set_display_callback(device_t &device, i8275_draw_character_delegate callback) { downcast<i8275x_device &>(device).m_display_cb = callback; } | |
| 93 | 90 | |
| 94 | 91 | template<class _Object> static devcb2_base &set_drq_wr_callback(device_t &device, _Object object) { return downcast<i8275x_device &>(device).m_write_drq.set_callback(object); } |
| 95 | 92 | template<class _Object> static devcb2_base &set_irq_wr_callback(device_t &device, _Object object) { return downcast<i8275x_device &>(device).m_write_irq.set_callback(object); } |
| r29305 | r29306 | |
| 178 | 175 | devcb2_write_line m_write_hrtc; |
| 179 | 176 | devcb2_write_line m_write_vrtc; |
| 180 | 177 | |
| 181 | i8275_d | |
| 178 | i8275_draw_character_delegate m_display_cb; | |
| 182 | 179 | int m_hpixels_per_column; |
| 183 | 180 | |
| 184 | 181 | bitmap_rgb32 m_bitmap; |
| r29305 | r29306 | |
|---|---|---|
| 929 | 929 | } |
| 930 | 930 | |
| 931 | 931 | // loop through all modes |
| 932 | for (mode = 0; mode < | |
| 932 | for (mode = 0; mode < ARRAY_LENGTH(m_entries); mode++) | |
| 933 | 933 | { |
| 934 | 934 | const UINT8 *fontdata; |
| 935 | 935 | UINT8 character_mask; |
| r29305 | r29306 | |
|---|---|---|
| 151 | 151 | UINT8 character = data[i]; |
| 152 | 152 | |
| 153 | 153 | // based on the mode, determine which entry to use |
| 154 | const entry *e = &m_entries[mode % | |
| 154 | const entry *e = &m_entries[mode % ARRAY_LENGTH(m_entries)]; | |
| 155 | 155 | |
| 156 | 156 | // identify the character in the font data |
| 157 | 157 | const UINT8 *font_character = e->m_fontdata + (character & e->m_character_mask) * 12; |
| r29305 | r29306 | |
|---|---|---|
| 2901 | 2901 | { |
| 2902 | 2902 | // make our static table all watchpoints |
| 2903 | 2903 | if (s_watchpoint_table[0] != STATIC_WATCHPOINT) |
| 2904 | for (unsigned int i=0; i != | |
| 2904 | for (unsigned int i=0; i != ARRAY_LENGTH(s_watchpoint_table); i++) | |
| 2905 | 2905 | s_watchpoint_table[i] = STATIC_WATCHPOINT; |
| 2906 | 2906 | |
| 2907 | 2907 | // initialize everything to unmapped |
| r29305 | r29306 | |
|---|---|---|
| 120 | 120 | driver_device::device_start(); |
| 121 | 121 | |
| 122 | 122 | /* look up keyboard ports */ |
| 123 | for (int i = 0; i < | |
| 123 | for (int i = 0; i < ARRAY_LENGTH(m_keyboard); i++) | |
| 124 | 124 | { |
| 125 | 125 | char name[32]; |
| 126 | snprintf(name, | |
| 126 | snprintf(name, ARRAY_LENGTH(name), "row%d", i); | |
| 127 | 127 | m_keyboard[i] = ioport(name); |
| 128 | 128 | } |
| 129 | 129 | |
| r29305 | r29306 | |
| 850 | 850 | UINT8 pia0_pa_z = 0x7F; |
| 851 | 851 | |
| 852 | 852 | /* poll the keyboard, and update PA6-PA0 accordingly*/ |
| 853 | for (int i = 0; i < | |
| 853 | for (int i = 0; i < ARRAY_LENGTH(m_keyboard); i++) | |
| 854 | 854 | { |
| 855 | 855 | int value = m_keyboard[i]->read(); |
| 856 | 856 | if ((value | pia0_pb) != 0xFF) |
| r29305 | r29306 | |
|---|---|---|
| 842 | 842 | |
| 843 | 843 | /* should save PRAM to file */ |
| 844 | 844 | /* TODO : save time difference with host clock, set default date, etc */ |
| 845 | ||
| 845 | void lisa_state::nvram_init(nvram_device &nvram, void *data, size_t size) | |
| 846 | 846 | { |
| 847 | | |
| 847 | memset(data, 0x00, size); | |
| 848 | 848 | |
| 849 | if (read_or_write) | |
| 850 | 849 | { |
| 851 | file->write(state->m_fdc_ram, 1024); | |
| 852 | } | |
| 853 | else | |
| 854 | { | |
| 855 | if (file) | |
| 856 | file->read(state->m_fdc_ram, 1024); | |
| 857 | else | |
| 858 | memset(state->m_fdc_ram, 0, 1024); | |
| 850 | /* Now we copy the host clock into the Lisa clock */ | |
| 851 | system_time systime; | |
| 852 | machine().base_datetime(systime); | |
| 859 | 853 | |
| 860 | { | |
| 861 | /* Now we copy the host clock into the Lisa clock */ | |
| 862 | system_time systime; | |
| 863 | machine.base_datetime(systime); | |
| 854 | m_clock_regs.alarm = 0xfffffL; | |
| 855 | /* The clock count starts on 1st January 1980 */ | |
| 856 | m_clock_regs.years = (systime.local_time.year - 1980) & 0xf; | |
| 857 | m_clock_regs.days1 = (systime.local_time.day + 1) / 100; | |
| 858 | m_clock_regs.days2 = ((systime.local_time.day + 1) / 10) % 10; | |
| 859 | m_clock_regs.days3 = (systime.local_time.day + 1) % 10; | |
| 860 | m_clock_regs.hours1 = systime.local_time.hour / 10; | |
| 861 | m_clock_regs.hours2 = systime.local_time.hour % 10; | |
| 862 | m_clock_regs.minutes1 = systime.local_time.minute / 10; | |
| 863 | m_clock_regs.minutes2 = systime.local_time.minute % 10; | |
| 864 | m_clock_regs.seconds1 = systime.local_time.second / 10; | |
| 865 | m_clock_regs.seconds2 = systime.local_time.second % 10; | |
| 866 | m_clock_regs.tenths = 0; | |
| 864 | 867 | |
| 865 | state->m_clock_regs.alarm = 0xfffffL; | |
| 866 | /* The clock count starts on 1st January 1980 */ | |
| 867 | state->m_clock_regs.years = (systime.local_time.year - 1980) & 0xf; | |
| 868 | state->m_clock_regs.days1 = (systime.local_time.day + 1) / 100; | |
| 869 | state->m_clock_regs.days2 = ((systime.local_time.day + 1) / 10) % 10; | |
| 870 | state->m_clock_regs.days3 = (systime.local_time.day + 1) % 10; | |
| 871 | state->m_clock_regs.hours1 = systime.local_time.hour / 10; | |
| 872 | state->m_clock_regs.hours2 = systime.local_time.hour % 10; | |
| 873 | state->m_clock_regs.minutes1 = systime.local_time.minute / 10; | |
| 874 | state->m_clock_regs.minutes2 = systime.local_time.minute % 10; | |
| 875 | state->m_clock_regs.seconds1 = systime.local_time.second / 10; | |
| 876 | state->m_clock_regs.seconds2 = systime.local_time.second % 10; | |
| 877 | state->m_clock_regs.tenths = 0; | |
| 878 | } | |
| 879 | state->m_clock_regs.clock_mode = timer_disable; | |
| 880 | state->m_clock_regs.clock_write_ptr = -1; | |
| 868 | m_clock_regs.clock_mode = timer_disable; | |
| 869 | m_clock_regs.clock_write_ptr = -1; | |
| 881 | 870 | } |
| 882 | ||
| 883 | ||
| 884 | 871 | #if 0 |
| 885 | 872 | UINT32 temp32; |
| 886 | 873 | SINT8 temp8; |
| 887 | 874 | temp32 = (m_clock_regs.alarm << 12) | (m_clock_regs.years << 8) | (m_clock_regs.days1 << 4) |
| 888 | | |
| 875 | | m_clock_regs.days2; | |
| 889 | 876 | |
| 890 | 877 | temp32 = (m_clock_regs.days3 << 28) | (m_clock_regs.hours1 << 24) | (m_clock_regs.hours2 << 20) |
| 891 | | (m_clock_regs.minutes1 << 16) | (m_clock_regs.minutes2 << 12) | |
| 892 | | (m_clock_regs.seconds1 << 8) | (m_clock_regs.seconds2 << 4) | m_clock_regs.tenths; | |
| 878 | | (m_clock_regs.minutes1 << 16) | (m_clock_regs.minutes2 << 12) | |
| 879 | | (m_clock_regs.seconds1 << 8) | (m_clock_regs.seconds2 << 4) | m_clock_regs.tenths; | |
| 893 | 880 | |
| 894 | 881 | temp8 = clock_mode; /* clock mode */ |
| 895 | 882 | |
| 896 | 883 | temp8 = m_clock_regs.clock_write_ptr; /* clock byte to be written next (-1 if clock write disabled) */ |
| 897 | 884 | #endif |
| 885 | ||
| 898 | 886 | } |
| 899 | 887 | |
| 888 | ||
| 900 | 889 | #ifdef UNUSED_FUNCTION |
| 901 | 890 | void lisa_state::init_lisa1(void) |
| 902 | 891 | { |
| r29305 | r29306 | |
| 953 | 942 | |
| 954 | 943 | /* read command every ms (don't know the real value) */ |
| 955 | 944 | machine().scheduler().timer_pulse(attotime::from_msec(1), timer_expired_delegate(FUNC(lisa_state::set_COPS_ready),this)); |
| 945 | ||
| 946 | m_nvram->set_base(m_fdc_ram, 1024); | |
| 956 | 947 | } |
| 957 | 948 | |
| 958 | 949 | void lisa_state::machine_reset() |
| r29305 | r29306 | |
|---|---|---|
| 142 | 142 | |
| 143 | 143 | void sam6883_device::configure_bank(int bank, UINT8 *memory, UINT32 memory_size, bool is_read_only, read8_delegate rhandler, write8_delegate whandler) |
| 144 | 144 | { |
| 145 | assert((bank >= 0) && (bank < | |
| 145 | assert((bank >= 0) && (bank < ARRAY_LENGTH(m_banks))); | |
| 146 | 146 | m_banks[bank].m_memory = memory; |
| 147 | 147 | m_banks[bank].m_memory_size = memory_size; |
| 148 | 148 | m_banks[bank].m_memory_read_only = is_read_only; |
| r29305 | r29306 | |
|---|---|---|
| 41 | 41 | |
| 42 | 42 | m_pia_counter++; |
| 43 | 43 | //pia_counter = pia_counter && 0xff; |
| 44 | if (m_pia_counter & | |
| 44 | if (m_pia_counter & 0x80) pia->ca1_w(1); | |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | WRITE8_MEMBER( swtpc09_state::ptm_o3_callback ) |
| r29305 | r29306 | |
| 720 | 720 | |
| 721 | 721 | /* a read here clears the DMA end flag */ |
| 722 | 722 | m_m6844_channel[offset - 0x10].control &= ~0x80; |
| 723 | if (m_m6844_interrupt & | |
| 723 | if (m_m6844_interrupt & 0x80) // if interrupt is active, then clear | |
| 724 | 724 | { |
| 725 | 725 | swtpc09_irq_handler(0x01, CLEAR_LINE); |
| 726 | 726 | m_m6844_interrupt &= 0x7f; // clear interrupt indication bit 7 |
| r29305 | r29306 | |
|---|---|---|
| 125 | 125 | int m_fdc_tc; |
| 126 | 126 | |
| 127 | 127 | DECLARE_FLOPPY_FORMATS( floppy_formats ); |
| 128 | I8275_DRAW_CHARACTER_MEMBER( crtc_display_pixels ); | |
| 128 | 129 | UPD7220_DISPLAY_PIXELS_MEMBER( hgdc_display_pixels ); |
| 129 | 130 | }; |
| 130 | 131 |
| r29305 | r29306 | |
|---|---|---|
| 9 | 9 | #include "emu.h" |
| 10 | 10 | #include "cpu/z80/z80.h" |
| 11 | 11 | #include "sound/beep.h" |
| 12 | #include "machine/nvram.h" | |
| 12 | 13 | #include "machine/ram.h" |
| 13 | 14 | #include "sound/wave.h" |
| 14 | 15 | #include "imagedev/cartslot.h" |
| r29305 | r29306 | |
| 164 | 165 | m_printer(*this, "printer"), |
| 165 | 166 | m_beep(*this, "beeper"), |
| 166 | 167 | m_ram(*this, RAM_TAG), |
| 167 | m_cassette(*this, "cassette") | |
| 168 | m_nvram1(*this, "nvram1"), | |
| 169 | m_nvram2(*this, "nvram2"), | |
| 170 | m_cassette(*this, "cassette"), | |
| 171 | m_warm_start(1) | |
| 168 | 172 | { } |
| 169 | 173 | |
| 170 | 174 | required_device<cpu_device> m_maincpu; |
| 171 | 175 | required_device<printer_image_device> m_printer; |
| 172 | 176 | required_device<beep_device> m_beep; |
| 173 | 177 | required_device<ram_device> m_ram; |
| 178 | required_device<nvram_device> m_nvram1; | |
| 179 | required_device<nvram_device> m_nvram2; | |
| 174 | 180 | required_device<cassette_image_device> m_cassette; |
| 175 | 181 | |
| 176 | 182 | void machine_start(); |
| r29305 | r29306 | |
| 184 | 190 | DECLARE_INPUT_CHANGED_MEMBER( kb_break ); |
| 185 | 191 | DECLARE_INPUT_CHANGED_MEMBER( kb_update_udk ); |
| 186 | 192 | |
| 193 | DECLARE_DRIVER_INIT(x07); | |
| 194 | void nvram_init(nvram_device &nvram, void *data, size_t size); | |
| 195 | ||
| 187 | 196 | void t6834_cmd(UINT8 cmd); |
| 188 | 197 | void t6834_r(); |
| 189 | 198 | void t6834_w(); |
| r29305 | r29306 | |
|---|---|---|
| 10 | 10 | #define LISA_H_ |
| 11 | 11 | |
| 12 | 12 | #include "emu.h" |
| 13 | #include "cpu/m68000/m68000.h" | |
| 13 | 14 | #include "machine/6522via.h" |
| 14 | 15 | #include "machine/8530scc.h" |
| 15 | 16 | #include "machine/6522via.h" |
| 17 | #include "machine/nvram.h" | |
| 16 | 18 | #include "machine/applefdc.h" |
| 17 | 19 | #include "machine/sonydriv.h" |
| 18 | #include "cpu/m68000/m68000.h" | |
| 19 | 20 | #include "sound/speaker.h" |
| 20 | 21 | |
| 21 | 22 | #define COP421_TAG "u9f" |
| r29305 | r29306 | |
| 106 | 107 | m_fdc(*this, "fdc"), |
| 107 | 108 | m_scc(*this, "scc"), |
| 108 | 109 | m_speaker(*this, "speaker"), |
| 110 | m_nvram(*this, "nvram"), | |
| 109 | 111 | m_fdc_rom(*this,"fdc_rom"), |
| 110 | 112 | m_fdc_ram(*this,"fdc_ram"), |
| 111 | 113 | m_io_line0(*this, "LINE0"), |
| r29305 | r29306 | |
| 127 | 129 | optional_device<applefdc_base_device> m_fdc; |
| 128 | 130 | required_device<scc8530_t> m_scc; |
| 129 | 131 | required_device<speaker_sound_device> m_speaker; |
| 132 | required_device<nvram_device> m_nvram; | |
| 130 | 133 | |
| 131 | 134 | required_shared_ptr<UINT8> m_fdc_rom; |
| 132 | 135 | required_shared_ptr<UINT8> m_fdc_ram; |
| r29305 | r29306 | |
| 202 | 205 | virtual void machine_start(); |
| 203 | 206 | virtual void machine_reset(); |
| 204 | 207 | virtual void video_start(); |
| 208 | void nvram_init(nvram_device &nvram, void *data, size_t size); | |
| 205 | 209 | UINT32 screen_update_lisa(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 206 | 210 | INTERRUPT_GEN_MEMBER(lisa_interrupt); |
| 207 | 211 | TIMER_CALLBACK_MEMBER(handle_mouse); |
| r29305 | r29306 | |
|---|---|---|
| 13 | 13 | #include "video/hd61830.h" |
| 14 | 14 | #include "machine/mc146818.h" |
| 15 | 15 | #include "machine/ram.h" |
| 16 | #include "machine/nvram.h" | |
| 16 | 17 | #include "sound/beep.h" |
| 17 | 18 | #include "imagedev/cassette.h" |
| 18 | 19 | |
| r29305 | r29306 | |
| 30 | 31 | m_lcdc(*this, HD61830_TAG), |
| 31 | 32 | m_beep(*this, "beeper"), |
| 32 | 33 | m_rtc(*this, MC146818_TAG), |
| 34 | m_nvram1(*this, "nvram1"), | |
| 35 | m_nvram2(*this, "nvram2"), | |
| 33 | 36 | m_ram(*this, RAM_TAG), |
| 34 | 37 | m_ram_base(*this, "ram_base"), |
| 38 | m_status_flag(1), | |
| 35 | 39 | m_bank1(*this, "bank1"), |
| 36 | 40 | m_bit0(*this, "BIT0"), |
| 37 | 41 | m_bit1(*this, "BIT1"), |
| r29305 | r29306 | |
| 41 | 45 | m_bit5(*this, "BIT5"), |
| 42 | 46 | m_backbattery(*this, "BACKBATTERY"), |
| 43 | 47 | m_mainbattery(*this, "MAINBATTERY"), |
| 44 | m_cassette(*this, "cassette") { } | |
| 48 | m_cassette(*this, "cassette") | |
| 49 | { } | |
| 45 | 50 | |
| 46 | 51 | required_device<cpu_device> m_maincpu; |
| 47 | 52 | required_device<hd61830_device> m_lcdc; |
| 48 | 53 | required_device<beep_device> m_beep; |
| 49 | 54 | required_device<mc146818_device> m_rtc; |
| 55 | required_device<nvram_device> m_nvram1; | |
| 56 | required_device<nvram_device> m_nvram2; | |
| 50 | 57 | required_device<ram_device> m_ram; |
| 51 | 58 | |
| 52 | 59 | virtual void machine_start(); |
| 53 | 60 | virtual void machine_reset(); |
| 61 | void nvram_init(nvram_device &nvram, void *data, size_t size); | |
| 54 | 62 | |
| 55 | 63 | DECLARE_READ8_MEMBER( keypad_r ); |
| 56 | 64 | DECLARE_READ8_MEMBER( status_flag_r ); |
| r29305 | r29306 | |
| 70 | 78 | UINT8 m_banks_num; |
| 71 | 79 | UINT8 m_kp_matrix; |
| 72 | 80 | UINT8 m_lcd_contrast; |
| 73 | | |
| 81 | int m_lcd_backlight; | |
| 74 | 82 | UINT8 m_status_flag; |
| 75 | 83 | DECLARE_PALETTE_INIT(micronic); |
| 76 | 84 |
| r29305 | r29306 | |
|---|---|---|
| 12 | 12 | #define _PSION_H_ |
| 13 | 13 | |
| 14 | 14 | #include "cpu/m6800/m6800.h" |
| 15 | #include "machine/nvram.h" | |
| 15 | 16 | #include "machine/psion_pack.h" |
| 16 | 17 | #include "video/hd44780.h" |
| 17 | 18 | #include "sound/beep.h" |
| r29305 | r29306 | |
| 29 | 30 | m_beep(*this, "beeper"), |
| 30 | 31 | m_pack1(*this, "pack1"), |
| 31 | 32 | m_pack2(*this, "pack2"), |
| 33 | m_nvram1(*this, "nvram1"), | |
| 34 | m_nvram2(*this, "nvram2"), | |
| 35 | m_nvram3(*this, "nvram3"), | |
| 32 | 36 | m_sys_register(*this, "sys_register"), |
| 37 | m_stby_pwr(1), | |
| 33 | 38 | m_ram(*this, "ram"){ } |
| 34 | 39 | |
| 35 | 40 | required_device<hd63701_cpu_device> m_maincpu; |
| r29305 | r29306 | |
| 37 | 42 | required_device<beep_device> m_beep; |
| 38 | 43 | required_device<datapack_device> m_pack1; |
| 39 | 44 | required_device<datapack_device> m_pack2; |
| 45 | required_device<nvram_device> m_nvram1; | |
| 46 | required_device<nvram_device> m_nvram2; | |
| 47 | optional_device<nvram_device> m_nvram3; | |
| 40 | 48 | |
| 41 | 49 | UINT16 m_kb_counter; |
| 42 | 50 | UINT8 m_enable_nmi; |
| r29305 | r29306 | |
| 60 | 68 | |
| 61 | 69 | virtual void machine_start(); |
| 62 | 70 | virtual void machine_reset(); |
| 71 | void nvram_init(nvram_device &nvram, void *data, size_t size); | |
| 63 | 72 | |
| 64 | 73 | UINT8 kb_read(); |
| 65 | 74 | void update_banks(); |
| r29305 | r29306 | |
|---|---|---|
| 79 | 79 | |
| 80 | 80 | DECLARE_WRITE_LINE_MEMBER(write_centronics_busy); |
| 81 | 81 | DECLARE_WRITE_LINE_MEMBER(write_centronics_ack); |
| 82 | UPD3301_DRAW_CHARACTER_MEMBER( pc8001_display_pixels ); | |
| 82 | 83 | }; |
| 83 | 84 | |
| 84 | 85 | class pc8001mk2_state : public pc8001_state |
| r29305 | r29306 | |
|---|---|---|
| 11 | 11 | #include "machine/i8251.h" |
| 12 | 12 | #include "machine/clock.h" |
| 13 | 13 | #include "machine/ram.h" |
| 14 | #include "machine/nvram.h" | |
| 14 | 15 | #include "sound/beep.h" |
| 15 | 16 | |
| 16 | 17 | #define NC_NUM_COLOURS 4 |
| r29305 | r29306 | |
| 41 | 42 | m_beeper2(*this, "beep.2"), |
| 42 | 43 | m_centronics(*this, "centronics"), |
| 43 | 44 | m_uart(*this, "uart"), |
| 44 | m_uart_clock(*this, "uart_clock") | |
| 45 | m_uart_clock(*this, "uart_clock"), | |
| 46 | m_nvram(*this, "nvram") | |
| 45 | 47 | { |
| 46 | 48 | } |
| 47 | 49 | |
| r29305 | r29306 | |
| 115 | 117 | required_device<centronics_device> m_centronics; |
| 116 | 118 | required_device<i8251_device> m_uart; |
| 117 | 119 | required_device<clock_device> m_uart_clock; |
| 120 | required_device<nvram_device> m_nvram; | |
| 118 | 121 | |
| 119 | 122 | char m_memory_config[4]; |
| 120 | 123 | emu_timer *m_keyboard_timer; |
| r29305 | r29306 | |
|---|---|---|
| 8 | 8 | // i8275_interface crtc_intf |
| 9 | 9 | //------------------------------------------------- |
| 10 | 10 | |
| 11 | ||
| 11 | I8275_DRAW_CHARACTER_MEMBER( mm1_state::crtc_display_pixels ) | |
| 12 | 12 | { |
| 13 | m | |
| 13 | UINT8 romdata = m_char_rom->base()[(charcode << 4) | linecount]; | |
| 14 | 14 | |
| 15 | UINT8 romdata = state->m_char_rom->base()[(charcode << 4) | linecount]; | |
| 16 | ||
| 17 | 15 | int d0 = BIT(romdata, 0); |
| 18 | 16 | int d7 = BIT(romdata, 7); |
| 19 | 17 | int gpa0 = BIT(gpa, 0); |
| 20 | int llen = | |
| 18 | int llen = m_llen; | |
| 21 | 19 | int i; |
| 22 | 20 | |
| 23 | 21 | UINT8 data = (romdata << 1) | (d7 & d0); |
| r29305 | r29306 | |
| 31 | 29 | |
| 32 | 30 | int color = hlt_in ? 2 : (video_in ^ compl_in); |
| 33 | 31 | |
| 34 | bitmap.pix32(y, x + i) = | |
| 32 | bitmap.pix32(y, x + i) = m_palette->pen(color); | |
| 35 | 33 | } |
| 36 | 34 | } |
| 37 | 35 | |
| r29305 | r29306 | |
| 116 | 114 | |
| 117 | 115 | MCFG_DEVICE_ADD(I8275_TAG, I8275x, XTAL_18_720MHz/8) |
| 118 | 116 | MCFG_I8275_CHARACTER_WIDTH(8) |
| 119 | MCFG_I8275_D | |
| 117 | MCFG_I8275_DRAW_CHARACTER_CALLBACK_OWNER(mm1_state, crtc_display_pixels) | |
| 120 | 118 | MCFG_I8275_DRQ_CALLBACK(DEVWRITELINE(I8237_TAG, am9517a_device, dreq0_w)) |
| 121 | 119 | MCFG_I8275_VRTC_CALLBACK(DEVWRITELINE(UPD7220_TAG, upd7220_device, ext_sync_w)) |
| 122 | 120 | MCFG_VIDEO_SET_SCREEN(SCREEN_TAG) |
| r29305 | r29306 | |
|---|---|---|
| 952 | 952 | break; |
| 953 | 953 | } |
| 954 | 954 | |
| 955 | if (offset < | |
| 955 | if (offset < ARRAY_LENGTH(m_stic_registers)) | |
| 956 | 956 | m_stic_registers[offset] = data; |
| 957 | 957 | } |
| 958 | 958 |
| r29305 | r29306 | |
|---|---|---|
| 1787 | 1787 | pcm // PC/M Mugler |
| 1788 | 1788 | |
| 1789 | 1789 | // Ei Nis |
| 1790 | pecom32 | |
| 1790 | 1791 | pecom64 |
| 1791 | 1792 | |
| 1792 | 1793 | // Samsung SPC-1000 |
| r0 | r29306 | |
|---|---|---|
| 1 | <?xml version="1.0"?> | |
| 2 | <mamelayout version="2"> | |
| 3 | <element name="digit" defstate="0"> | |
| 4 | <led7seg> | |
| 5 | <color red="0.75" green="0.0" blue="0.0" /> | |
| 6 | </led7seg> | |
| 7 | </element> | |
| 8 | ||
| 9 | <element name="led" defstate="0"> | |
| 10 | <disk state="1"> | |
| 11 | <color red="0.75" green="0.0" blue="0.0" /> | |
| 12 | </disk> | |
| 13 | <disk state="0"> | |
| 14 | <color red="0.09375" green="0.0" blue="0.0" /> | |
| 15 | </disk> | |
| 16 | </element> | |
| 17 | ||
| 18 | <element name="background"> | |
| 19 | <rect> | |
| 20 | <bounds left="0" top="0" right="1" bottom="1" /> | |
| 21 | <color red="0.0" green="0.0" blue="0.0" /> | |
| 22 | </rect> | |
| 23 | </element> | |
| 24 | ||
| 25 | <view name="Default Layout"> | |
| 26 | <!-- Black background --> | |
| 27 | <bezel element="background"> | |
| 28 | <bounds left="00" top="00" right="2360" bottom="300" /> | |
| 29 | </bezel> | |
| 30 | ||
| 31 | <!-- PLAYER1 --> | |
| 32 | <bezel name="digit0" element="digit"> | |
| 33 | <bounds x="10" y="15" width="50" height="80" /> | |
| 34 | </bezel> | |
| 35 | <bezel name="digit1" element="digit"> | |
| 36 | <bounds x="70" y="15" width="50" height="80" /> | |
| 37 | </bezel> | |
| 38 | ||
| 39 | <bezel name="digit2" element="digit"> | |
| 40 | <bounds x="170" y="15" width="50" height="80" /> | |
| 41 | </bezel> | |
| 42 | <bezel name="digit3" element="digit"> | |
| 43 | <bounds x="230" y="15" width="50" height="80" /> | |
| 44 | </bezel> | |
| 45 | ||
| 46 | <bezel name="digit4" element="digit"> | |
| 47 | <bounds x="330" y="15" width="50" height="80" /> | |
| 48 | </bezel> | |
| 49 | <bezel name="digit5" element="digit"> | |
| 50 | <bounds x="390" y="15" width="50" height="80" /> | |
| 51 | </bezel> | |
| 52 | ||
| 53 | <bezel name="digit6" element="digit"> | |
| 54 | <bounds x="490" y="15" width="50" height="80" /> | |
| 55 | </bezel> | |
| 56 | <bezel name="digit7" element="digit"> | |
| 57 | <bounds x="550" y="15" width="50" height="80" /> | |
| 58 | </bezel> | |
| 59 | ||
| 60 | <!-- PLAYER2 --> | |
| 61 | <bezel name="digit8" element="digit"> | |
| 62 | <bounds x="750" y="15" width="50" height="80" /> | |
| 63 | </bezel> | |
| 64 | <bezel name="digit9" element="digit"> | |
| 65 | <bounds x="810" y="15" width="50" height="80" /> | |
| 66 | </bezel> | |
| 67 | ||
| 68 | <bezel name="digit10" element="digit"> | |
| 69 | <bounds x="910" y="15" width="50" height="80" /> | |
| 70 | </bezel> | |
| 71 | <bezel name="digit11" element="digit"> | |
| 72 | <bounds x="970" y="15" width="50" height="80" /> | |
| 73 | </bezel> | |
| 74 | ||
| 75 | <bezel name="digit12" element="digit"> | |
| 76 | <bounds x="1070" y="15" width="50" height="80" /> | |
| 77 | </bezel> | |
| 78 | <bezel name="digit13" element="digit"> | |
| 79 | <bounds x="1130" y="15" width="50" height="80" /> | |
| 80 | </bezel> | |
| 81 | ||
| 82 | <bezel name="digit14" element="digit"> | |
| 83 | <bounds x="1230" y="15" width="50" height="80" /> | |
| 84 | </bezel> | |
| 85 | <bezel name="digit15" element="digit"> | |
| 86 | <bounds x="1290" y="15" width="50" height="80" /> | |
| 87 | </bezel> | |
| 88 | ||
| 89 | ||
| 90 | <!-- 3-digit 7seg display --> | |
| 91 | <bezel name="digit24" element="digit"> | |
| 92 | <bounds x="1490" y="47" width="30" height="48" /> | |
| 93 | </bezel> | |
| 94 | <bezel name="digit25" element="digit"> | |
| 95 | <bounds x="1526" y="47" width="30" height="48" /> | |
| 96 | </bezel> | |
| 97 | <bezel name="digit26" element="digit"> | |
| 98 | <bounds x="1562" y="47" width="30" height="48" /> | |
| 99 | </bezel> | |
| 100 | ||
| 101 | ||
| 102 | <!-- RECORDER --> | |
| 103 | <bezel name="digit16" element="digit"> | |
| 104 | <bounds x="1762" y="15" width="50" height="80" /> | |
| 105 | </bezel> | |
| 106 | <bezel name="digit17" element="digit"> | |
| 107 | <bounds x="1822" y="15" width="50" height="80" /> | |
| 108 | </bezel> | |
| 109 | ||
| 110 | <bezel name="digit18" element="digit"> | |
| 111 | <bounds x="1922" y="15" width="50" height="80" /> | |
| 112 | </bezel> | |
| 113 | <bezel name="digit19" element="digit"> | |
| 114 | <bounds x="1982" y="15" width="50" height="80" /> | |
| 115 | </bezel> | |
| 116 | ||
| 117 | <bezel name="digit20" element="digit"> | |
| 118 | <bounds x="2082" y="15" width="50" height="80" /> | |
| 119 | </bezel> | |
| 120 | <bezel name="digit21" element="digit"> | |
| 121 | <bounds x="2142" y="15" width="50" height="80" /> | |
| 122 | </bezel> | |
| 123 | ||
| 124 | <bezel name="digit22" element="digit"> | |
| 125 | <bounds x="2242" y="15" width="50" height="80" /> | |
| 126 | </bezel> | |
| 127 | <bezel name="digit23" element="digit"> | |
| 128 | <bounds x="2302" y="15" width="50" height="80" /> | |
| 129 | </bezel> | |
| 130 | </view> | |
| 131 | </mamelayout> |
| Added: svn:mime-type + text/plain Added: svn:eol-style + native |
| r29305 | r29306 | |
|---|---|---|
| 369 | 369 | m_fdc->set_drive(1); |
| 370 | 370 | |
| 371 | 371 | m_fdc->set_side((data & SANDY_SIDE_MASK) >> SANDY_SIDE_SHIFT); |
| 372 | if ((data & SANDY_SIDE_MASK) & (LOG_DISK_READ | LOG_DISK_WRITE)) | |
| 372 | if ((data & SANDY_SIDE_MASK) && (LOG_DISK_READ | LOG_DISK_WRITE)) | |
| 373 | 373 | { |
| 374 | 374 | logerror("Accessing side 1\n"); |
| 375 | 375 | } |
| r29305 | r29306 | |
|---|---|---|
| 28 | 28 | |
| 29 | 29 | ****************************************************************************/ |
| 30 | 30 | |
| 31 | ||
| 32 | 31 | #include "includes/x07.h" |
| 33 | #include "mcfglgcy.h" | |
| 34 | 32 | |
| 35 | 33 | /*************************************************************************** |
| 36 | 34 | T6834 IMPLEMENTATION |
| r29305 | r29306 | |
| 1324 | 1322 | INPUT_PORTS_END |
| 1325 | 1323 | |
| 1326 | 1324 | |
| 1327 | static | |
| 1325 | void x07_state::nvram_init(nvram_device &nvram, void *data, size_t size) | |
| 1328 | 1326 | { |
| 1329 | x07_state *state = machine.driver_data<x07_state>(); | |
| 1330 | ||
| 1331 | if (read_or_write) | |
| 1332 | { | |
| 1333 | file->write(state->m_t6834_ram, sizeof(state->m_t6834_ram)); | |
| 1334 | file->write(state->m_ram->pointer(), state->m_ram->size()); | |
| 1335 | } | |
| 1336 | else | |
| 1337 | { | |
| 1338 | if (file) | |
| 1339 | { | |
| 1340 | file->read(state->m_t6834_ram, sizeof(state->m_t6834_ram)); | |
| 1341 | file->read(state->m_ram->pointer(), state->m_ram->size()); | |
| 1342 | state->m_warm_start = 1; | |
| 1343 | } | |
| 1344 | else | |
| 1345 | { | |
| 1346 | memset(state->m_t6834_ram, 0, sizeof(state->m_t6834_ram)); | |
| 1347 | memset(state->m_ram->pointer(), 0, state->m_ram->size()); | |
| 1348 | ||
| 1349 | for(int i = 0; i < 12; i++) | |
| 1350 | strcpy((char*)state->m_t6834_ram + udk_offset[i], udk_ini[i]); | |
| 1351 | ||
| 1352 | //copy default chars in the UDC | |
| 1353 | memcpy(state->m_t6834_ram + 0x200, (UINT8*)machine.root_device().memregion("gfx1")->base() + 0x400, 0x100); | |
| 1354 | memcpy(state->m_t6834_ram + 0x300, (UINT8*)machine.root_device().memregion("gfx1")->base() + 0x700, 0x100); | |
| 1355 | state->m_warm_start = 0; | |
| 1356 | } | |
| 1357 | } | |
| 1327 | memcpy(data, memregion("default")->base(), size); | |
| 1328 | m_warm_start = 0; | |
| 1358 | 1329 | } |
| 1359 | 1330 | |
| 1360 | 1331 | TIMER_DEVICE_CALLBACK_MEMBER(x07_state::blink_timer) |
| r29305 | r29306 | |
| 1403 | 1374 | m_cass_poll = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(x07_state::cassette_poll),this)); |
| 1404 | 1375 | m_cass_tick = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(x07_state::cassette_tick),this)); |
| 1405 | 1376 | |
| 1377 | m_nvram1->set_base(&m_t6834_ram, 0x800); | |
| 1378 | m_nvram2->set_base(m_ram->pointer(), m_ram->size()); | |
| 1379 | ||
| 1406 | 1380 | /* Save State */ |
| 1407 | 1381 | save_item(NAME(m_sleep)); |
| 1408 | 1382 | save_item(NAME(m_warm_start)); |
| r29305 | r29306 | |
| 1525 | 1499 | |
| 1526 | 1500 | MCFG_TIMER_DRIVER_ADD_PERIODIC("blink_timer", x07_state, blink_timer, attotime::from_msec(300)) |
| 1527 | 1501 | |
| 1528 | MCFG_NVRAM_HANDLER( x07 ) | |
| 1502 | MCFG_NVRAM_ADD_CUSTOM_DRIVER("nvram1", x07_state, nvram_init) // t6834 RAM | |
| 1503 | MCFG_NVRAM_ADD_0FILL("nvram2") // RAM banks | |
| 1529 | 1504 | |
| 1530 | 1505 | /* internal ram */ |
| 1531 | 1506 | MCFG_RAM_ADD(RAM_TAG) |
| r29305 | r29306 | |
| 1561 | 1536 | |
| 1562 | 1537 | ROM_REGION( 0x0800, "gfx1", 0 ) |
| 1563 | 1538 | ROM_LOAD( "charset.rom", 0x0000, 0x0800, BAD_DUMP CRC(b1e59a6e) SHA1(b0c06315a2d5c940a8f288fb6a3428d738696e69) ) |
| 1539 | ||
| 1540 | ROM_REGION( 0x0800, "default", ROMREGION_ERASE00 ) | |
| 1564 | 1541 | ROM_END |
| 1565 | 1542 | |
| 1543 | DRIVER_INIT_MEMBER(x07_state, x07) | |
| 1544 | { | |
| 1545 | UINT8 *RAM = memregion("default")->base(); | |
| 1546 | UINT8 *GFX = memregion("gfx1")->base(); | |
| 1547 | ||
| 1548 | for (int i = 0; i < 12; i++) | |
| 1549 | strcpy((char *)RAM + udk_offset[i], udk_ini[i]); | |
| 1550 | ||
| 1551 | //copy default chars in the UDC | |
| 1552 | memcpy(RAM + 0x200, GFX + 0x400, 0x100); | |
| 1553 | memcpy(RAM + 0x300, GFX + 0x700, 0x100); | |
| 1554 | } | |
| 1555 | ||
| 1556 | ||
| 1566 | 1557 | /* Driver */ |
| 1567 | 1558 | |
| 1568 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ | |
| 1569 | COMP( 1983, x07, 0, 0, x07, x07, driver_device, 0, "Canon", "X-07", GAME_SUPPORTS_SAVE) | |
| 1559 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ | |
| 1560 | COMP( 1983, x07, 0, 0, x07, x07, x07_state, x07, "Canon", "X-07", GAME_SUPPORTS_SAVE) |
| r29305 | r29306 | |
|---|---|---|
| 364 | 364 | rgb_t::white |
| 365 | 365 | }; |
| 366 | 366 | |
| 367 | ||
| 367 | UPD3301_DRAW_CHARACTER_MEMBER( pc8001_state::pc8001_display_pixels ) | |
| 368 | 368 | { |
| 369 | pc8001_state *state = device->machine().driver_data<pc8001_state>(); | |
| 370 | ||
| 371 | UINT8 data = state->m_char_rom->base()[(cc << 3) | lc]; | |
| 369 | UINT8 data = m_char_rom->base()[(cc << 3) | lc]; | |
| 372 | 370 | int i; |
| 373 | 371 | |
| 374 | 372 | if (lc >= 8) return; |
| 375 | 373 | if (csr) data = 0xff; |
| 376 | 374 | |
| 377 | if ( | |
| 375 | if (m_width80) | |
| 378 | 376 | { |
| 379 | 377 | for (i = 0; i < 8; i++) |
| 380 | 378 | { |
| r29305 | r29306 | |
| 401 | 399 | } |
| 402 | 400 | } |
| 403 | 401 | |
| 404 | static UPD3301_INTERFACE( pc8001_upd3301_intf ) | |
| 405 | { | |
| 406 | 8, | |
| 407 | pc8001_display_pixels, | |
| 408 | DEVCB_NULL, | |
| 409 | DEVCB_DEVICE_LINE_MEMBER(I8257_TAG, i8257_device, i8257_drq2_w), | |
| 410 | DEVCB_NULL, | |
| 411 | DEVCB_NULL | |
| 412 | }; | |
| 413 | ||
| 414 | 402 | /* 8255 Interface */ |
| 415 | 403 | |
| 416 | 404 | static I8255A_INTERFACE( ppi_intf ) |
| r29305 | r29306 | |
| 559 | 547 | MCFG_I8255A_ADD(I8255A_TAG, ppi_intf) |
| 560 | 548 | MCFG_I8257_ADD(I8257_TAG, 4000000, dmac_intf) |
| 561 | 549 | MCFG_UPD1990A_ADD(UPD1990A_TAG, XTAL_32_768kHz, NULL, NULL) |
| 562 | MCFG_UPD3301_ADD(UPD3301_TAG, 14318180, pc8001_upd3301_intf) | |
| 550 | ||
| 551 | MCFG_DEVICE_ADD(UPD3301_TAG, UPD3301, 14318180) | |
| 552 | MCFG_UPD3301_CHARACTER_WIDTH(8) | |
| 553 | MCFG_UPD3301_DRAW_CHARACTER_CALLBACK_OWNER(pc8001_state, pc8001_display_pixels) | |
| 554 | MCFG_UPD3301_VRTC_CALLBACK(DEVWRITELINE(I8257_TAG, i8257_device, i8257_drq2_w)) | |
| 563 | 555 | |
| 564 | 556 | MCFG_CENTRONICS_ADD(CENTRONICS_TAG, centronics_printers, "image") |
| 565 | 557 | MCFG_CENTRONICS_ACK_HANDLER(WRITELINE(pc8001_state, write_centronics_ack)) |
| r29305 | r29306 | |
| 599 | 591 | MCFG_I8255A_ADD(I8255A_TAG, ppi_intf) |
| 600 | 592 | MCFG_I8257_ADD(I8257_TAG, 4000000, dmac_intf) |
| 601 | 593 | MCFG_UPD1990A_ADD(UPD1990A_TAG, XTAL_32_768kHz, NULL, NULL) |
| 602 | MCFG_UPD3301_ADD(UPD3301_TAG, 14318180, pc8001_upd3301_intf) | |
| 603 | 594 | |
| 595 | MCFG_DEVICE_ADD(UPD3301_TAG, UPD3301, 14318180) | |
| 596 | MCFG_UPD3301_CHARACTER_WIDTH(8) | |
| 597 | MCFG_UPD3301_DRAW_CHARACTER_CALLBACK_OWNER(pc8001_state, pc8001_display_pixels) | |
| 598 | MCFG_UPD3301_VRTC_CALLBACK(DEVWRITELINE(I8257_TAG, i8257_device, i8257_drq2_w)) | |
| 599 | ||
| 604 | 600 | MCFG_CENTRONICS_ADD(CENTRONICS_TAG, centronics_printers, "image") |
| 605 | 601 | |
| 606 | 602 | MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", CENTRONICS_TAG) |
| r29305 | r29306 | |
|---|---|---|
| 82 | 82 | DECLARE_WRITE8_MEMBER(pia0_porta_w); |
| 83 | 83 | DECLARE_WRITE8_MEMBER(kbd_put); |
| 84 | 84 | DECLARE_READ8_MEMBER(keyboard_r); |
| 85 | I8275_DRAW_CHARACTER_MEMBER( zorba_update_chr ); | |
| 86 | ||
| 85 | 87 | private: |
| 86 | 88 | UINT8 m_term_data; |
| 87 | 89 | required_device<cpu_device> m_maincpu; |
| r29305 | r29306 | |
| 258 | 260 | palette.set_pen_color(2, 0, 128, 0 ); /* Dimmed */ |
| 259 | 261 | } |
| 260 | 262 | |
| 261 | ||
| 263 | I8275_DRAW_CHARACTER_MEMBER( zorba_state::zorba_update_chr ) | |
| 262 | 264 | { |
| 263 | 265 | int i; |
| 264 | zorba_state *state = device->machine().driver_data<zorba_state>(); | |
| 265 | const rgb_t *palette = state->m_palette->palette()->entry_list_raw(); | |
| 266 | UINT8 gfx = state->m_p_chargen[(linecount & 15) + (charcode << 4)]; | |
| 266 | const rgb_t *palette = m_palette->palette()->entry_list_raw(); | |
| 267 | UINT8 gfx = m_p_chargen[(linecount & 15) + (charcode << 4)]; | |
| 267 | 268 | |
| 268 | 269 | if (vsp) |
| 269 | 270 | gfx = 0; |
| r29305 | r29306 | |
| 396 | 397 | |
| 397 | 398 | MCFG_DEVICE_ADD("crtc", I8275x, XTAL_14_31818MHz/7) |
| 398 | 399 | MCFG_I8275_CHARACTER_WIDTH(8) |
| 399 | MCFG_I8275_D | |
| 400 | MCFG_I8275_DRAW_CHARACTER_CALLBACK_OWNER(zorba_state, zorba_update_chr) | |
| 400 | 401 | MCFG_I8275_DRQ_CALLBACK(DEVWRITELINE("dma", z80dma_device, rdy_w)) |
| 401 | 402 | MCFG_I8275_IRQ_CALLBACK(INPUTLINE("maincpu", INPUT_LINE_IRQ0)) |
| 402 | 403 | MCFG_FD1793x_ADD("fdc", XTAL_24MHz / 24) |
| r29305 | r29306 | |
|---|---|---|
| 105 | 105 | #include "sound/beep.h" |
| 106 | 106 | #include "machine/ram.h" |
| 107 | 107 | #include "rendlay.h" |
| 108 | #include "mcfglgcy.h" | |
| 109 | 108 | |
| 109 | ||
| 110 | 110 | #define VERBOSE 0 |
| 111 | 111 | #define LOG(x) do { if (VERBOSE) logerror x; } while (0) |
| 112 | 112 | |
| r29305 | r29306 | |
| 404 | 404 | } |
| 405 | 405 | |
| 406 | 406 | |
| 407 | static NVRAM_HANDLER( nc ) | |
| 408 | { | |
| 409 | nc_state *state = machine.driver_data<nc_state>(); | |
| 410 | ||
| 411 | if (read_or_write) | |
| 412 | { | |
| 413 | file->write(state->m_ram->pointer(), state->m_ram->size()); | |
| 414 | } | |
| 415 | else if (file) | |
| 416 | { | |
| 417 | file->read(state->m_ram->pointer(), state->m_ram->size()); | |
| 418 | } | |
| 419 | else | |
| 420 | { | |
| 421 | // leave whatever ram device defaulted to | |
| 422 | } | |
| 423 | } | |
| 424 | ||
| 425 | ||
| 426 | 407 | TIMER_DEVICE_CALLBACK_MEMBER(nc_state::dummy_timer_callback) |
| 427 | 408 | { |
| 428 | 409 | int inputport_10_state; |
| r29305 | r29306 | |
| 836 | 817 | /* keyboard timer */ |
| 837 | 818 | m_keyboard_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(nc_state::nc_keyboard_timer_callback),this)); |
| 838 | 819 | m_keyboard_timer->adjust(attotime::from_msec(10)); |
| 820 | ||
| 821 | m_nvram->set_base(m_ram->pointer(), m_ram->size()); | |
| 839 | 822 | } |
| 840 | 823 | |
| 841 | 824 | |
| r29305 | r29306 | |
| 1471 | 1454 | /* internal ram */ |
| 1472 | 1455 | MCFG_RAM_ADD(RAM_TAG) |
| 1473 | 1456 | MCFG_RAM_DEFAULT_SIZE("64K") |
| 1474 | MCFG_NVRAM_ | |
| 1457 | MCFG_NVRAM_ADD_NO_FILL("nvram") | |
| 1475 | 1458 | |
| 1476 | 1459 | /* dummy timer */ |
| 1477 | 1460 | MCFG_TIMER_DRIVER_ADD_PERIODIC("dummy_timer", nc_state, dummy_timer_callback, attotime::from_hz(50)) |
| r29305 | r29306 | |
|---|---|---|
| 116 | 116 | #include "emu.h" |
| 117 | 117 | #include "includes/micronic.h" |
| 118 | 118 | #include "rendlay.h" |
| 119 | #include "mcfglgcy.h" | |
| 120 | 119 | |
| 121 | 120 | READ8_MEMBER( micronic_state::keypad_r ) |
| 122 | 121 | { |
| r29305 | r29306 | |
| 300 | 299 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("END") PORT_CODE(KEYCODE_END) |
| 301 | 300 | INPUT_PORTS_END |
| 302 | 301 | |
| 303 | static NVRAM_HANDLER( micronic ) | |
| 304 | { | |
| 305 | micronic_state *state = machine.driver_data<micronic_state>(); | |
| 306 | 302 | |
| 307 | if (read_or_write) | |
| 308 | { | |
| 309 | file->write(state->m_ram_base, 0x8000); | |
| 310 | file->write(state->m_ram->pointer(), state->m_ram->size()); | |
| 311 | } | |
| 312 | else | |
| 313 | { | |
| 314 | if (file) | |
| 315 | { | |
| 316 | file->read(state->m_ram_base, 0x8000); | |
| 317 | file->read(state->m_ram->pointer(), state->m_ram->size()); | |
| 318 | state->m_status_flag = 0x01; | |
| 319 | } | |
| 320 | else | |
| 321 | { | |
| 322 | state->m_status_flag = 0x00; | |
| 323 | } | |
| 324 | } | |
| 303 | void micronic_state::nvram_init(nvram_device &nvram, void *data, size_t size) | |
| 304 | { | |
| 305 | m_status_flag = 0; | |
| 325 | 306 | } |
| 326 | 307 | |
| 308 | ||
| 327 | 309 | PALETTE_INIT_MEMBER(micronic_state, micronic) |
| 328 | 310 | { |
| 329 | 311 | palette.set_pen_color(0, rgb_t(138, 146, 148)); |
| r29305 | r29306 | |
| 336 | 318 | m_bank1->configure_entries(0x00, 0x02, memregion(Z80_TAG)->base(), 0x10000); |
| 337 | 319 | |
| 338 | 320 | /* RAM banks */ |
| 339 | m_banks_num = (m_ram->size()>>15) + 1; | |
| 321 | m_banks_num = (m_ram->size() >> 15) + 1; | |
| 340 | 322 | m_bank1->configure_entries(0x02, m_banks_num - 1, m_ram->pointer(), 0x8000); |
| 341 | 323 | |
| 324 | m_nvram1->set_base(m_ram_base, 0x8000); | |
| 325 | m_nvram2->set_base(m_ram->pointer(), m_ram->size()); | |
| 326 | ||
| 342 | 327 | /* register for state saving */ |
| 343 | // save_item(NAME(state->)); | |
| 328 | save_item(NAME(m_banks_num)); | |
| 329 | save_item(NAME(m_kp_matrix)); | |
| 330 | save_item(NAME(m_lcd_contrast)); | |
| 331 | save_item(NAME(m_lcd_backlight)); | |
| 332 | save_item(NAME(m_status_flag)); | |
| 333 | // TODO: restore RAM bank at state load... | |
| 344 | 334 | } |
| 345 | 335 | |
| 346 | 336 | void micronic_state::machine_reset() |
| r29305 | r29306 | |
| 386 | 376 | MCFG_RAM_ADD(RAM_TAG) |
| 387 | 377 | MCFG_RAM_DEFAULT_SIZE("224K") |
| 388 | 378 | |
| 389 | MCFG_NVRAM_HANDLER(micronic) | |
| 379 | MCFG_NVRAM_ADD_CUSTOM_DRIVER("nvram1", micronic_state, nvram_init) // base ram | |
| 380 | MCFG_NVRAM_ADD_CUSTOM_DRIVER("nvram2", micronic_state, nvram_init) // additional ram banks | |
| 390 | 381 | |
| 391 | 382 | MCFG_MC146818_ADD( MC146818_TAG, XTAL_32_768kHz ) |
| 392 | 383 | MCFG_MC146818_IRQ_HANDLER(WRITELINE(micronic_state, mc146818_irq)) |
| r29305 | r29306 | |
|---|---|---|
| 18 | 18 | #include "machine/mos6551.h" |
| 19 | 19 | #include "machine/msm58321.h" |
| 20 | 20 | #include "machine/ram.h" |
| 21 | #include "machine/nvram.h" | |
| 21 | 22 | #include "sound/speaker.h" |
| 22 | 23 | #include "rendlay.h" |
| 23 | #include "mcfglgcy.h" | |
| 24 | 24 | |
| 25 | 25 | class clcd_state : public driver_device |
| 26 | 26 | { |
| r29305 | r29306 | |
| 33 | 33 | m_rtc(*this, "rtc"), |
| 34 | 34 | m_centronics(*this, "centronics"), |
| 35 | 35 | m_ram(*this,"ram"), |
| 36 | m_nvram(*this, "nvram"), | |
| 36 | 37 | m_bank1(*this, "bank1"), |
| 37 | 38 | m_bank2(*this, "bank2"), |
| 38 | 39 | m_bank3(*this, "bank3"), |
| r29305 | r29306 | |
| 89 | 90 | |
| 90 | 91 | m_rtc->cs1_w(1); |
| 91 | 92 | m_acia->write_cts(0); |
| 93 | m_nvram->set_base(ram()->pointer(), ram()->size()); | |
| 92 | 94 | } |
| 93 | 95 | |
| 94 | 96 | DECLARE_PALETTE_INIT(clcd) |
| r29305 | r29306 | |
| 521 | 523 | m_key_force_format = 10; |
| 522 | 524 | } |
| 523 | 525 | |
| 526 | void nvram_init(nvram_device &nvram, void *data, size_t size); | |
| 527 | ||
| 524 | 528 | private: |
| 525 | 529 | required_device<cpu_device> m_maincpu; |
| 526 | 530 | required_device<mos6551_device> m_acia; |
| r29305 | r29306 | |
| 528 | 532 | required_device<msm58321_device> m_rtc; |
| 529 | 533 | required_device<centronics_device> m_centronics; |
| 530 | 534 | required_device<ram_device> m_ram; |
| 535 | required_device<nvram_device> m_nvram; | |
| 531 | 536 | required_device<address_map_bank_device> m_bank1; |
| 532 | 537 | required_device<address_map_bank_device> m_bank2; |
| 533 | 538 | required_device<address_map_bank_device> m_bank3; |
| r29305 | r29306 | |
| 560 | 565 | required_ioport m_special; |
| 561 | 566 | }; |
| 562 | 567 | |
| 563 | stat | |
| 568 | void clcd_state::nvram_init(nvram_device &nvram, void *data, size_t size) | |
| 564 | 569 | { |
| 565 | clcd_state *state = machine.driver_data<clcd_state>(); | |
| 566 | ||
| 567 | if (read_or_write) | |
| 568 | { | |
| 569 | file->write(state->ram()->pointer(), state->ram()->size()); | |
| 570 | } | |
| 571 | else if (file) | |
| 572 | { | |
| 573 | file->read(state->ram()->pointer(), state->ram()->size()); | |
| 574 | } | |
| 575 | else | |
| 576 | { | |
| 577 | state->force_format(); | |
| 578 | } | |
| 570 | memset(data, 0x00, size); | |
| 571 | force_format(); | |
| 579 | 572 | } |
| 580 | 573 | |
| 574 | ||
| 581 | 575 | static ADDRESS_MAP_START( clcd_banked_mem, AS_PROGRAM, 8, clcd_state ) |
| 582 | 576 | /* KERN/APPL/RAM */ |
| 583 | 577 | AM_RANGE(0x00000, 0x1ffff) AM_MIRROR(0x40000) AM_READWRITE(ram_r, ram_w) |
| r29305 | r29306 | |
| 799 | 793 | MCFG_RAM_DEFAULT_VALUE(0) |
| 800 | 794 | MCFG_RAM_EXTRA_OPTIONS("32k,64k") |
| 801 | 795 | MCFG_RAM_DEFAULT_SIZE("128k") |
| 802 | MCFG_NVRAM_HANDLER(clcd) | |
| 796 | ||
| 797 | MCFG_NVRAM_ADD_CUSTOM_DRIVER("nvram", clcd_state, nvram_init) | |
| 803 | 798 | MACHINE_CONFIG_END |
| 804 | 799 | |
| 805 | 800 |
| r29305 | r29306 | |
|---|---|---|
| 23 | 23 | |
| 24 | 24 | #include "emu.h" |
| 25 | 25 | #include "cpu/z80/z80.h" |
| 26 | #include "machine/z80ctc.h" | |
| 27 | #include "machine/z80sio.h" | |
| 28 | #include "pve500.lh" | |
| 26 | 29 | |
| 30 | #define IO_EXPANDER_PORTA 0 | |
| 31 | #define IO_EXPANDER_PORTB 1 | |
| 32 | #define IO_EXPANDER_PORTC 2 | |
| 33 | #define IO_EXPANDER_PORTD 3 | |
| 34 | #define IO_EXPANDER_PORTE 4 | |
| 35 | ||
| 27 | 36 | class pve500_state : public driver_device |
| 28 | 37 | { |
| 29 | 38 | public: |
| r29305 | r29306 | |
| 33 | 42 | , m_subcpu(*this, "subcpu") |
| 34 | 43 | { } |
| 35 | 44 | |
| 45 | DECLARE_WRITE8_MEMBER(dualport_ram_left_w); | |
| 46 | DECLARE_WRITE8_MEMBER(dualport_ram_right_w); | |
| 47 | DECLARE_READ8_MEMBER(dualport_ram_left_r); | |
| 48 | DECLARE_READ8_MEMBER(dualport_ram_right_r); | |
| 49 | ||
| 36 | 50 | DECLARE_WRITE8_MEMBER(io_expander_w); |
| 37 | 51 | DECLARE_READ8_MEMBER(io_expander_r); |
| 38 | 52 | DECLARE_DRIVER_INIT(pve500); |
| 39 | 53 | private: |
| 54 | UINT8 dualport_7FE_data; | |
| 55 | UINT8 dualport_7FF_data; | |
| 56 | ||
| 40 | 57 | virtual void machine_start(); |
| 41 | 58 | virtual void machine_reset(); |
| 42 | required_device<cpu_device> m_maincpu; | |
| 43 | required_device<cpu_device> m_subcpu; | |
| 59 | required_device<tlcs_z80_device> m_maincpu; | |
| 60 | required_device<tlcs_z80_device> m_subcpu; | |
| 61 | UINT8 io_SEL, io_LD, io_LE, io_SC, io_KY; | |
| 44 | 62 | }; |
| 45 | 63 | |
| 64 | ||
| 65 | static Z80CTC_INTERFACE( external_ctc_intf ) | |
| 66 | { | |
| 67 | DEVCB_NULL, /* interrupt handler */ | |
| 68 | DEVCB_NULL, /* ZC/TO0 callback */ | |
| 69 | DEVCB_NULL, /* ZC/TO1 callback */ | |
| 70 | DEVCB_NULL /* ZC/TO2 callback */ | |
| 71 | }; | |
| 72 | ||
| 73 | static const z80sio_interface external_sio_intf = | |
| 74 | { | |
| 75 | DEVCB_NULL, /* interrupt handler */ | |
| 76 | DEVCB_NULL, /* DTR changed handler */ | |
| 77 | DEVCB_NULL, /* RTS changed handler */ | |
| 78 | DEVCB_NULL, /* BREAK changed handler */ | |
| 79 | DEVCB_NULL, /* transmit handler */ | |
| 80 | DEVCB_NULL /* receive handler */ | |
| 81 | }; | |
| 82 | ||
| 83 | static ADDRESS_MAP_START(maincpu_io, AS_IO, 8, pve500_state) | |
| 84 | AM_RANGE(0x00, 0x03) AM_DEVREADWRITE("external_sio", z80sio_device, read, write) | |
| 85 | AM_RANGE(0x08, 0x0B) AM_DEVREADWRITE("external_ctc", z80ctc_device, read, write) | |
| 86 | ADDRESS_MAP_END | |
| 87 | ||
| 46 | 88 | static ADDRESS_MAP_START(maincpu_prg, AS_PROGRAM, 8, pve500_state) |
| 47 | 89 | AM_RANGE (0x0000, 0xBFFF) AM_ROM // ICB7: 48kbytes EEPROM |
| 48 | 90 | AM_RANGE (0xC000, 0xDFFF) AM_RAM // ICD6: 8kbytes of RAM |
| 91 | AM_RANGE (0xE7FE, 0xE7FE) AM_MIRROR(0x1800) AM_READ(dualport_ram_left_r) | |
| 92 | AM_RANGE (0xE7FF, 0xE7FF) AM_MIRROR(0x1800) AM_WRITE(dualport_ram_left_w) | |
| 49 | 93 | AM_RANGE (0xE000, 0xE7FF) AM_MIRROR(0x1800) AM_RAM AM_SHARE("sharedram") // ICF5: 2kbytes of RAM shared between the two CPUs |
| 50 | 94 | ADDRESS_MAP_END |
| 51 | 95 | |
| 52 | 96 | static ADDRESS_MAP_START(subcpu_prg, AS_PROGRAM, 8, pve500_state) |
| 53 | 97 | AM_RANGE (0x0000, 0x7FFF) AM_ROM // ICG5: 32kbytes EEPROM |
| 54 | AM_RANGE (0x8000, 0xBFFF) AM_READWRITE(io_expander_r, io_expander_w) // ICG3: I/O Expander | |
| 98 | AM_RANGE (0x8000, 0xBFFF) AM_MIRROR(0x3FF8) AM_READWRITE(io_expander_r, io_expander_w) // ICG3: I/O Expander | |
| 99 | AM_RANGE (0xC7FE, 0xC7FE) AM_MIRROR(0x1800) AM_WRITE(dualport_ram_right_w) | |
| 100 | AM_RANGE (0xC7FF, 0xC7FF) AM_MIRROR(0x1800) AM_READ(dualport_ram_right_r) | |
| 55 | 101 | AM_RANGE (0xC000, 0xC7FF) AM_MIRROR(0x3800) AM_RAM AM_SHARE("sharedram") // ICF5: 2kbytes of RAM shared between the two CPUs |
| 56 | 102 | ADDRESS_MAP_END |
| 57 | 103 | |
| r29305 | r29306 | |
| 66 | 112 | |
| 67 | 113 | void pve500_state::machine_start() |
| 68 | 114 | { |
| 115 | io_LD = 0; | |
| 116 | io_SC = 0; | |
| 117 | io_LE = 0; | |
| 118 | io_SEL = 0; | |
| 119 | io_KY = 0; | |
| 120 | ||
| 121 | for (int i=0; i<27; i++) | |
| 122 | output_set_digit_value(i, 0xff); | |
| 69 | 123 | } |
| 70 | 124 | |
| 71 | 125 | void pve500_state::machine_reset() |
| 72 | 126 | { |
| 73 | 127 | } |
| 74 | 128 | |
| 129 | READ8_MEMBER(pve500_state::dualport_ram_left_r) | |
| 130 | { | |
| 131 | //printf("dualport_ram: Left READ\n"); | |
| 132 | m_subcpu->ctc_trg1(1); //(INT_Right) | |
| 133 | return dualport_7FE_data; | |
| 134 | } | |
| 135 | ||
| 136 | WRITE8_MEMBER(pve500_state::dualport_ram_left_w) | |
| 137 | { | |
| 138 | //printf("dualport_ram: Left WRITE\n"); | |
| 139 | dualport_7FF_data = data; | |
| 140 | m_subcpu->ctc_trg1(0); //(INT_Right) | |
| 141 | } | |
| 142 | ||
| 143 | READ8_MEMBER(pve500_state::dualport_ram_right_r) | |
| 144 | { | |
| 145 | //printf("dualport_ram: Right READ\n"); | |
| 146 | m_maincpu->ctc_trg1(1); //(INT_Left) | |
| 147 | return dualport_7FF_data; | |
| 148 | } | |
| 149 | ||
| 150 | WRITE8_MEMBER(pve500_state::dualport_ram_right_w) | |
| 151 | { | |
| 152 | //printf("dualport_ram: Right WRITE\n"); | |
| 153 | dualport_7FE_data = data; | |
| 154 | m_maincpu->ctc_trg1(0); //(INT_Left) | |
| 155 | } | |
| 156 | ||
| 75 | 157 | READ8_MEMBER(pve500_state::io_expander_r) |
| 76 | 158 | { |
| 77 | /* Implement-me ! */ | |
| 78 | return 0; | |
| 159 | switch (offset){ | |
| 160 | case IO_EXPANDER_PORTA: | |
| 161 | return io_SC; | |
| 162 | case IO_EXPANDER_PORTB: | |
| 163 | return io_LE; | |
| 164 | case IO_EXPANDER_PORTC: | |
| 165 | return io_KY; | |
| 166 | case IO_EXPANDER_PORTD: | |
| 167 | return io_LD; | |
| 168 | case IO_EXPANDER_PORTE: | |
| 169 | return io_SEL & 0x0F; //This is a 4bit port. | |
| 170 | default: | |
| 171 | return 0; | |
| 172 | } | |
| 79 | 173 | } |
| 80 | 174 | |
| 81 | 175 | WRITE8_MEMBER(pve500_state::io_expander_w) |
| 82 | 176 | { |
| 83 | /* Implement-me !*/ | |
| 177 | //printf("io_expander_w: offset=%d data=%02X\n", offset, data); | |
| 178 | switch (offset){ | |
| 179 | case IO_EXPANDER_PORTA: | |
| 180 | io_SC = data; | |
| 181 | break; | |
| 182 | case IO_EXPANDER_PORTB: | |
| 183 | io_LE = data; | |
| 184 | break; | |
| 185 | case IO_EXPANDER_PORTC: | |
| 186 | io_KY = data; | |
| 187 | break; | |
| 188 | case IO_EXPANDER_PORTD: | |
| 189 | io_LD = data; | |
| 190 | break; | |
| 191 | case IO_EXPANDER_PORTE: | |
| 192 | io_SEL = data; | |
| 193 | for (int i=0; i<4; i++){ | |
| 194 | if (io_SEL & (1 << i)){ | |
| 195 | switch (io_SC){ | |
| 196 | case 1: output_set_digit_value(8*i + 0, io_LD & 0x7F); break; | |
| 197 | case 2: output_set_digit_value(8*i + 1, io_LD & 0x7F); break; | |
| 198 | case 4: output_set_digit_value(8*i + 2, io_LD & 0x7F); break; | |
| 199 | case 8: output_set_digit_value(8*i + 3, io_LD & 0x7F); break; | |
| 200 | case 16: output_set_digit_value(8*i + 4, io_LD & 0x7F); break; | |
| 201 | case 32: output_set_digit_value(8*i + 5, io_LD & 0x7F); break; | |
| 202 | case 64: output_set_digit_value(8*i + 6, io_LD & 0x7F); break; | |
| 203 | case 128: output_set_digit_value(8*i + 7, io_LD & 0x7F); break; | |
| 204 | default: | |
| 205 | /*software should not do it. | |
| 206 | any idea how to emulate that in case it does? */ break; | |
| 207 | } | |
| 208 | } | |
| 209 | } | |
| 210 | break; | |
| 211 | default: | |
| 212 | break; | |
| 213 | } | |
| 84 | 214 | } |
| 85 | 215 | |
| 86 | 216 | static MACHINE_CONFIG_START( pve500, pve500_state ) |
| 87 | /* | |
| 88 | I think we should emulate the TOSHIBA TLCS-Z80 and instantiate it here. | |
| 89 | TLCS-Z80 = Z80 CPU + internal CTC + internal SIO + some other things | |
| 90 | ||
| 91 | The PVE-500 board uses both the internal and additional external CTCs and SIOs | |
| 92 | */ | |
| 93 | MCFG_CPU_ADD("maincpu", Z80, XTAL_12MHz / 2) /* Actual chip is TMPZ84C015BF-6 (TOSHIBA TLCS-Z80) */ | |
| 217 | MCFG_CPU_ADD("maincpu", TLCS_Z80, XTAL_12MHz / 2) /* TMPZ84C015BF-6 (TOSHIBA TLCS-Z80) */ | |
| 94 | 218 | MCFG_CPU_PROGRAM_MAP(maincpu_prg) |
| 95 | // MCFG_Z80CTC_ADD("ctc", XTAL_?MHz, maincpu_ctc_intf) | |
| 96 | // MCFG_Z80SIO_ADD("sio", XTAL_12MHz / 2, maincpu_sio_intf) | |
| 219 | MCFG_CPU_IO_MAP(maincpu_io) | |
| 220 | MCFG_Z80CTC_ADD("external_ctc", XTAL_12MHz / 2, external_ctc_intf) | |
| 221 | MCFG_Z80SIO_ADD("external_sio", XTAL_12MHz / 2, external_sio_intf) | |
| 97 | 222 | |
| 98 | MCFG_CPU_ADD("subcpu", Z80, XTAL_12MHz / 2) /* | |
| 223 | MCFG_CPU_ADD("subcpu", TLCS_Z80, XTAL_12MHz / 2) /* TMPZ84C015BF-6 (TOSHIBA TLCS-Z80) */ | |
| 99 | 224 | MCFG_CPU_PROGRAM_MAP(subcpu_prg) |
| 100 | // MCFG_Z80CTC_ADD("ctc", XTAL_?MHz, subcpu_ctc_intf) | |
| 101 | // MCFG_Z80SIO_ADD("sio", XTAL_12MHz / 2, subcpu_sio_intf) | |
| 102 | 225 | |
| 103 | 226 | /* TODO: |
| 104 | 227 | -> There are a few LEDs and a sequence of 7-seg displays with atotal of 27 digits |
| 105 | 228 | -> Sound hardware consists of a buzzer connected to a signal of the maincpu SIO and a logic-gate that attaches/detaches it from the |
| 106 | 229 | system clock Which apparently means you can only beep the buzzer to a certain predefined tone or keep it mute. |
| 107 | 230 | */ |
| 231 | ||
| 232 | /* video hardware */ | |
| 233 | MCFG_DEFAULT_LAYOUT(layout_pve500) | |
| 234 | ||
| 108 | 235 | MACHINE_CONFIG_END |
| 109 | 236 | |
| 110 | 237 | ROM_START( pve500 ) |
| r29305 | r29306 | |
|---|---|---|
| 300 | 300 | MCFG_SCREEN_UPDATE_DRIVER(gmaster_state, screen_update_gmaster) |
| 301 | 301 | MCFG_SCREEN_PALETTE("palette") |
| 302 | 302 | |
| 303 | MCFG_PALETTE_ADD("palette", | |
| 303 | MCFG_PALETTE_ADD("palette", ARRAY_LENGTH(gmaster_palette)) | |
| 304 | 304 | MCFG_PALETTE_INIT_OWNER(gmaster_state, gmaster) |
| 305 | 305 | MCFG_DEFAULT_LAYOUT(layout_lcd) |
| 306 | 306 |
| r29305 | r29306 | |
|---|---|---|
| 119 | 119 | UINT8 data = m_p_prom[offset]; |
| 120 | 120 | |
| 121 | 121 | // if IPL and /A12, point at rom |
| 122 | if (!state & m_ipl & !BIT(offset, 0)) | |
| 122 | if (!state && m_ipl && !BIT(offset, 0)) | |
| 123 | 123 | data = 0x31; |
| 124 | 124 | else |
| 125 | 125 | // if WPRT point at nothing |
| 126 | if (state & BIT(data, 7)) | |
| 126 | if (state && BIT(data, 7)) | |
| 127 | 127 | data = 0x30; |
| 128 | 128 | |
| 129 | 129 | // mask off wprt (no longer needed) |
| r29305 | r29306 | |
|---|---|---|
| 131 | 131 | m_speaker->level_w(!BIT(data, 7)); |
| 132 | 132 | } |
| 133 | 133 | |
| 134 | static I8355_INTERFACE( i8355_intf ) | |
| 135 | { | |
| 136 | DEVCB_DRIVER_MEMBER(exp85_state, i8355_a_r), | |
| 137 | DEVCB_DRIVER_MEMBER(exp85_state, i8355_a_w), | |
| 138 | DEVCB_NULL, | |
| 139 | DEVCB_NULL | |
| 140 | }; | |
| 141 | ||
| 142 | 134 | /* I8085A Interface */ |
| 143 | 135 | |
| 144 | 136 | READ_LINE_MEMBER( exp85_state::sid_r ) |
| r29305 | r29306 | |
| 220 | 212 | |
| 221 | 213 | /* devices */ |
| 222 | 214 | MCFG_I8155_ADD(I8155_TAG, XTAL_6_144MHz/2, i8155_intf) |
| 223 | MCFG_I8355_ADD(I8355_TAG, XTAL_6_144MHz/2, i8355_intf) | |
| 215 | MCFG_DEVICE_ADD(I8355_TAG, I8355, XTAL_6_144MHz/2) | |
| 216 | MCFG_I8355_IN_PA_CB(READ8(exp85_state, i8355_a_r)) | |
| 217 | MCFG_I8355_OUT_PA_CB(WRITE8(exp85_state, i8355_a_w)) | |
| 224 | 218 | MCFG_CASSETTE_ADD("cassette", exp85_cassette_interface) |
| 225 | 219 | |
| 226 | 220 | MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, "serial_terminal") |
| r29305 | r29306 | |
|---|---|---|
| 9 | 9 | *********************************************************************/ |
| 10 | 10 | |
| 11 | 11 | #include "emu.h" |
| 12 | #include "cpu/m68000/m68000.h" | |
| 13 | 12 | #include "cpu/m6502/m6504.h" |
| 14 | 13 | #include "cpu/cop400/cop400.h" |
| 15 | 14 | #include "includes/lisa.h" |
| 16 | #include "machine/sonydriv.h" | |
| 17 | #include "machine/applefdc.h" | |
| 18 | 15 | #include "formats/ap_dsk35.h" |
| 19 | #include "machine/6522via.h" | |
| 20 | #include "sound/speaker.h" | |
| 21 | #include "mcfglgcy.h" | |
| 22 | 16 | |
| 23 | 17 | |
| 24 | 18 | /*************************************************************************** |
| r29305 | r29306 | |
| 162 | 156 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) |
| 163 | 157 | |
| 164 | 158 | /* nvram */ |
| 165 | MCFG_NVRAM_ | |
| 159 | MCFG_NVRAM_ADD_CUSTOM_DRIVER("nvram", lisa_state, nvram_init) | |
| 166 | 160 | |
| 167 | 161 | /* devices */ |
| 168 | 162 | MCFG_IWM_ADD("fdc", lisa2_fdc_interface) |
| r29305 | r29306 | |
|---|---|---|
| 149 | 149 | // read cassette |
| 150 | 150 | READ8_MEMBER( mkit09_state::pb_r ) |
| 151 | 151 | { |
| 152 | return m_keydata | (m_cass->input() > +0.03) ? 0x80 : 0; | |
| 152 | return m_keydata | ((m_cass->input() > +0.03) ? 0x80 : 0); | |
| 153 | 153 | } |
| 154 | 154 | |
| 155 | 155 | // write display segments |
| r29305 | r29306 | |
|---|---|---|
| 201 | 201 | MACHINE_CONFIG_END |
| 202 | 202 | |
| 203 | 203 | /* ROM definition */ |
| 204 | ROM_START( pecom32 ) | |
| 205 | ROM_REGION( 0x10000, CDP1802_TAG, ROMREGION_ERASEFF ) | |
| 206 | ROM_LOAD( "090786.bin", 0x8000, 0x4000, CRC(b3b1ea23) SHA1(de69f22568161ced801973345fa39d6d207b9e8c) ) | |
| 207 | ROM_END | |
| 208 | ||
| 209 | ||
| 204 | 210 | ROM_START( pecom64 ) |
| 205 | 211 | ROM_REGION( 0x10000, CDP1802_TAG, ROMREGION_ERASEFF ) |
| 206 | 212 | ROM_SYSTEM_BIOS(0, "ver4", "version 4") |
| r29305 | r29306 | |
| 214 | 220 | /* Driver */ |
| 215 | 221 | |
| 216 | 222 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ |
| 217 | COMP( 1987, pecom64, 0, 0, pecom64, pecom, driver_device, 0, "Ei Nis", "Pecom 64", 0) | |
| 223 | COMP( 1987, pecom32, 0, 0, pecom64, pecom, driver_device, 0, "Ei Nis", "Pecom 32", 0) | |
| 224 | COMP( 1987, pecom64, pecom32, 0, pecom64, pecom, driver_device, 0, "Ei Nis", "Pecom 64", 0) |
| r29305 | r29306 | |
|---|---|---|
| 23 | 23 | #include "emu.h" |
| 24 | 24 | #include "includes/psion.h" |
| 25 | 25 | #include "rendlay.h" |
| 26 | #include "mcfglgcy.h" | |
| 27 | 26 | |
| 28 | 27 | TIMER_DEVICE_CALLBACK_MEMBER(psion_state::nmi_timer) |
| 29 | 28 | { |
| r29305 | r29306 | |
| 332 | 331 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D [)]") PORT_CODE(KEYCODE_D) |
| 333 | 332 | INPUT_PORTS_END |
| 334 | 333 | |
| 335 | static NVRAM_HANDLER( psion ) | |
| 336 | { | |
| 337 | psion_state *state = machine.driver_data<psion_state>(); | |
| 338 | 334 | |
| 339 | if (read_or_write) | |
| 340 | { | |
| 341 | file->write(state->m_sys_register, 0xc0); | |
| 342 | file->write(state->m_ram, state->m_ram.bytes()); | |
| 343 | if (state->m_ram_bank_count) | |
| 344 | file->write(state->m_paged_ram, state->m_ram_bank_count * 0x4000); | |
| 345 | } | |
| 346 | else | |
| 347 | { | |
| 348 | if (file) | |
| 349 | { | |
| 350 | file->read(state->m_sys_register, 0xc0); | |
| 351 | file->read(state->m_ram, state->m_ram.bytes()); | |
| 352 | if (state->m_ram_bank_count) | |
| 353 | file->read(state->m_paged_ram, state->m_ram_bank_count * 0x4000); | |
| 354 | ||
| 355 | //warm start | |
| 356 | state->m_stby_pwr = 1; | |
| 357 | } | |
| 358 | else | |
| 359 | //cold start | |
| 360 | state->m_stby_pwr = 0; | |
| 361 | } | |
| 335 | void psion_state::nvram_init(nvram_device &nvram, void *data, size_t size) | |
| 336 | { | |
| 337 | //cold start (by default is 1=warm start) | |
| 338 | m_stby_pwr = 0; | |
| 362 | 339 | } |
| 363 | 340 | |
| 341 | ||
| 364 | 342 | void psion_state::machine_start() |
| 365 | 343 | { |
| 366 | 344 | if (!strcmp(machine().system().name, "psionlam")) |
| r29305 | r29306 | |
| 406 | 384 | membank("rambank")->set_entry(0); |
| 407 | 385 | } |
| 408 | 386 | |
| 387 | m_nvram1->set_base(m_sys_register, 0xc0); | |
| 388 | m_nvram2->set_base(m_ram, m_ram.bytes()); | |
| 389 | if (m_nvram3) | |
| 390 | m_nvram3->set_base(m_paged_ram, m_ram_bank_count * 0x4000); | |
| 391 | ||
| 409 | 392 | save_item(NAME(m_kb_counter)); |
| 410 | 393 | save_item(NAME(m_enable_nmi)); |
| 411 | 394 | save_item(NAME(m_tcsr_value)); |
| r29305 | r29306 | |
| 498 | 481 | MCFG_SOUND_ADD( "beeper", BEEP, 0 ) |
| 499 | 482 | MCFG_SOUND_ROUTE( ALL_OUTPUTS, "mono", 1.00 ) |
| 500 | 483 | |
| 501 | MCFG_NVRAM_HANDLER(psion) | |
| 484 | MCFG_NVRAM_ADD_CUSTOM_DRIVER("nvram1", psion_state, nvram_init) // sys_regs | |
| 485 | MCFG_NVRAM_ADD_CUSTOM_DRIVER("nvram2", psion_state, nvram_init) // RAM | |
| 502 | 486 | |
| 503 | 487 | MCFG_TIMER_DRIVER_ADD_PERIODIC("nmi_timer", psion_state, nmi_timer, attotime::from_seconds(1)) |
| 504 | 488 | |
| r29305 | r29306 | |
| 544 | 528 | |
| 545 | 529 | MCFG_CPU_MODIFY("maincpu") |
| 546 | 530 | MCFG_CPU_PROGRAM_MAP(psionp350_mem) |
| 531 | ||
| 532 | MCFG_NVRAM_ADD_CUSTOM_DRIVER("nvram3", psion_state, nvram_init) // paged RAM | |
| 547 | 533 | MACHINE_CONFIG_END |
| 548 | 534 | |
| 549 | 535 | static MACHINE_CONFIG_DERIVED( psionlz, psion_4lines ) |
| 550 | 536 | |
| 551 | 537 | MCFG_CPU_MODIFY("maincpu") |
| 552 | 538 | MCFG_CPU_PROGRAM_MAP(psionlz_mem) |
| 539 | ||
| 540 | MCFG_NVRAM_ADD_CUSTOM_DRIVER("nvram3", psion_state, nvram_init) // paged RAM | |
| 553 | 541 | MACHINE_CONFIG_END |
| 554 | 542 | |
| 555 | 543 | /* ROM definition */ |
| r29305 | r29306 | |
|---|---|---|
| 87 | 87 | DECLARE_READ16_MEMBER(via_r); |
| 88 | 88 | DECLARE_WRITE16_MEMBER(via_w); |
| 89 | 89 | DECLARE_WRITE_LINE_MEMBER(kb_data_ready); |
| 90 | I8275_DRAW_CHARACTER_MEMBER(wicat_display_pixels); | |
| 90 | 91 | |
| 91 | 92 | required_shared_ptr<UINT8> m_vram; |
| 92 | 93 | required_device<m68000_device> m_maincpu; |
| r29305 | r29306 | |
| 730 | 731 | m_videocpu->set_input_line(INPUT_LINE_IRQ0,m_crtc_irq); |
| 731 | 732 | } |
| 732 | 733 | |
| 733 | I8275_D | |
| 734 | I8275_DRAW_CHARACTER_MEMBER(wicat_state::wicat_display_pixels) | |
| 734 | 735 | { |
| 735 | wicat_state *state = device->machine().driver_data<wicat_state>(); | |
| 736 | UINT8 romdata = m_chargen->base()[((charcode << 4) | linecount) + 1]; | |
| 737 | const pen_t *pen = m_palette->pens(); | |
| 736 | 738 | |
| 737 | UINT8 romdata = state->m_chargen->base()[((charcode << 4) | linecount) + 1]; | |
| 738 | const pen_t *pen = state->m_palette->pens(); | |
| 739 | ||
| 740 | 739 | for (int i = 0; i < 8; i++) |
| 741 | 740 | { |
| 742 | 741 | int color = (romdata >> (7-i)) & 0x01; |
| r29305 | r29306 | |
| 889 | 888 | |
| 890 | 889 | MCFG_DEVICE_ADD("video", I8275x, XTAL_19_6608MHz/8) |
| 891 | 890 | MCFG_I8275_CHARACTER_WIDTH(9) |
| 892 | MCFG_I8275_D | |
| 891 | MCFG_I8275_DRAW_CHARACTER_CALLBACK_OWNER(wicat_state, wicat_display_pixels) | |
| 893 | 892 | MCFG_I8275_DRQ_CALLBACK(DEVWRITELINE("videodma",am9517a_device, dreq0_w)) |
| 894 | 893 | MCFG_I8275_IRQ_CALLBACK(WRITELINE(wicat_state,crtc_cb)) |
| 895 | 894 | MCFG_VIDEO_SET_SCREEN("screen") |
| r29305 | r29306 | |
|---|---|---|
| 2265 | 2265 | $(MESS_DRIVERS)/pmi80.o: $(MESS_LAYOUT)/pmi80.lh |
| 2266 | 2266 | $(MESS_DRIVERS)/poly880.o: $(MESS_LAYOUT)/poly880.lh |
| 2267 | 2267 | $(MESS_DRIVERS)/pro80.o: $(MESS_LAYOUT)/pro80.lh |
| 2268 | $(MESS_DRIVERS)/pve500.o: $(MESS_LAYOUT)/pve500.lh | |
| 2268 | 2269 | $(MESS_DRIVERS)/px4.o: $(MESS_LAYOUT)/px4.lh |
| 2269 | 2270 | $(MESS_DRIVERS)/px8.o: $(MESS_LAYOUT)/px8.lh |
| 2270 | 2271 | $(MESS_DRIVERS)/ravens.o: $(MESS_LAYOUT)/ravens.lh |
| r29305 | r29306 | |
|---|---|---|
| 49 | 49 | imgtool_library_add(lib, modules[i]); |
| 50 | 50 | |
| 51 | 51 | /* remove irrelevant modules */ |
| 52 | for (i = 0; i < sizeof(irrelevant_modules) | |
| 53 | / sizeof(irrelevant_modules[0]); i++) | |
| 52 | for (i = 0; i < ARRAY_LENGTH(irrelevant_modules); i++) | |
| 54 | 53 | { |
| 55 | 54 | imgtool_library_unlink(lib, irrelevant_modules[i]); |
| 56 | 55 | } |
| r29305 | r29306 | |
|---|---|---|
| 89 | 89 | { |
| 90 | 90 | va_list arg; |
| 91 | 91 | va_start(arg, format); |
| 92 | printf(format, arg); | |
| 92 | vprintf(format, arg); | |
| 93 | 93 | va_end(arg); |
| 94 | 94 | } |
| 95 | 95 |
| r29305 | r29306 | |
|---|---|---|
| 1830 | 1830 | || ((dest->files[i].fdr_ptr && dest->files[i+1].fdr_ptr) && (memcmp(dest->files[i].name, dest->files[i+1].name, 10) >= 0))) |
| 1831 | 1831 | { |
| 1832 | 1832 | /* if the catalog is not sorted, we repair it */ |
| 1833 | qsort(dest->files, | |
| 1833 | qsort(dest->files, ARRAY_LENGTH(dest->files), sizeof(dest->files[0]), | |
| 1834 | 1834 | cat_file_compare_qsort); |
| 1835 | 1835 | break; |
| 1836 | 1836 | } |
| r29305 | r29306 | |
|---|---|---|
| 66 | 66 | { |
| 67 | 67 | va_list arg; |
| 68 | 68 | va_start(arg, format); |
| 69 | printf(format, arg); | |
| 69 | vprintf(format, arg); | |
| 70 | 70 | va_end(arg); |
| 71 | 71 | } |
| 72 | 72 | |
| 73 | enum { FORMAT_COUNT = | |
| 73 | enum { FORMAT_COUNT = ARRAY_LENGTH(floppy_formats) }; | |
| 74 | 74 | |
| 75 | 75 | static floppy_image_format_t *formats[FORMAT_COUNT]; |
| 76 | 76 |
| r29305 | r29306 | |
|---|---|---|
| 7 | 7 | #ifndef _3DO_H_ |
| 8 | 8 | #define _3DO_H_ |
| 9 | 9 | |
| 10 | #include "machine/nvram.h" | |
| 11 | ||
| 12 | ||
| 10 | 13 | struct SLOW2 { |
| 11 | 14 | /* 03180000 - 0318003f - configuration group */ |
| 12 | 15 | /* 03180040 - 0318007f - diagnostic UART */ |
| r29305 | r29306 | |
| 139 | 142 | m_maincpu(*this, "maincpu"), |
| 140 | 143 | m_dram(*this, "dram"), |
| 141 | 144 | m_vram(*this, "vram"), |
| 145 | m_nvram(*this, "nvram"), | |
| 142 | 146 | m_bank1(*this, "bank1"), |
| 143 | 147 | m_bank2(*this, "bank2") { } |
| 144 | 148 | |
| 145 | 149 | required_device<cpu_device> m_maincpu; |
| 146 | 150 | required_shared_ptr<UINT32> m_dram; |
| 147 | 151 | required_shared_ptr<UINT32> m_vram; |
| 152 | required_device<nvram_device> m_nvram; | |
| 148 | 153 | SLOW2 m_slow2; |
| 149 | 154 | MADAM m_madam; |
| 150 | 155 | CLIO m_clio; |
| 151 | 156 | SVF m_svf; |
| 152 | 157 | DSPP m_dspp; |
| 153 | UINT8 m_nv | |
| 158 | UINT8 m_nvmem[0x8000]; | |
| 154 | 159 | |
| 155 | 160 | // UINT8 m_video_bits[512]; |
| 156 | 161 | DECLARE_READ8_MEMBER(_3do_nvarea_r); |
| r29305 | r29306 | |
|---|---|---|
| 31 | 31 | m_view2_0(*this, "view2_0"), |
| 32 | 32 | m_view2_1(*this, "view2_1"), |
| 33 | 33 | m_kaneko_spr(*this, "kan_spr"), |
| 34 | m_pandora(*this, "pandora") | |
| 34 | m_pandora(*this, "pandora"), | |
| 35 | m_palette(*this, "palette") | |
| 35 | 36 | { } |
| 36 | 37 | |
| 37 | 38 | required_device<cpu_device> m_maincpu; |
| r29305 | r29306 | |
| 45 | 46 | optional_device<kaneko_view2_tilemap_device> m_view2_1; |
| 46 | 47 | optional_device<kaneko16_sprite_device> m_kaneko_spr; |
| 47 | 48 | optional_device<kaneko_pandora_device> m_pandora; |
| 49 | required_device<palette_device> m_palette; | |
| 48 | 50 | |
| 49 | 51 | UINT16 m_disp_enable; |
| 50 | 52 | |
| r29305 | r29306 | |
| 72 | 74 | DECLARE_VIDEO_START(kaneko16); |
| 73 | 75 | DECLARE_MACHINE_RESET(mgcrystl); |
| 74 | 76 | UINT32 screen_update_kaneko16(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 75 | UINT32 screen_update_common(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); | |
| 77 | ||
| 78 | template<class _BitmapClass> | |
| 79 | UINT32 screen_update_common(screen_device &screen, _BitmapClass &bitmap, const rectangle &cliprect); | |
| 80 | ||
| 81 | ||
| 82 | ||
| 76 | 83 | TIMER_DEVICE_CALLBACK_MEMBER(kaneko16_interrupt); |
| 77 | 84 | TIMER_DEVICE_CALLBACK_MEMBER(shogwarr_interrupt); |
| 78 | void kaneko16_fill_bitmap(bitmap_ind16 &bitmap, const rectangle &cliprect); | |
| 85 | ||
| 86 | template<class _BitmapClass> | |
| 87 | void kaneko16_fill_bitmap(palette_device* palette, _BitmapClass &bitmap, const rectangle &cliprect); | |
| 88 | ||
| 89 | ||
| 79 | 90 | void kaneko16_common_oki_bank_w( const char *bankname, const char* tag, int bank, size_t fixedsize, size_t bankedsize ); |
| 80 | 91 | void kaneko16_unscramble_tiles(const char *region); |
| 81 | 92 | void kaneko16_expand_sample_banks(const char *region); |
| r29305 | r29306 | |
| 111 | 122 | kaneko16_berlwall_state(const machine_config &mconfig, device_type type, const char *tag) |
| 112 | 123 | : kaneko16_state(mconfig, type, tag), |
| 113 | 124 | m_bg15_reg(*this, "bg15_reg"), |
| 114 | m_bg15_select(*this, "bg15_select") | |
| 125 | m_bg15_select(*this, "bg15_select"), | |
| 126 | m_bgpalette(*this, "bgpalette") | |
| 127 | ||
| 115 | 128 | { |
| 116 | 129 | } |
| 117 | 130 | |
| 118 | 131 | optional_shared_ptr<UINT16> m_bg15_reg; |
| 119 | 132 | optional_shared_ptr<UINT16> m_bg15_select; |
| 133 | required_device<palette_device> m_bgpalette; | |
| 120 | 134 | |
| 121 | 135 | bitmap_ind16 m_bg15_bitmap; |
| 122 | 136 | |
| r29305 | r29306 | |
| 125 | 139 | DECLARE_READ16_MEMBER(kaneko16_bg15_reg_r); |
| 126 | 140 | DECLARE_WRITE16_MEMBER(kaneko16_bg15_reg_w); |
| 127 | 141 | |
| 142 | DECLARE_READ16_MEMBER(berlwall_oki_r); | |
| 143 | DECLARE_WRITE16_MEMBER(berlwall_oki_w); | |
| 144 | ||
| 128 | 145 | DECLARE_DRIVER_INIT(berlwall); |
| 129 | 146 | DECLARE_PALETTE_INIT(berlwall); |
| 130 | 147 | DECLARE_VIDEO_START(berlwall); |
| 131 | UINT32 screen_update_berlwall(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); | |
| 132 | void kaneko16_render_15bpp_bitmap(bitmap_ind16 &bitmap, const rectangle &cliprect); | |
| 148 | UINT32 screen_update_berlwall(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); | |
| 149 | void kaneko16_render_15bpp_bitmap(bitmap_rgb32 &bitmap, const rectangle &cliprect); | |
| 133 | 150 | }; |
| 134 | 151 | |
| 135 | 152 | class kaneko16_shogwarr_state : public kaneko16_state |
| r29305 | r29306 | |
|---|---|---|
| 1 | #include "machine/nvram.h" | |
| 2 | ||
| 1 | 3 | class seicross_state : public driver_device |
| 2 | 4 | { |
| 3 | 5 | public: |
| r29305 | r29306 | |
| 8 | 10 | m_row_scroll(*this, "row_scroll"), |
| 9 | 11 | m_spriteram2(*this, "spriteram2"), |
| 10 | 12 | m_colorram(*this, "colorram"), |
| 11 | m_nvram(*this, "nvram"), | |
| 12 | 13 | m_maincpu(*this, "maincpu"), |
| 13 | 14 | m_mcu(*this, "mcu"), |
| 15 | m_nvram(*this, "nvram"), | |
| 14 | 16 | m_gfxdecode(*this, "gfxdecode"), |
| 15 | 17 | m_palette(*this, "palette") { } |
| 16 | 18 | |
| r29305 | r29306 | |
| 19 | 21 | required_shared_ptr<UINT8> m_row_scroll; |
| 20 | 22 | required_shared_ptr<UINT8> m_spriteram2; |
| 21 | 23 | required_shared_ptr<UINT8> m_colorram; |
| 22 | optional_shared_ptr<UINT8> m_nvram; | |
| 23 | 24 | |
| 24 | 25 | UINT8 m_portb; |
| 25 | 26 | tilemap_t *m_bg_tilemap; |
| 27 | void nvram_init(nvram_device &nvram, void *data, size_t size); | |
| 26 | 28 | |
| 27 | 29 | UINT8 m_irq_mask; |
| 28 | 30 | DECLARE_WRITE8_MEMBER(seicross_videoram_w); |
| r29305 | r29306 | |
| 38 | 40 | void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect ); |
| 39 | 41 | required_device<cpu_device> m_maincpu; |
| 40 | 42 | required_device<cpu_device> m_mcu; |
| 43 | optional_device<nvram_device> m_nvram; | |
| 41 | 44 | required_device<gfxdecode_device> m_gfxdecode; |
| 42 | 45 | required_device<palette_device> m_palette; |
| 43 | 46 | }; |
| r29305 | r29306 | |
|---|---|---|
| 1 | #include "machine/nvram.h" | |
| 1 | 2 | #include "sound/okiadpcm.h" |
| 2 | 3 | |
| 3 | 4 | class mjkjidai_adpcm_device; |
| r29305 | r29306 | |
| 7 | 8 | public: |
| 8 | 9 | mjkjidai_state(const machine_config &mconfig, device_type type, const char *tag) |
| 9 | 10 | : driver_device(mconfig, type, tag), |
| 10 | m_nvram(*this, "nvram"), | |
| 11 | 11 | m_spriteram1(*this, "spriteram1"), |
| 12 | 12 | m_spriteram2(*this, "spriteram2"), |
| 13 | 13 | m_spriteram3(*this, "spriteram3"), |
| 14 | 14 | m_videoram(*this, "videoram"), |
| 15 | 15 | m_maincpu(*this, "maincpu"), |
| 16 | 16 | m_mjk_adpcm(*this, "adpcm"), |
| 17 | m_nvram(*this, "nvram"), | |
| 17 | 18 | m_gfxdecode(*this, "gfxdecode"), |
| 18 | 19 | m_palette(*this, "palette") { } |
| 19 | 20 | |
| 20 | required_shared_ptr<UINT8> m_nvram; | |
| 21 | 21 | required_shared_ptr<UINT8> m_spriteram1; |
| 22 | 22 | required_shared_ptr<UINT8> m_spriteram2; |
| 23 | 23 | required_shared_ptr<UINT8> m_spriteram3; |
| r29305 | r29306 | |
| 25 | 25 | |
| 26 | 26 | required_device<cpu_device> m_maincpu; |
| 27 | 27 | required_device<mjkjidai_adpcm_device> m_mjk_adpcm; |
| 28 | required_device<nvram_device> m_nvram; | |
| 28 | 29 | required_device<gfxdecode_device> m_gfxdecode; |
| 29 | 30 | required_device<palette_device> m_palette; |
| 30 | 31 |
| r29305 | r29306 | |
|---|---|---|
| 2415 | 2415 | |
| 2416 | 2416 | $(DRIVERS)/darius.o: $(LAYOUT)/darius.lh |
| 2417 | 2417 | |
| 2418 | $(DRIVERS)/dblcrown.o: $(LAYOUT)/dblcrown.lh | |
| 2419 | ||
| 2418 | 2420 | $(DRIVERS)/de_2.o: $(LAYOUT)/de2.lh \ |
| 2419 | 2421 | $(LAYOUT)/de2a3.lh |
| 2420 | 2422 |
| r29305 | r29306 | |
|---|---|---|
| 24 | 24 | |
| 25 | 25 | |
| 26 | 26 | |
| 27 | void kaneko16_state::kaneko16_fill_bitmap(bitmap_ind16 &bitmap, const rectangle &cliprect) | |
| 27 | /* Fill the bitmap with a single colour. This is wrong, but will work most of | |
| 28 | the times. To do it right, each pixel should be drawn with pen 0 | |
| 29 | of the bottomost tile that covers it (which is pretty tricky to do) */ | |
| 30 | template<class _BitmapClass> | |
| 31 | void kaneko16_state::kaneko16_fill_bitmap(palette_device* palette, _BitmapClass &bitmap, const rectangle &cliprect) | |
| 28 | 32 | { |
| 33 | int pen = 0; | |
| 34 | ||
| 29 | 35 | if (m_kaneko_spr) |
| 30 | if(m_kaneko_spr->get_sprite_type()== 1) | |
| 36 | { | |
| 37 | if (m_kaneko_spr->get_sprite_type() == 1) | |
| 31 | 38 | { |
| 32 | bitmap.fill(0x7f00, cliprect); | |
| 33 | return; | |
| 39 | pen = 0x7f00; | |
| 34 | 40 | } |
| 41 | } | |
| 35 | 42 | |
| 36 | 43 | |
| 44 | typename _BitmapClass::pixel_t *dest; | |
| 45 | (void)dest; // shut up Visual Studio | |
| 46 | if (sizeof(*dest) == 2) | |
| 47 | { | |
| 48 | bitmap.fill(pen, cliprect); | |
| 49 | } | |
| 50 | else | |
| 51 | { | |
| 52 | const pen_t *pal = palette->pens(); | |
| 53 | bitmap.fill(pal[pen], cliprect); | |
| 54 | } | |
| 55 | } | |
| 37 | 56 | |
| 38 | /* Fill the bitmap with pen 0. This is wrong, but will work most of | |
| 39 | the times. To do it right, each pixel should be drawn with pen 0 | |
| 40 | of the bottomost tile that covers it (which is pretty tricky to do) */ | |
| 41 | bitmap.fill(0, cliprect); | |
| 42 | 57 | |
| 43 | } | |
| 44 | 58 | |
| 45 | UINT32 kaneko16_state::screen_update_common(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) | |
| 59 | ||
| 60 | template<class _BitmapClass> | |
| 61 | UINT32 kaneko16_state::screen_update_common(screen_device &screen, _BitmapClass &bitmap, const rectangle &cliprect) | |
| 46 | 62 | { |
| 47 | 63 | int i; |
| 48 | 64 | |
| r29305 | r29306 | |
| 66 | 82 | |
| 67 | 83 | UINT32 kaneko16_state::screen_update_kaneko16(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
| 68 | 84 | { |
| 69 | kaneko16_fill_bitmap(bitmap,cliprect); | |
| 85 | kaneko16_fill_bitmap(m_palette, bitmap,cliprect); | |
| 70 | 86 | |
| 71 | 87 | // if the display is disabled, do nothing? |
| 72 | 88 | if (!m_disp_enable) return 0; |
| r29305 | r29306 | |
| 91 | 107 | |
| 92 | 108 | /* initialize 555 RGB lookup */ |
| 93 | 109 | for (i = 0; i < 32768; i++) |
| 94 | palette.set_pen_color( | |
| 110 | palette.set_pen_color(i,pal5bit(i >> 5),pal5bit(i >> 10),pal5bit(i >> 0)); | |
| 95 | 111 | } |
| 96 | 112 | |
| 97 | 113 | VIDEO_START_MEMBER(kaneko16_berlwall_state,berlwall) |
| r29305 | r29306 | |
| 134 | 150 | if ((r & 0x10) && (b & 0x10)) |
| 135 | 151 | g = (g - 1) & 0x1f; /* decrease with wraparound */ |
| 136 | 152 | |
| 137 | m_bg15_bitmap.pix16(y, sx * 256 + x) = | |
| 153 | m_bg15_bitmap.pix16(y, sx * 256 + x) = ((g << 10) | (r << 5) | b); | |
| 138 | 154 | } |
| 139 | 155 | |
| 140 | 156 | VIDEO_START_CALL_MEMBER(kaneko16); |
| r29305 | r29306 | |
| 164 | 180 | WRITE16_MEMBER(kaneko16_berlwall_state::kaneko16_bg15_reg_w) |
| 165 | 181 | { |
| 166 | 182 | COMBINE_DATA(&m_bg15_reg[0]); |
| 183 | // printf("kaneko16_bg15_reg_w %04x\n", m_bg15_reg[0]); | |
| 184 | double brt1 = data & 0xff; | |
| 185 | brt1 = brt1 / 255.0; | |
| 186 | ||
| 187 | for (int i = 0; i < 0x8000;i++) | |
| 188 | m_bgpalette->set_pen_contrast(i, brt1); | |
| 167 | 189 | } |
| 168 | 190 | |
| 169 | 191 | |
| 170 | void kaneko16_berlwall_state::kaneko16_render_15bpp_bitmap(bitmap_ | |
| 192 | void kaneko16_berlwall_state::kaneko16_render_15bpp_bitmap(bitmap_rgb32 &bitmap, const rectangle &cliprect) | |
| 171 | 193 | { |
| 172 | 194 | if (m_bg15_bitmap.valid()) |
| 173 | 195 | { |
| 174 | 196 | int select = m_bg15_select[ 0 ]; |
| 175 | 197 | // int reg = m_bg15_reg[ 0 ]; |
| 176 | 198 | int flip = select & 0x20; |
| 177 | int sx, sy; | |
| 199 | int sx;//, sy; | |
| 178 | 200 | |
| 179 | if (flip) select ^= 0x1f; | |
| 201 | // if (flip) select ^= 0x1f; | |
| 180 | 202 | |
| 181 | 203 | sx = (select & 0x1f) * 256; |
| 182 | sy = 0; | |
| 204 | // sy = 0; | |
| 183 | 205 | |
| 184 | copybitmap(bitmap, m_bg15_bitmap, flip, flip, -sx, -sy, cliprect); | |
| 206 | const pen_t *pal = m_bgpalette->pens(); | |
| 207 | UINT16* srcbitmap; | |
| 208 | UINT32* dstbitmap; | |
| 185 | 209 | |
| 210 | for (int y = cliprect.min_y; y <= cliprect.max_y; y++) | |
| 211 | { | |
| 212 | if (!flip) srcbitmap = &m_bg15_bitmap.pix16(y); | |
| 213 | else srcbitmap = &m_bg15_bitmap.pix16(255-y); | |
| 214 | dstbitmap = &bitmap.pix32(y); | |
| 215 | ||
| 216 | for (int x = cliprect.min_x; x <= cliprect.max_x; x++) | |
| 217 | { | |
| 218 | UINT16 pix = srcbitmap[x + sx]; | |
| 219 | dstbitmap[x] = pal[pix&0x7fff]; | |
| 220 | } | |
| 221 | } | |
| 222 | ||
| 186 | 223 | // flag = 0; |
| 187 | 224 | } |
| 188 | 225 | } |
| 189 | UINT32 kaneko16_berlwall_state::screen_update_berlwall(screen_device &screen, bitmap_ | |
| 226 | UINT32 kaneko16_berlwall_state::screen_update_berlwall(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) | |
| 190 | 227 | { |
| 191 | 228 | // berlwall uses a 15bpp bitmap as a bg, not a solid fill |
| 192 | 229 | kaneko16_render_15bpp_bitmap(bitmap,cliprect); |
| r29305 | r29306 | |
|---|---|---|
| 195 | 195 | m_tmap[_N_]->mark_tile_dirty(offset/2); |
| 196 | 196 | } |
| 197 | 197 | |
| 198 | void kaneko_view2_tilemap_device::kaneko16_prepare(bitmap_ind16 &bitmap, const rectangle &cliprect) { kaneko16_prepare_common(bitmap, cliprect); }; | |
| 199 | void kaneko_view2_tilemap_device::kaneko16_prepare(bitmap_rgb32 &bitmap, const rectangle &cliprect) { kaneko16_prepare_common(bitmap, cliprect); }; | |
| 198 | 200 | |
| 199 | void kaneko_view2_tilemap_device::kaneko16_prepare(bitmap_ind16 &bitmap, const rectangle &cliprect) | |
| 201 | template<class _BitmapClass> | |
| 202 | void kaneko_view2_tilemap_device::kaneko16_prepare_common(_BitmapClass &bitmap, const rectangle &cliprect) | |
| 200 | 203 | { |
| 201 | 204 | int layers_flip_0; |
| 202 | 205 | UINT16 layer0_scrollx, layer0_scrolly; |
| r29305 | r29306 | |
| 244 | 247 | } |
| 245 | 248 | } |
| 246 | 249 | |
| 247 | void kaneko_view2_tilemap_device::render_tilemap_chip(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int pri) | |
| 250 | void kaneko_view2_tilemap_device::render_tilemap_chip(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int pri) { render_tilemap_chip_common(screen, bitmap, cliprect, pri); } | |
| 251 | void kaneko_view2_tilemap_device::render_tilemap_chip(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, int pri) { render_tilemap_chip_common(screen, bitmap, cliprect, pri); } | |
| 252 | ||
| 253 | template<class _BitmapClass> | |
| 254 | void kaneko_view2_tilemap_device::render_tilemap_chip_common(screen_device &screen, _BitmapClass &bitmap, const rectangle &cliprect, int pri) | |
| 248 | 255 | { |
| 249 | 256 | m_tmap[0]->draw(screen, bitmap, cliprect, pri, pri, 0); |
| 250 | 257 | m_tmap[1]->draw(screen, bitmap, cliprect, pri, pri, 0); |
| 251 | 258 | } |
| 252 | 259 | |
| 253 | void kaneko_view2_tilemap_device::render_tilemap_chip_alt(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int pri, int v2pri) | |
| 260 | void kaneko_view2_tilemap_device::render_tilemap_chip_alt(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int pri, int v2pri) { render_tilemap_chip_alt_common(screen, bitmap, cliprect, pri, v2pri); } | |
| 261 | void kaneko_view2_tilemap_device::render_tilemap_chip_alt(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, int pri, int v2pri) { render_tilemap_chip_alt_common(screen, bitmap, cliprect, pri, v2pri); } | |
| 262 | ||
| 263 | template<class _BitmapClass> | |
| 264 | void kaneko_view2_tilemap_device::render_tilemap_chip_alt_common(screen_device &screen, _BitmapClass &bitmap, const rectangle &cliprect, int pri, int v2pri) | |
| 254 | 265 | { |
| 255 | 266 | m_tmap[0]->draw(screen, bitmap, cliprect, pri, v2pri ? pri : 0, 0); |
| 256 | 267 | m_tmap[1]->draw(screen, bitmap, cliprect, pri, v2pri ? pri : 0, 0); |
| r29305 | r29306 | |
|---|---|---|
| 26 | 26 | void kaneko16_vram_w(offs_t offset, UINT16 data, UINT16 mem_mask, int _N_); |
| 27 | 27 | |
| 28 | 28 | // call to do the rendering etc. |
| 29 | template<class _BitmapClass> | |
| 30 | void kaneko16_prepare_common(_BitmapClass &bitmap, const rectangle &cliprect); | |
| 31 | template<class _BitmapClass> | |
| 32 | void render_tilemap_chip_common(screen_device &screen, _BitmapClass &bitmap, const rectangle &cliprect, int pri); | |
| 33 | template<class _BitmapClass> | |
| 34 | void render_tilemap_chip_alt_common(screen_device &screen, _BitmapClass &bitmap, const rectangle &cliprect, int pri, int v2pri); | |
| 35 | ||
| 29 | 36 | void kaneko16_prepare(bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 37 | void kaneko16_prepare(bitmap_rgb32 &bitmap, const rectangle &cliprect); | |
| 30 | 38 | void render_tilemap_chip(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int pri); |
| 39 | void render_tilemap_chip(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, int pri); | |
| 31 | 40 | void render_tilemap_chip_alt(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int pri, int v2pri); |
| 41 | void render_tilemap_chip_alt(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, int pri, int v2pri); | |
| 32 | 42 | |
| 43 | ||
| 33 | 44 | // access |
| 34 | 45 | DECLARE_READ16_MEMBER( kaneko_tmap_vram_r ); |
| 35 | 46 | DECLARE_WRITE16_MEMBER( kaneko_tmap_vram_w ); |
| r29305 | r29306 | |
|---|---|---|
| 174 | 174 | { |
| 175 | 175 | int x = linear_value - 0x3c; |
| 176 | 176 | |
| 177 | if ( (x < 0) || (x > | |
| 177 | if ( (x < 0) || (x > ARRAY_LENGTH(lordgun_gun_x_table)) ) | |
| 178 | 178 | x = 0; |
| 179 | 179 | |
| 180 | 180 | return lordgun_gun_x_table[x] * 1.0f / 0x1BF; |
| r29305 | r29306 | |
| 186 | 186 | |
| 187 | 187 | int x = ioport(gunnames[i])->read() - 0x3c; |
| 188 | 188 | |
| 189 | if ( (x < 0) || (x > | |
| 189 | if ( (x < 0) || (x > ARRAY_LENGTH(lordgun_gun_x_table)) ) | |
| 190 | 190 | x = 0; |
| 191 | 191 | |
| 192 | 192 | m_gun[i].scr_x = lordgun_gun_x_table[x]; |
| r29305 | r29306 | |
|---|---|---|
| 37 | 37 | 5, 7 /* 0x11 - circle */ |
| 38 | 38 | }; |
| 39 | 39 | |
| 40 | for (i = 0; i < | |
| 40 | for (i = 0; i < ARRAY_LENGTH(colortable_source); i++) | |
| 41 | 41 | palette.set_pen_indirect(i, colortable_source[i]); |
| 42 | 42 | } |
| 43 | 43 |
| r29305 | r29306 | |
|---|---|---|
| 229 | 229 | } |
| 230 | 230 | |
| 231 | 231 | // custom function to draw a single sprite. needed to keep correct sprites - sprites and sprites - tilemaps priorities |
| 232 | void kaneko16_sprite_device::kaneko16_draw_sprites_custom(bitmap_ind16 &dest_bmp,const rectangle &clip,gfx_element *gfx, | |
| 232 | ||
| 233 | ||
| 234 | ||
| 235 | ||
| 236 | template<class _BitmapClass> | |
| 237 | void kaneko16_sprite_device::kaneko16_draw_sprites_custom(_BitmapClass &dest_bmp,const rectangle &clip,gfx_element *gfx, | |
| 233 | 238 | UINT32 code,UINT32 color,int flipx,int flipy,int sx,int sy, |
| 234 | 239 | bitmap_ind8 &priority_bitmap, int priority) |
| 235 | 240 | { |
| r29305 | r29306 | |
| 294 | 299 | ey -= pixels; |
| 295 | 300 | } |
| 296 | 301 | |
| 297 | if | |
| 302 | if (ex > sx) | |
| 298 | 303 | { /* skip if inner loop doesn't draw anything */ |
| 299 | int y; | |
| 300 | 304 | |
| 301 | for( y=sy; y<ey; y++ ) | |
| 305 | typename _BitmapClass::pixel_t *dest; | |
| 306 | int rgb; | |
| 307 | if (sizeof(*dest) == 2) rgb = 0; | |
| 308 | else rgb = 1; | |
| 309 | ||
| 310 | const pen_t *pal = gfx->palette()->pens(); | |
| 311 | ||
| 312 | for (int y = sy; y < ey; y++) | |
| 302 | 313 | { |
| 303 | const UINT8 *source = source_base + (y_index>>16) * gfx->rowbytes(); | |
| 304 | UINT16 *dest = &dest_bmp.pix16(y); | |
| 314 | const UINT8 *source = source_base + (y_index >> 16) * gfx->rowbytes(); | |
| 315 | dest = &dest_bmp.pix(y); | |
| 305 | 316 | UINT8 *pri = &priority_bitmap.pix8(y); |
| 306 | 317 | |
| 307 | int x, x_index = x_index_base; | |
| 308 | for( x=sx; x<ex; x++ ) | |
| 318 | int x_index = x_index_base; | |
| 319 | for (int x = sx; x < ex; x++) | |
| 309 | 320 | { |
| 310 | int c = source[x_index>>16]; | |
| 311 | if( c != 0 ) | |
| 321 | int c = source[x_index >> 16]; | |
| 322 | if (c != 0) | |
| 312 | 323 | { |
| 313 | 324 | if (pri[x] < priority) |
| 314 | dest[x] = pen_base + c; | |
| 315 | pri[x] = 0xff; // mark it "already drawn" | |
| 325 | { | |
| 326 | ||
| 327 | if (!rgb) dest[x] = pen_base + c; | |
| 328 | else dest[x] = pal[pen_base + c]; | |
| 329 | ||
| 330 | pri[x] = 0xff; // mark it "already drawn" | |
| 331 | } | |
| 316 | 332 | } |
| 317 | 333 | x_index += dx; |
| 318 | 334 | } |
| r29305 | r29306 | |
| 323 | 339 | } |
| 324 | 340 | } |
| 325 | 341 | |
| 342 | ||
| 343 | ||
| 344 | ||
| 326 | 345 | /* Build a list of sprites to display & draw them */ |
| 327 | ||
| 328 | void kaneko16_sprite_device::kaneko16_draw_sprites(running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap, UINT16* spriteram16, int spriteram16_bytes) | |
| 346 | template<class _BitmapClass> | |
| 347 | void kaneko16_sprite_device::kaneko16_draw_sprites(running_machine &machine, _BitmapClass &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap, UINT16* spriteram16, int spriteram16_bytes) | |
| 329 | 348 | { |
| 330 | 349 | /* Sprites *must* be parsed from the first in RAM to the last, |
| 331 | 350 | because of the multisprite feature. But they *must* be drawn |
| r29305 | r29306 | |
| 550 | 569 | } |
| 551 | 570 | |
| 552 | 571 | |
| 572 | void kaneko16_sprite_device::kaneko16_copybitmap(bitmap_ind16 &bitmap, const rectangle &cliprect) | |
| 573 | { | |
| 574 | copybitmap_trans(bitmap,m_sprites_bitmap,0,0,0,0,cliprect,0); | |
| 575 | } | |
| 553 | 576 | |
| 554 | void kaneko16_sprite_device::kaneko16_ | |
| 577 | void kaneko16_sprite_device::kaneko16_copybitmap(bitmap_rgb32 &bitmap, const rectangle &cliprect) | |
| 555 | 578 | { |
| 579 | const pen_t *pal = m_gfxdecode->gfx(0)->palette()->pens(); | |
| 580 | UINT16* srcbitmap; | |
| 581 | UINT32* dstbitmap; | |
| 582 | ||
| 583 | for (int y = cliprect.min_y; y <= cliprect.max_y; y++) | |
| 584 | { | |
| 585 | srcbitmap = &m_sprites_bitmap.pix16(y); | |
| 586 | dstbitmap = &bitmap.pix32(y); | |
| 587 | ||
| 588 | for (int x = cliprect.min_x; x <= cliprect.max_x; x++) | |
| 589 | { | |
| 590 | UINT16 pix = srcbitmap[x]; | |
| 591 | if (pix) dstbitmap[x] = pal[pix]; | |
| 592 | } | |
| 593 | } | |
| 594 | } | |
| 595 | ||
| 596 | ||
| 597 | ||
| 598 | void kaneko16_sprite_device::kaneko16_render_sprites(running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap, UINT16* spriteram16, int spriteram16_bytes) { kaneko16_render_sprites_common(machine, bitmap, cliprect, priority_bitmap, spriteram16, spriteram16_bytes); } | |
| 599 | void kaneko16_sprite_device::kaneko16_render_sprites(running_machine &machine, bitmap_rgb32 &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap, UINT16* spriteram16, int spriteram16_bytes) { kaneko16_render_sprites_common(machine, bitmap, cliprect, priority_bitmap, spriteram16, spriteram16_bytes); } | |
| 600 | ||
| 601 | template<class _BitmapClass> | |
| 602 | void kaneko16_sprite_device::kaneko16_render_sprites_common(running_machine &machine, _BitmapClass &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap, UINT16* spriteram16, int spriteram16_bytes) | |
| 603 | { | |
| 556 | 604 | /* Sprites last (rendered with pdrawgfx, so they can slip |
| 557 | 605 | in between the layers) */ |
| 558 | 606 | |
| 559 | 607 | if(m_keep_sprites) |
| 560 | 608 | { |
| 561 | /* keep sprites on screen */ | |
| 609 | /* keep sprites on screen - used by mgcrystl when you get the first gem and it shows instructions */ | |
| 562 | 610 | kaneko16_draw_sprites(machine,m_sprites_bitmap, cliprect, priority_bitmap, spriteram16, spriteram16_bytes); |
| 563 | copybitmap | |
| 611 | kaneko16_copybitmap(bitmap,cliprect); | |
| 564 | 612 | } |
| 565 | 613 | else |
| 566 | 614 | { |
| r29305 | r29306 | |
|---|---|---|
| 42 | 42 | virtual int get_sprite_type(void) =0; |
| 43 | 43 | |
| 44 | 44 | void kaneko16_render_sprites(running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap, UINT16* spriteram16, int spriteram16_bytes); |
| 45 | void kaneko16_render_sprites(running_machine &machine, bitmap_rgb32 &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap, UINT16* spriteram16, int spriteram16_bytes); | |
| 45 | 46 | |
| 46 | 47 | |
| 48 | template<class _BitmapClass> | |
| 49 | void kaneko16_render_sprites_common(running_machine &machine, _BitmapClass &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap, UINT16* spriteram16, int spriteram16_bytes); | |
| 50 | ||
| 51 | ||
| 47 | 52 | DECLARE_READ16_MEMBER(kaneko16_sprites_regs_r); |
| 48 | 53 | DECLARE_WRITE16_MEMBER(kaneko16_sprites_regs_w); |
| 49 | 54 | |
| r29305 | r29306 | |
| 81 | 86 | int m_keep_sprites; |
| 82 | 87 | bitmap_ind16 m_sprites_bitmap; |
| 83 | 88 | |
| 84 | void kaneko16_draw_sprites(running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap, UINT16* spriteram16, int spriteram16_bytes); | |
| 85 | 89 | |
| 86 | void kaneko16_draw_sprites_custom(bitmap_ind16 &dest_bmp,const rectangle &clip,gfx_element *gfx, | |
| 90 | template<class _BitmapClass> | |
| 91 | void kaneko16_draw_sprites(running_machine &machine, _BitmapClass &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap, UINT16* spriteram16, int spriteram16_bytes); | |
| 92 | ||
| 93 | ||
| 94 | template<class _BitmapClass> | |
| 95 | void kaneko16_draw_sprites_custom(_BitmapClass &dest_bmp,const rectangle &clip,gfx_element *gfx, | |
| 87 | 96 | UINT32 code,UINT32 color,int flipx,int flipy,int sx,int sy, |
| 88 | 97 | bitmap_ind8 &priority_bitmap, int priority); |
| 89 | 98 | |
| 90 | 99 | int kaneko16_parse_sprite_type012(running_machine &machine, int i, struct tempsprite *s, UINT16* spriteram16, int spriteram16_bytes); |
| 91 | 100 | |
| 101 | void kaneko16_copybitmap(bitmap_ind16 &bitmap, const rectangle &cliprect); | |
| 102 | void kaneko16_copybitmap(bitmap_rgb32 &bitmap, const rectangle &cliprect); | |
| 92 | 103 | |
| 93 | 104 | required_device<gfxdecode_device> m_gfxdecode; |
| 94 | 105 |
| r0 | r29306 | |
|---|---|---|
| 1 | <?xml version="1.0"?> | |
| 2 | <mamelayout version="2"> | |
| 3 | <!-- | |
| 4 | Double Crown control panel | |
| 5 | Written by Roberto Fresca. | |
| 6 | --> | |
| 7 | ||
| 8 | <!-- define button-lamps --> | |
| 9 | ||
| 10 | <element name="hold1" defstate="0"> | |
| 11 | <rect state="1"> | |
| 12 | <color red="1.0" green="0.0" blue="0.0" /> | |
| 13 | </rect> | |
| 14 | <rect state="0"> | |
| 15 | <color red="0.15" green="0.0" blue="0.0" /> | |
| 16 | </rect> | |
| 17 | <text string="HOLD 1"> | |
| 18 | <color red="0.0" green="0.0" blue="0.0" /> | |
| 19 | <bounds x="0" y="0.3" width="1" height="0.4" /> | |
| 20 | </text> | |
| 21 | </element> | |
| 22 | ||
| 23 | <element name="hold2" defstate="0"> | |
| 24 | <rect state="1"> | |
| 25 | <color red="1.0" green="0.0" blue="0.0" /> | |
| 26 | </rect> | |
| 27 | <rect state="0"> | |
| 28 | <color red="0.15" green="0.0" blue="0.0" /> | |
| 29 | </rect> | |
| 30 | <text string="HOLD 2"> | |
| 31 | <color red="0.0" green="0.0" blue="0.0" /> | |
| 32 | <bounds x="0" y="0.3" width="1" height="0.4" /> | |
| 33 | </text> | |
| 34 | </element> | |
| 35 | ||
| 36 | <element name="hold3" defstate="0"> | |
| 37 | <rect state="1"> | |
| 38 | <color red="1.0" green="0.0" blue="0.0" /> | |
| 39 | </rect> | |
| 40 | <rect state="0"> | |
| 41 | <color red="0.15" green="0.0" blue="0.0" /> | |
| 42 | </rect> | |
| 43 | <text string="HOLD 3"> | |
| 44 | <color red="0.0" green="0.0" blue="0.0" /> | |
| 45 | <bounds x="0" y="0.3" width="1" height="0.4" /> | |
| 46 | </text> | |
| 47 | </element> | |
| 48 | ||
| 49 | <element name="hold4" defstate="0"> | |
| 50 | <rect state="1"> | |
| 51 | <color red="1.0" green="0.0" blue="0.0" /> | |
| 52 | </rect> | |
| 53 | <rect state="0"> | |
| 54 | <color red="0.15" green="0.0" blue="0.0" /> | |
| 55 | </rect> | |
| 56 | <text string="HOLD 4"> | |
| 57 | <color red="0.0" green="0.0" blue="0.0" /> | |
| 58 | <bounds x="0" y="0.3" width="1" height="0.4" /> | |
| 59 | </text> | |
| 60 | </element> | |
| 61 | ||
| 62 | <element name="hold5" defstate="0"> | |
| 63 | <rect state="1"> | |
| 64 | <color red="1.0" green="0.0" blue="0.0" /> | |
| 65 | </rect> | |
| 66 | <rect state="0"> | |
| 67 | <color red="0.15" green="0.0" blue="0.0" /> | |
| 68 | </rect> | |
| 69 | <text string="HOLD 5"> | |
| 70 | <color red="0.0" green="0.0" blue="0.0" /> | |
| 71 | <bounds x="0" y="0.3" width="1" height="0.4" /> | |
| 72 | </text> | |
| 73 | </element> | |
| 74 | ||
| 75 | <element name="cancel" defstate="0"> | |
| 76 | <rect state="1"> | |
| 77 | <color red="1.0" green="1.0" blue="0.0" /> | |
| 78 | </rect> | |
| 79 | <rect state="0"> | |
| 80 | <color red="0.12" green="0.12" blue="0.0" /> | |
| 81 | </rect> | |
| 82 | <text string="CANCEL"> | |
| 83 | <color red="0.0" green="0.0" blue="0.0" /> | |
| 84 | <bounds x="0" y="0.3" width="1" height="0.4" /> | |
| 85 | </text> | |
| 86 | </element> | |
| 87 | ||
| 88 | <element name="bet" defstate="0"> | |
| 89 | <rect state="1"> | |
| 90 | <color red="1.0" green="0.0" blue="1.0" /> | |
| 91 | </rect> | |
| 92 | <rect state="0"> | |
| 93 | <color red="0.15" green="0.0" blue="0.15" /> | |
| 94 | </rect> | |
| 95 | <text string="BET"> | |
| 96 | <color red="0.0" green="0.0" blue="0.0" /> | |
| 97 | <bounds x="0" y="0.3" width="1" height="0.4" /> | |
| 98 | </text> | |
| 99 | </element> | |
| 100 | ||
| 101 | <element name="deal" defstate="0"> | |
| 102 | <rect state="1"> | |
| 103 | <color red="0.0" green="1.0" blue="0.0" /> | |
| 104 | </rect> | |
| 105 | <rect state="0"> | |
| 106 | <color red="0.0" green="0.15" blue="0.0" /> | |
| 107 | </rect> | |
| 108 | <text string="DEAL"> | |
| 109 | <color red="0.0" green="0.0" blue="0.0" /> | |
| 110 | <bounds x="0" y="0.3" width="1" height="0.4" /> | |
| 111 | </text> | |
| 112 | </element> | |
| 113 | ||
| 114 | ||
| 115 | <!-- define basic elements --> | |
| 116 | ||
| 117 | <element name="cpanel"> | |
| 118 | <rect> | |
| 119 | <color red="0.0" green="0.0" blue="0.0" /> | |
| 120 | </rect> | |
| 121 | </element> | |
| 122 | ||
| 123 | <element name="cpanel2"> | |
| 124 | <rect> | |
| 125 | <color red="0.045" green="0.045" blue="0.045" /> | |
| 126 | </rect> | |
| 127 | </element> | |
| 128 | ||
| 129 | <element name="hold_b" defstate="0"> | |
| 130 | <rect state="1"> | |
| 131 | <color red="0.8" green="0.0" blue="0.0" /> | |
| 132 | </rect> | |
| 133 | <rect state="0"> | |
| 134 | <color red="0.1" green="0.0" blue="0.0" /> | |
| 135 | </rect> | |
| 136 | </element> | |
| 137 | ||
| 138 | <element name="cancel_b" defstate="0"> | |
| 139 | <rect state="1"> | |
| 140 | <color red="0.8" green="0.8" blue="0.0" /> | |
| 141 | </rect> | |
| 142 | <rect state="0"> | |
| 143 | <color red="0.08" green="0.08" blue="0.0" /> | |
| 144 | </rect> | |
| 145 | </element> | |
| 146 | ||
| 147 | <element name="bet_b" defstate="0"> | |
| 148 | <rect state="1"> | |
| 149 | <color red="0.8" green="0.0" blue="0.8" /> | |
| 150 | </rect> | |
| 151 | <rect state="0"> | |
| 152 | <color red="0.1" green="0.0" blue="0.1" /> | |
| 153 | </rect> | |
| 154 | </element> | |
| 155 | ||
| 156 | <element name="deal_b" defstate="0"> | |
| 157 | <rect state="1"> | |
| 158 | <color red="0.0" green="0.8" blue="0.0" /> | |
| 159 | </rect> | |
| 160 | <rect state="0"> | |
| 161 | <color red="0.0" green="0.1" blue="0.0" /> | |
| 162 | </rect> | |
| 163 | </element> | |
| 164 | ||
| 165 | ||
| 166 | <!-- define background --> | |
| 167 | ||
| 168 | <view name="Button Lamps"> | |
| 169 | <screen index="0"> | |
| 170 | <bounds left="0" top="0" right="4" bottom="3" /> | |
| 171 | </screen> | |
| 172 | ||
| 173 | <bezel element="cpanel"> | |
| 174 | <bounds left="0" right="4" top="3" bottom="3.34" /> | |
| 175 | </bezel> | |
| 176 | ||
| 177 | <bezel element="cpanel2"> | |
| 178 | <bounds left="0" right="4" top="3" bottom="3.17" /> | |
| 179 | </bezel> | |
| 180 | ||
| 181 | <!-- define lamps --> | |
| 182 | ||
| 183 | <bezel name="lamp0" element="deal_b"> | |
| 184 | <bounds x="3.55" y="3.05" width="0.35" height="0.24" /> | |
| 185 | </bezel> | |
| 186 | <bezel name="lamp0" element="deal"> | |
| 187 | <bounds x="3.57" y="3.07" width="0.31" height="0.20" /> | |
| 188 | </bezel> | |
| 189 | ||
| 190 | ||
| 191 | <bezel name="lamp1" element="bet_b"> | |
| 192 | <bounds x="3.10" y="3.05" width="0.35" height="0.24" /> | |
| 193 | </bezel> | |
| 194 | <bezel name="lamp1" element="bet"> | |
| 195 | <bounds x="3.12" y="3.07" width="0.31" height="0.20" /> | |
| 196 | </bezel> | |
| 197 | ||
| 198 | ||
| 199 | <bezel name="lamp2" element="cancel_b"> | |
| 200 | <bounds x="2.35" y="3.05" width="0.35" height="0.24" /> | |
| 201 | </bezel> | |
| 202 | <bezel name="lamp2" element="cancel"> | |
| 203 | <bounds x="2.37" y="3.07" width="0.31" height="0.20" /> | |
| 204 | </bezel> | |
| 205 | ||
| 206 | ||
| 207 | <bezel name="lamp3" element="hold_b"> | |
| 208 | <bounds x="1.90" y="3.05" width="0.35" height="0.24" /> | |
| 209 | </bezel> | |
| 210 | <bezel name="lamp3" element="hold5"> | |
| 211 | <bounds x="1.92" y="3.07" width="0.31" height="0.20" /> | |
| 212 | </bezel> | |
| 213 | ||
| 214 | ||
| 215 | <bezel name="lamp4" element="hold_b"> | |
| 216 | <bounds x="1.45" y="3.05" width="0.35" height="0.24" /> | |
| 217 | </bezel> | |
| 218 | <bezel name="lamp4" element="hold4"> | |
| 219 | <bounds x="1.47" y="3.07" width="0.31" height="0.20" /> | |
| 220 | </bezel> | |
| 221 | ||
| 222 | ||
| 223 | <bezel name="lamp5" element="hold_b"> | |
| 224 | <bounds x="1.00" y="3.05" width="0.35" height="0.24" /> | |
| 225 | </bezel> | |
| 226 | <bezel name="lamp5" element="hold3"> | |
| 227 | <bounds x="1.02" y="3.07" width="0.31" height="0.20" /> | |
| 228 | </bezel> | |
| 229 | ||
| 230 | ||
| 231 | <bezel name="lamp6" element="hold_b"> | |
| 232 | <bounds x="0.55" y="3.05" width="0.35" height="0.24" /> | |
| 233 | </bezel> | |
| 234 | <bezel name="lamp6" element="hold2"> | |
| 235 | <bounds x="0.57" y="3.07" width="0.31" height="0.20" /> | |
| 236 | </bezel> | |
| 237 | ||
| 238 | ||
| 239 | <bezel name="lamp7" element="hold_b"> | |
| 240 | <bounds x="0.10" y="3.05" width="0.35" height="0.24" /> | |
| 241 | </bezel> | |
| 242 | <bezel name="lamp7" element="hold1"> | |
| 243 | <bounds x="0.12" y="3.07" width="0.31" height="0.20" /> | |
| 244 | </bezel> | |
| 245 | ||
| 246 | ||
| 247 | </view> | |
| 248 | </mamelayout> |
| Added: svn:eol-style + native Added: svn:mime-type + text/xml |
| r29305 | r29306 | |
|---|---|---|
| 1723 | 1723 | m_layer = 0; |
| 1724 | 1724 | } |
| 1725 | 1725 | |
| 1726 | const rtc65271_interface firebeat_rtc = | |
| 1727 | { | |
| 1728 | DEVCB_NULL | |
| 1729 | }; | |
| 1730 | ||
| 1731 | 1726 | WRITE_LINE_MEMBER( firebeat_state::ata_interrupt ) |
| 1732 | 1727 | { |
| 1733 | 1728 | m_maincpu->set_input_line(INPUT_LINE_IRQ4, state); |
| r29305 | r29306 | |
| 1749 | 1744 | MCFG_MACHINE_START_OVERRIDE(firebeat_state,firebeat) |
| 1750 | 1745 | MCFG_MACHINE_RESET_OVERRIDE(firebeat_state,firebeat) |
| 1751 | 1746 | |
| 1752 | MCFG_ | |
| 1747 | MCFG_DEVICE_ADD("rtc", RTC65271, 0) | |
| 1753 | 1748 | |
| 1754 | 1749 | MCFG_FUJITSU_29F016A_ADD("flash_main") |
| 1755 | 1750 | MCFG_FUJITSU_29F016A_ADD("flash_snd1") |
| r29305 | r29306 | |
| 1797 | 1792 | MCFG_MACHINE_START_OVERRIDE(firebeat_state,firebeat) |
| 1798 | 1793 | MCFG_MACHINE_RESET_OVERRIDE(firebeat_state,firebeat) |
| 1799 | 1794 | |
| 1800 | MCFG_ | |
| 1795 | MCFG_DEVICE_ADD("rtc", RTC65271, 0) | |
| 1801 | 1796 | |
| 1802 | 1797 | MCFG_FUJITSU_29F016A_ADD("flash_main") |
| 1803 | 1798 | MCFG_FUJITSU_29F016A_ADD("flash_snd1") |
| r29305 | r29306 | |
|---|---|---|
| 215 | 215 | if (mem_mask == 0xffff0000) |
| 216 | 216 | { |
| 217 | 217 | logerror("68k WRITING %04x to shared ram %x (@%x)\n", (m_shared_ram[offset] & 0xffff0000) >> 16, |
| 218 | 0xc000 + (offset<<1), | |
| 219 | space.device().safe_pc()); | |
| 218 | 0xc000 + (offset<<1), | |
| 219 | space.device().safe_pc()); | |
| 220 | 220 | } |
| 221 | 221 | else if (mem_mask == 0x0000ffff) |
| 222 | 222 | { |
| 223 | 223 | logerror("68k WRITING %04x to shared ram %x (@%x)\n", (m_shared_ram[offset] & 0x0000ffff), |
| 224 | 0xc000 +((offset<<1)+1), | |
| 225 | space.device().safe_pc()); | |
| 224 | 0xc000 +((offset<<1)+1), | |
| 225 | space.device().safe_pc()); | |
| 226 | 226 | } |
| 227 | 227 | else |
| 228 | 228 | { |
| 229 | 229 | logerror("68k WRITING %04x & %04x to shared ram %x & %x [%08x] (@%x)\n", (m_shared_ram[offset] & 0xffff0000) >> 16, |
| 230 | (m_shared_ram[offset] & 0x0000ffff), | |
| 231 | 0xc000 + (offset<<1), | |
| 232 | 0xc000 +((offset<<1)+1), | |
| 233 | mem_mask, | |
| 234 | space.device().safe_pc()); | |
| 230 | (m_shared_ram[offset] & 0x0000ffff), | |
| 231 | 0xc000 + (offset<<1), | |
| 232 | 0xc000 +((offset<<1)+1), | |
| 233 | mem_mask, | |
| 234 | space.device().safe_pc()); | |
| 235 | 235 | } |
| 236 | 236 | |
| 237 | 237 | /* write to the current dsp56k word */ |
| 238 | if (mem_mask | |
| 238 | if (mem_mask & 0xffff0000) | |
| 239 | 239 | { |
| 240 | 240 | m_dsp56k_shared_ram_16[(offset<<1)] = (m_shared_ram[offset] & 0xffff0000) >> 16 ; |
| 241 | 241 | } |
| 242 | 242 | |
| 243 | 243 | /* write to the next dsp56k word */ |
| 244 | if (mem_mask | |
| 244 | if (mem_mask & 0x0000ffff) | |
| 245 | 245 | { |
| 246 | 246 | m_dsp56k_shared_ram_16[(offset<<1)+1] = (m_shared_ram[offset] & 0x0000ffff) ; |
| 247 | 247 | } |
| r29305 | r29306 | |
|---|---|---|
| 242 | 242 | { |
| 243 | 243 | int i; |
| 244 | 244 | |
| 245 | for (i = 0; i < | |
| 245 | for (i = 0; i < ARRAY_LENGTH(colortable_source); i++) | |
| 246 | 246 | { |
| 247 | 247 | int data = colortable_source[i]; |
| 248 | 248 | rgb_t color = rgb_t(pal1bit(data >> 0), pal1bit(data >> 1), pal1bit(data >> 2)); |
| r29305 | r29306 | |
| 280 | 280 | MCFG_SCREEN_PALETTE("palette") |
| 281 | 281 | |
| 282 | 282 | MCFG_GFXDECODE_ADD("gfxdecode", "palette", spcforce) |
| 283 | MCFG_PALETTE_ADD("palette", | |
| 283 | MCFG_PALETTE_ADD("palette", ARRAY_LENGTH(colortable_source)) | |
| 284 | 284 | MCFG_PALETTE_INIT_OWNER(spcforce_state, spcforce) |
| 285 | 285 | |
| 286 | 286 | /* sound hardware */ |
| r29305 | r29306 | |
|---|---|---|
| 98 | 98 | #include "imagedev/chd_cd.h" |
| 99 | 99 | #include "cpu/arm/arm.h" |
| 100 | 100 | #include "cpu/arm7/arm7.h" |
| 101 | #include "mcfglgcy.h" | |
| 102 | 101 | |
| 103 | 102 | |
| 104 | ||
| 105 | 103 | #define X2_CLOCK_PAL 59000000 |
| 106 | 104 | #define X2_CLOCK_NTSC 49090000 |
| 107 | 105 | #define X601_CLOCK XTAL_16_9344MHz |
| r29305 | r29306 | |
| 135 | 133 | void _3do_state::machine_start() |
| 136 | 134 | { |
| 137 | 135 | m_bank2->set_base(memregion("user1")->base()); |
| 136 | m_nvram->set_base(&m_nvmem, sizeof(m_nvmem)); | |
| 138 | 137 | |
| 139 | 138 | /* configure overlay */ |
| 140 | 139 | m_bank1->configure_entry(0, m_dram); |
| r29305 | r29306 | |
| 159 | 158 | NULL |
| 160 | 159 | }; |
| 161 | 160 | |
| 162 | static NVRAM_HANDLER( _3do ) | |
| 163 | { | |
| 164 | _3do_state *state = machine.driver_data<_3do_state>(); | |
| 165 | UINT8 *nvram = state->m_nvram; | |
| 166 | 161 | |
| 167 | if (read_or_write) | |
| 168 | file->write(nvram,0x8000); | |
| 169 | else | |
| 170 | { | |
| 171 | if (file) | |
| 172 | file->read(nvram,0x8000); | |
| 173 | else | |
| 174 | { | |
| 175 | /* fill in the default values */ | |
| 176 | memset(nvram,0xff,0x8000); | |
| 177 | } | |
| 178 | } | |
| 179 | } | |
| 180 | ||
| 181 | 162 | static MACHINE_CONFIG_START( 3do, _3do_state ) |
| 182 | 163 | |
| 183 | 164 | /* Basic machine hardware */ |
| 184 | 165 | MCFG_CPU_ADD( "maincpu", ARM7_BE, XTAL_50MHz/4 ) |
| 185 | 166 | MCFG_CPU_PROGRAM_MAP( 3do_mem) |
| 186 | 167 | |
| 187 | MCFG_NVRAM_ | |
| 168 | MCFG_NVRAM_ADD_1FILL("nvram") | |
| 188 | 169 | |
| 189 | 170 | MCFG_TIMER_DRIVER_ADD_PERIODIC("timer_x16", _3do_state, timer_x16_cb, attotime::from_hz(12000)) // TODO: timing |
| 190 | 171 | |
| r29305 | r29306 | |
| 204 | 185 | MCFG_CPU_ADD("maincpu", ARM7_BE, XTAL_50MHz/4 ) |
| 205 | 186 | MCFG_CPU_PROGRAM_MAP( 3do_mem) |
| 206 | 187 | |
| 207 | MCFG_NVRAM_ | |
| 188 | MCFG_NVRAM_ADD_1FILL("nvram") | |
| 208 | 189 | |
| 209 | 190 | MCFG_TIMER_DRIVER_ADD_PERIODIC("timer_x16", _3do_state, timer_x16_cb, attotime::from_hz(12000)) // TODO: timing |
| 210 | 191 |
| r29305 | r29306 | |
|---|---|---|
| 574 | 574 | MCFG_TMS99xx_ADD("maincpu", TMS9980A, MASTER_CLOCK/4, tmspoker_map, tmspoker_cru_map) |
| 575 | 575 | MCFG_CPU_VBLANK_INT_DRIVER("screen", tmspoker_state, tmspoker_interrupt) |
| 576 | 576 | |
| 577 | // MCFG_NVRAM_HANDLER(generic_0fill) | |
| 578 | ||
| 579 | 577 | /* video hardware */ |
| 580 | 578 | MCFG_SCREEN_ADD("screen", RASTER) |
| 581 | 579 | MCFG_SCREEN_REFRESH_RATE(60) |
| r29305 | r29306 | |
|---|---|---|
| 2394 | 2394 | |
| 2395 | 2395 | |
| 2396 | 2396 | |
| 2397 | //for (i = 0;i < | |
| 2397 | //for (i = 0;i < ARRAY_LENGTH(cookbib2_mcu68k);i++) | |
| 2398 | 2398 | // m_hyperpac_ram[0xf000/2 + i] = cookbib2_mcu68k[i]; |
| 2399 | 2399 | |
| 2400 | 2400 | // for (i = 0;i < 0x200/2;i++) |
| r29305 | r29306 | |
|---|---|---|
| 1762 | 1762 | int res; |
| 1763 | 1763 | |
| 1764 | 1764 | res = resp[m_respcount++]; |
| 1765 | if (m_respcount >= | |
| 1765 | if (m_respcount >= ARRAY_LENGTH(resp)) m_respcount = 0; | |
| 1766 | 1766 | |
| 1767 | 1767 | // logerror("%04x: mcu_r %02x\n",space.device().safe_pc(),res); |
| 1768 | 1768 | |
| r29305 | r29306 | |
| 1980 | 1980 | int res; |
| 1981 | 1981 | |
| 1982 | 1982 | res = resp[m_respcount++]; |
| 1983 | if (m_respcount >= | |
| 1983 | if (m_respcount >= ARRAY_LENGTH(resp)) m_respcount = 0; | |
| 1984 | 1984 | |
| 1985 | 1985 | // logerror("%04x: mcu_r %02x\n",space.device().safe_pc(),res); |
| 1986 | 1986 | |
| r29305 | r29306 | |
| 2259 | 2259 | int res; |
| 2260 | 2260 | |
| 2261 | 2261 | res = resp[m_respcount++]; |
| 2262 | if (m_respcount >= | |
| 2262 | if (m_respcount >= ARRAY_LENGTH(resp)) m_respcount = 0; | |
| 2263 | 2263 | |
| 2264 | 2264 | // logerror("%04x: mcu_r %02x\n",space.device().safe_pc(),res); |
| 2265 | 2265 | |
| r29305 | r29306 | |
| 2396 | 2396 | int res; |
| 2397 | 2397 | |
| 2398 | 2398 | res = resp[m_respcount++]; |
| 2399 | if (m_respcount >= | |
| 2399 | if (m_respcount >= ARRAY_LENGTH(resp)) m_respcount = 0; | |
| 2400 | 2400 | |
| 2401 | 2401 | // popmessage("%04x: mcu_r %02x",space.device().safe_pc(),res); |
| 2402 | 2402 | |
| r29305 | r29306 | |
| 2417 | 2417 | int res; |
| 2418 | 2418 | |
| 2419 | 2419 | res = resp[m_respcount++]; |
| 2420 | if (m_respcount >= | |
| 2420 | if (m_respcount >= ARRAY_LENGTH(resp)) m_respcount = 0; | |
| 2421 | 2421 | |
| 2422 | 2422 | // popmessage("%04x: mcu_r %02x",space.device().safe_pc(),res); |
| 2423 | 2423 |
| r29305 | r29306 | |
|---|---|---|
| 232 | 232 | The Berlin Wall |
| 233 | 233 | ***************************************************************************/ |
| 234 | 234 | |
| 235 | READ16_MEMBER(kaneko16_berlwall_state::berlwall_oki_r) | |
| 236 | { | |
| 237 | UINT16 ret; | |
| 238 | ||
| 239 | if (mem_mask == 0xff00) // reads / writes to the upper byte only appear to act as a mirror to the lower byte, 16-bit reads/writes only access the lower byte. | |
| 240 | { | |
| 241 | mem_mask >>= 8; | |
| 242 | } | |
| 243 | ||
| 244 | ret = m_oki->read(space, offset, mem_mask); | |
| 245 | ret = ret | ret << 8; | |
| 246 | ||
| 247 | return ret; | |
| 248 | } | |
| 249 | ||
| 250 | WRITE16_MEMBER(kaneko16_berlwall_state::berlwall_oki_w) | |
| 251 | { | |
| 252 | if (mem_mask == 0xff00) // reads / writes to the upper byte only appear to act as a mirror to the lower byte, 16-bit reads/writes only access the lower byte. | |
| 253 | { | |
| 254 | data >>= 8; | |
| 255 | mem_mask >>= 8; | |
| 256 | } | |
| 257 | ||
| 258 | m_oki->write(space, offset, data, mem_mask); | |
| 259 | } | |
| 260 | ||
| 235 | 261 | static ADDRESS_MAP_START( berlwall, AS_PROGRAM, 16, kaneko16_berlwall_state ) |
| 236 | 262 | AM_RANGE(0x000000, 0x03ffff) AM_ROM // ROM |
| 237 | 263 | AM_RANGE(0x200000, 0x20ffff) AM_RAM // Work RAM |
| r29305 | r29306 | |
| 251 | 277 | AM_RANGE(0x800000, 0x80001f) AM_READWRITE(kaneko16_ay1_YM2149_r, kaneko16_ay1_YM2149_w) // Sound |
| 252 | 278 | AM_RANGE(0x800200, 0x80021f) AM_READWRITE(kaneko16_ay2_YM2149_r, kaneko16_ay2_YM2149_w) |
| 253 | 279 | AM_RANGE(0x8003fe, 0x8003ff) AM_NOP // for OKI when accessed as .l |
| 254 | AM_RANGE(0x800400, 0x800401) AM_ | |
| 280 | AM_RANGE(0x800400, 0x800401) AM_READWRITE( berlwall_oki_r, berlwall_oki_w ) | |
| 255 | 281 | AM_RANGE(0xc00000, 0xc03fff) AM_DEVREADWRITE("view2_0", kaneko_view2_tilemap_device, kaneko_tmap_vram_r, kaneko_tmap_vram_w ) |
| 256 | 282 | AM_RANGE(0xd00000, 0xd0001f) AM_DEVREADWRITE("view2_0", kaneko_view2_tilemap_device, kaneko_tmap_regs_r, kaneko_tmap_regs_w) |
| 257 | 283 | ADDRESS_MAP_END |
| r29305 | r29306 | |
| 883 | 909 | INPUT_PORTS_END |
| 884 | 910 | |
| 885 | 911 | |
| 912 | ||
| 913 | ||
| 886 | 914 | /*************************************************************************** |
| 887 | 915 | Blaze On |
| 888 | 916 | ***************************************************************************/ |
| r29305 | r29306 | |
| 1624 | 1652 | |
| 1625 | 1653 | /* video hardware */ |
| 1626 | 1654 | MCFG_SCREEN_ADD("screen", RASTER) |
| 1627 | MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_AFTER_VBLANK) // mangled sprites otherwise | |
| 1655 | // MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_AFTER_VBLANK) // mangled sprites otherwise | |
| 1628 | 1656 | MCFG_SCREEN_REFRESH_RATE(60) |
| 1629 | 1657 | MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */) |
| 1630 | 1658 | MCFG_SCREEN_SIZE(256, 256) |
| 1631 | 1659 | MCFG_SCREEN_VISIBLE_AREA(0, 256-1, 16, 240-1) |
| 1632 | 1660 | MCFG_SCREEN_UPDATE_DRIVER(kaneko16_berlwall_state, screen_update_berlwall) |
| 1633 | MCFG_SCREEN_PALETTE("palette") | |
| 1661 | // MCFG_SCREEN_PALETTE("palette") | |
| 1634 | 1662 | |
| 1635 | 1663 | MCFG_GFXDECODE_ADD("gfxdecode", "palette", 1x4bit_1x4bit) |
| 1636 | MCFG_PALETTE_ADD("palette", 2048 | |
| 1664 | MCFG_PALETTE_ADD("palette", 2048 ) | |
| 1637 | 1665 | MCFG_PALETTE_FORMAT(xGGGGGRRRRRBBBBB) |
| 1666 | ||
| 1667 | MCFG_PALETTE_ADD("bgpalette", 32768) /* 32768 static colors for the bg */ | |
| 1668 | MCFG_PALETTE_FORMAT(xGGGGGRRRRRBBBBB) | |
| 1638 | 1669 | MCFG_PALETTE_INIT_OWNER(kaneko16_berlwall_state,berlwall) |
| 1639 | 1670 | |
| 1640 | 1671 | MCFG_DEVICE_ADD("view2_0", KANEKO_TMAP, 0) |
| r29305 | r29306 | |
| 1685 | 1716 | MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */) |
| 1686 | 1717 | MCFG_SCREEN_SIZE(256, 256) |
| 1687 | 1718 | MCFG_SCREEN_VISIBLE_AREA(0, 256-1, 16, 240-1) |
| 1688 | MCFG_SCREEN_UPDATE_DRIVER(kaneko16_ | |
| 1719 | MCFG_SCREEN_UPDATE_DRIVER(kaneko16_state, screen_update_kaneko16) | |
| 1689 | 1720 | MCFG_SCREEN_PALETTE("palette") |
| 1690 | 1721 | |
| 1691 | 1722 | MCFG_GFXDECODE_ADD("gfxdecode", "palette", 1x4bit_2x4bit) |
| r29305 | r29306 | |
| 1758 | 1789 | MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */) |
| 1759 | 1790 | MCFG_SCREEN_SIZE(320, 240) |
| 1760 | 1791 | MCFG_SCREEN_VISIBLE_AREA(0, 320-1, 0, 240-1 -8) |
| 1761 | MCFG_SCREEN_UPDATE_DRIVER(kaneko16_ | |
| 1792 | MCFG_SCREEN_UPDATE_DRIVER(kaneko16_state, screen_update_kaneko16) | |
| 1762 | 1793 | MCFG_SCREEN_PALETTE("palette") |
| 1763 | 1794 | |
| 1764 | 1795 | MCFG_GFXDECODE_ADD("gfxdecode", "palette", 1x4bit_1x4bit) |
| 1765 | 1796 | MCFG_PALETTE_ADD("palette", 2048) |
| 1766 | 1797 | MCFG_PALETTE_FORMAT(xGGGGGRRRRRBBBBB) |
| 1767 | ||
| 1798 | ||
| 1768 | 1799 | MCFG_DEVICE_ADD("view2_0", KANEKO_TMAP, 0) |
| 1769 | 1800 | kaneko_view2_tilemap_device::set_gfx_region(*device, 1); |
| 1770 | 1801 | kaneko_view2_tilemap_device::set_offset(*device, 0x33, 0x8, 320, 240); |
| r29305 | r29306 | |
| 1821 | 1852 | MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */) |
| 1822 | 1853 | MCFG_SCREEN_SIZE(320, 240) |
| 1823 | 1854 | MCFG_SCREEN_VISIBLE_AREA(0, 320-1, 0, 240-1) |
| 1824 | MCFG_SCREEN_UPDATE_DRIVER(kaneko16_ | |
| 1855 | MCFG_SCREEN_UPDATE_DRIVER(kaneko16_state, screen_update_kaneko16) | |
| 1825 | 1856 | MCFG_SCREEN_PALETTE("palette") |
| 1826 | 1857 | |
| 1827 | 1858 | MCFG_GFXDECODE_ADD("gfxdecode", "palette", 1x8bit_2x4bit) |
| r29305 | r29306 | |
| 1943 | 1974 | MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */) |
| 1944 | 1975 | MCFG_SCREEN_SIZE(256, 256) |
| 1945 | 1976 | MCFG_SCREEN_VISIBLE_AREA(0, 256-1, 0+16, 256-16-1) |
| 1946 | MCFG_SCREEN_UPDATE_DRIVER(kaneko16_ | |
| 1977 | MCFG_SCREEN_UPDATE_DRIVER(kaneko16_state, screen_update_kaneko16) | |
| 1947 | 1978 | MCFG_SCREEN_PALETTE("palette") |
| 1948 | 1979 | |
| 1949 | 1980 | MCFG_GFXDECODE_ADD("gfxdecode", "palette", 1x4bit_2x4bit) |
| r29305 | r29306 | |
| 2070 | 2101 | MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) |
| 2071 | 2102 | MCFG_SCREEN_SIZE(320, 240) |
| 2072 | 2103 | MCFG_SCREEN_VISIBLE_AREA(40, 296-1, 16, 240-1) |
| 2073 | MCFG_SCREEN_UPDATE_DRIVER(kaneko16_ | |
| 2104 | MCFG_SCREEN_UPDATE_DRIVER(kaneko16_state, screen_update_kaneko16) | |
| 2074 | 2105 | MCFG_SCREEN_PALETTE("palette") |
| 2075 | 2106 | MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_AFTER_VBLANK) |
| 2076 | 2107 | |
| r29305 | r29306 | |
| 2213 | 2244 | } |
| 2214 | 2245 | |
| 2215 | 2246 | |
| 2247 | ||
| 2248 | ||
| 2216 | 2249 | /*************************************************************************** |
| 2217 | 2250 | |
| 2218 | 2251 | Bakuretsu Breaker |
| r29305 | r29306 | |
| 2486 | 2519 | ROM_END |
| 2487 | 2520 | |
| 2488 | 2521 | |
| 2522 | ||
| 2523 | ||
| 2489 | 2524 | /*************************************************************************** |
| 2490 | 2525 | |
| 2491 | 2526 | Blaze On (Japan version) |
| r29305 | r29306 | |
| 3854 | 3889 | GAME( 1991, berlwall, 0, berlwall, berlwall, kaneko16_berlwall_state, berlwall, ROT0, "Kaneko", "The Berlin Wall", 0 ) |
| 3855 | 3890 | GAME( 1991, berlwallt,berlwall, berlwall, berlwalt, kaneko16_berlwall_state, berlwall, ROT0, "Kaneko", "The Berlin Wall (bootleg ?)", 0 ) |
| 3856 | 3891 | |
| 3892 | ||
| 3893 | ||
| 3857 | 3894 | GAME( 1991, mgcrystl, 0, mgcrystl, mgcrystl, kaneko16_state, kaneko16, ROT0, "Kaneko", "Magical Crystals (World, 92/01/10)", 0 ) |
| 3858 | 3895 | GAME( 1991, mgcrystlo,mgcrystl, mgcrystl, mgcrystl, kaneko16_state, kaneko16, ROT0, "Kaneko", "Magical Crystals (World, 91/12/10)", 0 ) |
| 3859 | 3896 | GAME( 1991, mgcrystlj,mgcrystl, mgcrystl, mgcrystl, kaneko16_state, kaneko16, ROT0, "Kaneko (Atlus license)", "Magical Crystals (Japan, 92/01/13)", 0 ) |
| r29305 | r29306 | |
|---|---|---|
| 132 | 132 | #include "emu.h" |
| 133 | 133 | #include "cpu/m68000/m68000.h" |
| 134 | 134 | #include "machine/mc68681.h" |
| 135 | #include "machine/nvram.h" | |
| 135 | 136 | #include "video/mc6845.h" |
| 136 | 137 | #include "sound/ay8910.h" |
| 137 | 138 | #include "machine/msm6242.h" |
| 138 | 139 | #include "machine/microtch.h" |
| 139 | #include "mcfglgcy.h" | |
| 140 | 140 | |
| 141 | 141 | |
| 142 | 142 | /*************************************************************************** |
| r29305 | r29306 | |
| 156 | 156 | m_duart40_68681(*this, "duart40_68681"), |
| 157 | 157 | m_maincpu(*this,"maincpu"), |
| 158 | 158 | m_microtouch(*this,"microtouch"), |
| 159 | m_nvram(*this, "nvram"), | |
| 160 | m_backup(*this, "backup") | |
| 159 | m_nvram(*this,"nvram"), | |
| 160 | m_ram62256(*this, "ram62256"), | |
| 161 | m_backup(*this, "backup") | |
| 161 | 162 | { } |
| 162 | 163 | |
| 163 | 164 | required_device<mc68681_device> m_duart18_68681; |
| r29305 | r29306 | |
| 166 | 167 | |
| 167 | 168 | required_device<cpu_device> m_maincpu; |
| 168 | 169 | optional_device<microtouch_serial_device> m_microtouch; |
| 170 | required_device<nvram_device> m_nvram; | |
| 169 | 171 | |
| 170 | required_shared_ptr<UINT16> m_ | |
| 172 | required_shared_ptr<UINT16> m_ram62256; | |
| 171 | 173 | required_shared_ptr<UINT16> m_backup; |
| 172 | 174 | |
| 175 | void nvram_init(nvram_device &nvram, void *data, size_t size); | |
| 176 | ||
| 173 | 177 | UINT16 m_datA40000; |
| 174 | 178 | |
| 175 | 179 | //UINT8* m_videoram; |
| r29305 | r29306 | |
| 190 | 194 | DECLARE_WRITE16_MEMBER (io_board_x); |
| 191 | 195 | DECLARE_READ16_MEMBER( nevada_sec_r ); |
| 192 | 196 | DECLARE_WRITE16_MEMBER( nevada_sec_w ); |
| 193 | virtual void machine_reset(); | |
| 194 | 197 | |
| 198 | DECLARE_MACHINE_START(nevada); | |
| 195 | 199 | DECLARE_DRIVER_INIT(nevada); |
| 196 | 200 | }; |
| 197 | 201 | |
| r29305 | r29306 | |
| 320 | 324 | /******************** NVRAM SECTION ************************************/ |
| 321 | 325 | /***************************************************************************/ |
| 322 | 326 | |
| 323 | stat | |
| 327 | void nevada_state::nvram_init(nvram_device &nvram, void *data, size_t size) | |
| 324 | 328 | { |
| 325 | nevada_state *state = machine.driver_data<nevada_state>(); | |
| 326 | if (read_or_write) | |
| 327 | file->write(state->m_nvram,state->m_nvram.bytes()); | |
| 328 | else | |
| 329 | { | |
| 330 | if (file) | |
| 331 | file->read(state->m_nvram,state->m_nvram.bytes()); | |
| 332 | else | |
| 333 | { | |
| 334 | UINT16* defaultram = (UINT16 *) state->memregion("defaults")->base(); | |
| 335 | memset(state->m_nvram,0x00,state->m_nvram.bytes()); | |
| 336 | if (defaultram) memcpy(state->m_nvram, state->memregion("defaults")->base(), state->memregion("defaults")->bytes()); | |
| 337 | } | |
| 338 | } | |
| 329 | memset(data, 0x00, size); | |
| 330 | if (memregion("defaults")->base()) | |
| 331 | memcpy(data, memregion("defaults")->base(), memregion("defaults")->bytes()); | |
| 339 | 332 | } |
| 340 | 333 | |
| 334 | ||
| 341 | 335 | /*************************************************************************** |
| 342 | 336 | |
| 343 | 337 | U18 MC68681 RS232 UART SIDEA = MODEM 1200 Baud |
| r29305 | r29306 | |
| 526 | 520 | */ |
| 527 | 521 | /***************************************************************************/ |
| 528 | 522 | static ADDRESS_MAP_START( nevada_map, AS_PROGRAM, 16,nevada_state ) |
| 529 | AM_RANGE(0x00000000, 0x0000ffff) AM_RAM AM_SHARE(" | |
| 523 | AM_RANGE(0x00000000, 0x0000ffff) AM_RAM AM_SHARE("ram62256") | |
| 530 | 524 | AM_RANGE(0x00010000, 0x00021fff) AM_RAM AM_SHARE("backup") |
| 531 | 525 | AM_RANGE(0x00900000, 0x00900001) AM_DEVWRITE8("crtc",mc6845_device, address_w,0x00ff ) |
| 532 | 526 | AM_RANGE(0x00908000, 0x00908001) AM_DEVWRITE8("crtc",mc6845_device,register_w,0x00ff ) |
| r29305 | r29306 | |
| 594 | 588 | |
| 595 | 589 | /***************************************************************************/ |
| 596 | 590 | /************************* |
| 597 | * Machine | |
| 591 | * Machine start * | |
| 598 | 592 | *************************/ |
| 599 | 593 | |
| 600 | ||
| 594 | MACHINE_START_MEMBER(nevada_state, nevada) | |
| 601 | 595 | { |
| 596 | m_nvram->set_base(m_ram62256, 0x1000); | |
| 602 | 597 | } |
| 598 | ||
| 603 | 599 | /***************************************************************************/ |
| 604 | 600 | |
| 605 | 601 | /************************* |
| r29305 | r29306 | |
| 614 | 610 | |
| 615 | 611 | MCFG_WATCHDOG_TIME_INIT(attotime::from_msec(150)) /* 150ms Ds1232 TD to Ground */ |
| 616 | 612 | |
| 613 | MCFG_MACHINE_START_OVERRIDE(nevada_state, nevada) | |
| 617 | 614 | |
| 618 | MCFG_NVRAM_ | |
| 615 | MCFG_NVRAM_ADD_CUSTOM_DRIVER("nvram", nevada_state, nvram_init) | |
| 619 | 616 | |
| 620 | 617 | // video hardware |
| 621 | 618 | MCFG_SCREEN_ADD("screen", RASTER) |
| r29305 | r29306 | |
|---|---|---|
| 272 | 272 | }; |
| 273 | 273 | |
| 274 | 274 | |
| 275 | for (int i = 0; i < | |
| 275 | for (int i = 0; i < ARRAY_LENGTH(famicombox_banks); i++ ) | |
| 276 | 276 | { |
| 277 | 277 | if ( bank == famicombox_banks[i].bank || |
| 278 | 278 | famicombox_banks[i].bank == 0 ) |
| r29305 | r29306 | |
|---|---|---|
| 854 | 854 | } |
| 855 | 855 | } |
| 856 | 856 | |
| 857 | static const rtc65271_interface twinkle_rtc = | |
| 858 | { | |
| 859 | DEVCB_NULL | |
| 860 | }; | |
| 861 | 857 | |
| 862 | 858 | static MACHINE_CONFIG_START( twinkle, twinkle_state ) |
| 863 | 859 | /* basic machine hardware */ |
| r29305 | r29306 | |
| 883 | 879 | MCFG_ATA_INTERFACE_ADD("ata", ata_devices, "hdd", NULL, true) |
| 884 | 880 | MCFG_ATA_INTERFACE_IRQ_HANDLER(WRITELINE(twinkle_state, ide_interrupt)) |
| 885 | 881 | |
| 886 | MCFG_ | |
| 882 | MCFG_DEVICE_ADD("rtc", RTC65271, 0) | |
| 887 | 883 | |
| 888 | 884 | /* video hardware */ |
| 889 | 885 | MCFG_PSXGPU_ADD( "maincpu", "gpu", CXD8561Q, 0x200000, XTAL_53_693175MHz ) |
| r29305 | r29306 | |
|---|---|---|
| 25 | 25 | #include "cpu/z80/z80.h" |
| 26 | 26 | #include "sound/sn76496.h" |
| 27 | 27 | #include "includes/mjkjidai.h" |
| 28 | #include "mcfglgcy.h" | |
| 29 | 28 | |
| 30 | 29 | /* Start of ADPCM custom chip code */ |
| 31 | 30 | |
| r29305 | r29306 | |
| 133 | 132 | |
| 134 | 133 | res |= (ioport("IN3")->read() & 0xc0); |
| 135 | 134 | |
| 136 | if (m_nvram_init_count) | |
| 137 | { | |
| 138 | m_nvram_init_count--; | |
| 139 | res &= 0xbf; | |
| 140 | } | |
| 141 | ||
| 142 | 135 | return res; |
| 143 | 136 | } |
| 144 | 137 | |
| r29305 | r29306 | |
| 153 | 146 | } |
| 154 | 147 | } |
| 155 | 148 | |
| 156 | static NVRAM_HANDLER( mjkjidai ) | |
| 157 | { | |
| 158 | mjkjidai_state *state = machine.driver_data<mjkjidai_state>(); | |
| 159 | 149 | |
| 160 | if (read_or_write) | |
| 161 | file->write(state->m_nvram, state->m_nvram.bytes()); | |
| 162 | else if (file) | |
| 163 | file->read(state->m_nvram, state->m_nvram.bytes()); | |
| 164 | else | |
| 165 | { | |
| 166 | state->m_nvram_init_count = 1; | |
| 167 | } | |
| 168 | } | |
| 169 | ||
| 170 | ||
| 171 | ||
| 172 | 150 | static ADDRESS_MAP_START( mjkjidai_map, AS_PROGRAM, 8, mjkjidai_state ) |
| 173 | 151 | AM_RANGE(0x0000, 0x7fff) AM_ROM |
| 174 | 152 | AM_RANGE(0x8000, 0xbfff) AM_ROMBANK("bank1") |
| 175 | 153 | AM_RANGE(0xc000, 0xcfff) AM_RAM |
| 176 | AM_RANGE(0xd000, 0xdfff) AM_RAM AM_SHARE("nvram") // cleared and initialized on startup if bit 6 | |
| 154 | AM_RANGE(0xd000, 0xdfff) AM_RAM AM_SHARE("nvram") // cleared and initialized on startup if bit 6 of port 00 is 0 | |
| 177 | 155 | AM_RANGE(0xe000, 0xe01f) AM_RAM AM_SHARE("spriteram1") // shared with tilemap ram |
| 178 | 156 | AM_RANGE(0xe800, 0xe81f) AM_RAM AM_SHARE("spriteram2") // shared with tilemap ram |
| 179 | 157 | AM_RANGE(0xf000, 0xf01f) AM_RAM AM_SHARE("spriteram3") // shared with tilemap ram |
| r29305 | r29306 | |
| 385 | 363 | MCFG_CPU_IO_MAP(mjkjidai_io_map) |
| 386 | 364 | MCFG_CPU_VBLANK_INT_DRIVER("screen", mjkjidai_state, vblank_irq) |
| 387 | 365 | |
| 388 | MCFG_NVRAM_ | |
| 366 | MCFG_NVRAM_ADD_NO_FILL("nvram") | |
| 389 | 367 | |
| 390 | 368 | /* video hardware */ |
| 391 | 369 | MCFG_SCREEN_ADD("screen", RASTER) |
| r29305 | r29306 | |
| 442 | 420 | |
| 443 | 421 | ROM_REGION( 0x8000, "adpcm", 0 ) /* ADPCM samples */ |
| 444 | 422 | ROM_LOAD( "mkj-40.14c", 0x00000, 0x8000, CRC(4d8fcc4a) SHA1(24c2b8031367035c89c6649a084bce0714f3e8d4) ) |
| 423 | ||
| 424 | ROM_REGION( 0x1000, "nvram", 0 ) /* preformatted NVRAM */ | |
| 425 | ROM_LOAD( "default.nv", 0x00000, 0x1000, CRC(eccc0263) SHA1(679010f096536e8bb572551e9d0776cad72145e2) ) | |
| 445 | 426 | ROM_END |
| 446 | 427 | |
| 447 | 428 |
| r29305 | r29306 | |
|---|---|---|
| 1134 | 1134 | 5x HM6116L-120 |
| 1135 | 1135 | |
| 1136 | 1136 | One extra ROM (u48) is blank. |
| 1137 | Sure is the one that store the palette at offset $C000. | |
| 1137 | Sure is the one that store the palette at offset $C000, | |
| 1138 | among the missing graphics. | |
| 1138 | 1139 | |
| 1139 | Also suspect that graphics ROMs are underdumped since | |
| 1140 | they lack of at least 4 extra big girl pictures. | |
| 1140 | Also graphics ROMs are half the standard size and | |
| 1141 | they lack of at least 4 extra big girl pictures. | |
| 1141 | 1142 | |
| 1142 | 1143 | BP 170 to see the palette registers... |
| 1143 | 1144 | |
| 1144 | 1145 | */ |
| 1145 | 1146 | ROM_START( sstar97 ) |
| 1146 | 1147 | ROM_REGION( 0x80000, "maincpu", 0 ) |
| 1147 | ROM_LOAD( "27256.u15", 0x0000, 0x8000, | |
| 1148 | ROM_LOAD( "27256.u15", 0x0000, 0x8000, CRC(a5da4f92) SHA1(82ac70bd379649f130db017aa226d0247db0f3cd) ) | |
| 1148 | 1149 | ROM_LOAD( "unknown.u48", 0x8000, 0x8000, BAD_DUMP CRC(9f4c02e3) SHA1(05975184130ea7dd3bb5d32eff77b585bd53e6b5) ) // palette borrowed from other game |
| 1149 | 1150 | |
| 1150 | ROM_REGION( 0x40000, "gfx1", 0 ) | |
| 1151 | ROM_REGION( 0x40000, "gfx1", 0 ) // all ROMs are 28-pins 27512 | |
| 1151 | 1152 | ROM_LOAD16_BYTE( "bor_dun_4.u23", 0x00000, 0x10000, CRC(82c9db19) SHA1(3611fb59bb7c962c7fabe7a29fa72b632fa69bed) ) |
| 1152 | 1153 | ROM_LOAD16_BYTE( "bor_dun_2.u25", 0x00001, 0x10000, CRC(42ee9b7a) SHA1(b39f677f58072ea7dcd7f49208be1a7b70bdc5e5) ) |
| 1153 | 1154 | ROM_LOAD16_BYTE( "bor_dun_3.u24", 0x20000, 0x10000, CRC(6d70879b) SHA1(83cbe67cda95e5f3d95065015f6b1b2044b88989) ) |
| 1154 | 1155 | ROM_LOAD16_BYTE( "bor_dun_1.u26", 0x20001, 0x10000, CRC(1b8b84ac) SHA1(b914bad0b1fb58cf581d1227e8127c6afb906fb7) ) |
| 1155 | 1156 | |
| 1156 | ROM_REGION( 0x40000, "gfx2", 0 ) | |
| 1157 | ROM_REGION( 0x40000, "gfx2", 0 ) // all ROMs are 28-pins 27512 | |
| 1157 | 1158 | ROM_LOAD16_BYTE( "bor_dun_8.u19", 0x00000, 0x10000, CRC(daf651a7) SHA1(d4e472aa90aa2b52c997b2f2272007b139e3cbc2) ) |
| 1158 | 1159 | ROM_LOAD16_BYTE( "bor_dun_6.u21", 0x00001, 0x10000, CRC(1d88bc70) SHA1(49246d96a4ce2b8e9b10e928d7dd13973feac883) ) |
| 1159 | 1160 | ROM_LOAD16_BYTE( "bor_dun_7.u20", 0x20000, 0x10000, CRC(7e28ba2f) SHA1(ac8d4e95efce87456f569a71650bd7afcb59095e) ) |
| r29305 | r29306 | |
|---|---|---|
| 116 | 116 | { |
| 117 | 117 | int i; |
| 118 | 118 | |
| 119 | for (i = 0; i < | |
| 119 | for (i = 0; i < ARRAY_LENGTH(colortable_source); i++) | |
| 120 | 120 | { |
| 121 | 121 | rgb_t color; |
| 122 | 122 | |
| r29305 | r29306 | |
| 389 | 389 | MCFG_SCREEN_PALETTE("palette") |
| 390 | 390 | |
| 391 | 391 | MCFG_GFXDECODE_ADD("gfxdecode", "palette", skydiver) |
| 392 | MCFG_PALETTE_ADD("palette", | |
| 392 | MCFG_PALETTE_ADD("palette", ARRAY_LENGTH(colortable_source)) | |
| 393 | 393 | MCFG_PALETTE_INIT_OWNER(skydiver_state, skydiver) |
| 394 | 394 | |
| 395 | 395 |
| r29305 | r29306 | |
|---|---|---|
| 175 | 175 | |
| 176 | 176 | for(i=0;i<0x20;i+=4) |
| 177 | 177 | { |
| 178 | if( | |
| 178 | if(~spriteram[i+0] & 1) | |
| 179 | 179 | continue; |
| 180 | 180 | |
| 181 | 181 | spr_offs = spriteram[i+1]|tile_bank; |
| r29305 | r29306 | |
| 190 | 190 | |
| 191 | 191 | for(i=0x3e0;i<0x400;i+=4) |
| 192 | 192 | { |
| 193 | if( | |
| 193 | if(~spriteram[i+0] & 1) | |
| 194 | 194 | continue; |
| 195 | 195 | |
| 196 | 196 | spr_offs = spriteram[i+1]|tile_bank; |
| r29305 | r29306 | |
|---|---|---|
| 464 | 464 | |
| 465 | 465 | // HACK: read IPT_START1 from "INPUTS" to avoid listing it twice or having two independent STARTs listed |
| 466 | 466 | int start_depressed = ~value & 0x01000000; |
| 467 | keys |= start_depressed ? 1 << ( | |
| 467 | keys |= start_depressed ? 1 << (ARRAY_LENGTH(key_codes) - 1) : 0; // and bung it in at the end | |
| 468 | 468 | |
| 469 | 469 | value |= 0xFFFF0000; // set top word |
| 470 | 470 | do { |
| 471 | 471 | // since we can't handle multiple keys, just return the first one depressed |
| 472 | if((keys & which_key) && (count < | |
| 472 | if((keys & which_key) && (count < ARRAY_LENGTH(key_codes))) { | |
| 473 | 473 | value &= ~((UINT32)(key_codes[count]) << 16); // mask in selected word as IP_ACTIVE_LOW |
| 474 | 474 | break; |
| 475 | 475 | } |
| r29305 | r29306 | |
|---|---|---|
| 1 | 1 | // license:MAME |
| 2 | // copyright-holders:Angelo Salese | |
| 2 | // copyright-holders: Angelo Salese, Roberto Fresca. | |
| 3 | 3 | /*************************************************************************** |
| 4 | 4 | |
| 5 | 5 | Double Crown (c) 1997 Cadence Technology / Dyna |
| 6 | 6 | |
| 7 | driver by Angelo Salese | |
| 7 | Driver by Angelo Salese | |
| 8 | Additional work by Roberto Fresca. | |
| 8 | 9 | |
| 9 | 10 | TODO: |
| 10 | 11 | - Bogus "Hole" in main screen display; |
| 11 | 12 | - Is the background pen really black? |
| 12 | 13 | - Lots of unmapped I/Os (game doesn't make much use of the HW); |
| 13 | - outputs / lamps; | |
| 14 | 14 | - video / irq timings; |
| 15 | 15 | |
| 16 | 16 | Notes: |
| r29305 | r29306 | |
| 22 | 22 | these ... |
| 23 | 23 | |
| 24 | 24 | ============================================================================ |
| 25 | ||
| 25 | 26 | Excellent System |
| 26 | 27 | boardlabel: ES-9411B |
| 27 | 28 | |
| r29305 | r29306 | |
| 33 | 34 | 2 * N341256P-25 - CMOS SRAM 256K-BIT(32KX8) |
| 34 | 35 | 4 * dipsw 8pos |
| 35 | 36 | YMZ284-D (ay8910, but without i/o ports) |
| 36 | MAXIM MAX693ACPE is a "Microprocessor Supervisory Circuit", for watchdog? and for keeping nvram stable? | |
| 37 | MAXIM MAX693ACPE is a "Microprocessor Supervisory Circuit", for watchdog | |
| 38 | and for nvram functions. | |
| 37 | 39 | |
| 38 | 40 | ***************************************************************************/ |
| 39 | 41 | |
| 40 | 42 | |
| 43 | #define MAIN_CLOCK XTAL_28_63636MHz | |
| 44 | #define CPU_CLOCK MAIN_CLOCK / 6 | |
| 45 | #define SND_CLOCK MAIN_CLOCK / 12 | |
| 46 | ||
| 41 | 47 | #include "emu.h" |
| 42 | 48 | #include "cpu/z80/z80.h" |
| 43 | 49 | #include "sound/ay8910.h" |
| 44 | 50 | #include "machine/nvram.h" |
| 45 | 51 | |
| 46 | #define MAIN_CLOCK XTAL_28_63636MHz | |
| 47 | ||
| 52 | #include "dblcrown.lh" | |
| 48 | 53 | #define DEBUG_VRAM |
| 49 | 54 | |
| 50 | 55 | class dblcrown_state : public driver_device |
| r29305 | r29306 | |
| 90 | 95 | DECLARE_WRITE8_MEMBER(output_w); |
| 91 | 96 | DECLARE_READ8_MEMBER(lamps_r); |
| 92 | 97 | DECLARE_WRITE8_MEMBER(lamps_w); |
| 98 | DECLARE_WRITE8_MEMBER(watchdog_w); | |
| 93 | 99 | |
| 94 | 100 | TIMER_DEVICE_CALLBACK_MEMBER(dblcrown_irq_scanline); |
| 95 | 101 | DECLARE_PALETTE_INIT(dblcrown); |
| 102 | ||
| 96 | 103 | protected: |
| 97 | 104 | // driver_device overrides |
| 98 | 105 | virtual void machine_start(); |
| r29305 | r29306 | |
| 103 | 110 | |
| 104 | 111 | void dblcrown_state::video_start() |
| 105 | 112 | { |
| 106 | m_pal_ram = auto_alloc_array(machine(), UINT8, 0x200*2); | |
| 107 | m_vram = auto_alloc_array(machine(), UINT8, 0x1000*0x10); | |
| 113 | m_pal_ram = auto_alloc_array(machine(), UINT8, 0x200 * 2); | |
| 114 | m_vram = auto_alloc_array(machine(), UINT8, 0x1000 * 0x10); | |
| 108 | 115 | |
| 109 | save_pointer(NAME(m_vram), 0x1000*0x10); | |
| 116 | save_pointer(NAME(m_vram), 0x1000 * 0x10); | |
| 110 | 117 | } |
| 111 | 118 | |
| 112 | 119 | UINT32 dblcrown_state::screen_update( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect ) |
| r29305 | r29306 | |
| 118 | 125 | |
| 119 | 126 | count = 0xa000; |
| 120 | 127 | |
| 121 | for (y=0;y<16;y++) | |
| 128 | for (y = 0; y < 16; y++) | |
| 122 | 129 | { |
| 123 | for (x=0;x<32;x++) | |
| 130 | for (x = 0; x < 32; x++) | |
| 124 | 131 | { |
| 125 | UINT16 tile = ((m_vram[count])|(m_vram[count+1]<<8)) & 0xfff; | |
| 132 | UINT16 tile = ((m_vram[count]) | (m_vram[count+1] << 8)) & 0xfff; | |
| 126 | 133 | UINT8 col = (m_vram[count+1] >> 4); |
| 127 | 134 | |
| 128 | gfx_2->opaque(bitmap,cliprect,tile,col,0,0,x*16,y*16); | |
| 135 | gfx_2->opaque(bitmap, cliprect, tile, col, 0, 0, x * 16, y * 16); | |
| 129 | 136 | |
| 130 | count+=2; | |
| 137 | count += 2; | |
| 131 | 138 | } |
| 132 | 139 | } |
| 133 | 140 | |
| 134 | 141 | count = 0xb000; |
| 135 | 142 | |
| 136 | for (y=0;y<32;y++) | |
| 143 | for (y = 0; y < 32; y++) | |
| 137 | 144 | { |
| 138 | for (x=0;x<64;x++) | |
| 145 | for (x = 0; x < 64; x++) | |
| 139 | 146 | { |
| 140 | UINT16 tile = ((m_vram[count])|(m_vram[count+1]<<8)) & 0xfff; | |
| 141 | UINT8 col = (m_vram[count+1] >> 4); // ok? | |
| 147 | UINT16 tile = ((m_vram[count]) | (m_vram[count + 1] << 8)) & 0xfff; | |
| 148 | UINT8 col = (m_vram[count + 1] >> 4); // ok? | |
| 142 | 149 | |
| 143 | gfx->transpen(bitmap,cliprect,tile,col,0,0,x*8,y*8,0); | |
| 150 | gfx->transpen(bitmap, cliprect, tile, col, 0, 0, x * 8, y * 8, 0); | |
| 144 | 151 | |
| 145 | count+=2; | |
| 152 | count += 2; | |
| 146 | 153 | } |
| 147 | 154 | } |
| 148 | 155 | |
| 149 | ||
| 150 | 156 | return 0; |
| 151 | 157 | } |
| 152 | 158 | |
| r29305 | r29306 | |
| 187 | 193 | // offset+=0x200; |
| 188 | 194 | |
| 189 | 195 | m_pal_ram[offset] = data; |
| 190 | offset>>=1; | |
| 191 | datax = m_pal_ram[offset*2] + 256*m_pal_ram[offset*2 + 1]; | |
| 196 | offset >>= 1; | |
| 197 | datax = m_pal_ram[offset * 2] + 256 * m_pal_ram[offset * 2 + 1]; | |
| 192 | 198 | |
| 193 | r = ((datax)&0x000f)>>0; | |
| 194 | g = ((datax)&0x00f0)>>4; | |
| 195 | b = ((datax)&0x0f00)>>8; | |
| 199 | r = ((datax) & 0x000f) >> 0; | |
| 200 | g = ((datax) & 0x00f0) >> 4; | |
| 201 | b = ((datax) & 0x0f00) >> 8; | |
| 196 | 202 | /* TODO: remaining bits */ |
| 197 | 203 | |
| 198 | 204 | m_palette->set_pen_color(offset, pal4bit(r), pal4bit(g), pal4bit(b)); |
| r29305 | r29306 | |
| 255 | 261 | |
| 256 | 262 | res = 0; |
| 257 | 263 | |
| 258 | for(i=0;i<4;i++) | |
| 264 | for(i = 0; i < 4; i++) | |
| 259 | 265 | { |
| 260 | 266 | if(m_mux_data & 1 << i) |
| 261 | 267 | res |= ioport(muxnames[i])->read(); |
| r29305 | r29306 | |
| 272 | 278 | |
| 273 | 279 | res = 0xff; |
| 274 | 280 | |
| 275 | for(i=0;i<4;i++) | |
| 281 | for(i = 0; i < 4; i++) | |
| 276 | 282 | { |
| 277 | 283 | if(ioport(muxnames[i])->read() != 0xff) |
| 278 | 284 | res &= ~(1 << i); |
| r29305 | r29306 | |
| 283 | 289 | |
| 284 | 290 | WRITE8_MEMBER( dblcrown_state::output_w ) |
| 285 | 291 | { |
| 286 | // bit 4: coin counter | |
| 292 | /* bits | |
| 293 | 7654 3210 | |
| 294 | ---- -x-- unknown (active after deal) | |
| 295 | ---- x--- Payout counter pulse | |
| 296 | ---x ---- Coin In counter pulse | |
| 297 | -x-- ---- unknown (active after deal) | |
| 298 | x-x- --xx unknown | |
| 299 | */ | |
| 287 | 300 | |
| 288 | //popmessage("%02x",data); | |
| 301 | coin_counter_w(machine(), 0, data & 0x10); /* Coin In counter pulse */ | |
| 302 | coin_counter_w(machine(), 1 ,data & 0x08); /* Payout counter pulse */ | |
| 303 | // popmessage("out: %02x", data); | |
| 289 | 304 | } |
| 290 | 305 | |
| 291 | 306 | |
| r29305 | r29306 | |
| 296 | 311 | |
| 297 | 312 | WRITE8_MEMBER( dblcrown_state::lamps_w ) |
| 298 | 313 | { |
| 299 | //popmessage("%02x",data); | |
| 314 | /* bits | |
| 315 | 7654 3210 | |
| 316 | ---- ---x Deal | |
| 317 | ---- --x- Bet | |
| 318 | ---- -x-- Cancel | |
| 319 | ---- x--- Hold 5 | |
| 320 | ---x ---- Hold 4 | |
| 321 | --x- ---- Hold 3 | |
| 322 | -x-- ---- Hold 2 | |
| 323 | x--- ---- Hold 1 | |
| 324 | */ | |
| 325 | output_set_lamp_value(0, (data) & 1); /* Deal */ | |
| 326 | output_set_lamp_value(1, (data >> 1) & 1); /* Bet */ | |
| 327 | output_set_lamp_value(2, (data >> 2) & 1); /* Cancel */ | |
| 328 | output_set_lamp_value(3, (data >> 3) & 1); /* Hold 5 */ | |
| 329 | output_set_lamp_value(4, (data >> 4) & 1); /* Hold 4 */ | |
| 330 | output_set_lamp_value(5, (data >> 5) & 1); /* Hold 3 */ | |
| 331 | output_set_lamp_value(6, (data >> 6) & 1); /* Hold 2 */ | |
| 332 | output_set_lamp_value(7, (data >> 7) & 1); /* Hold 1 */ | |
| 333 | ||
| 300 | 334 | m_lamps_data = data; |
| 301 | 335 | } |
| 302 | 336 | |
| 337 | WRITE8_MEMBER(dblcrown_state::watchdog_w) | |
| 338 | /* | |
| 339 | Always 0x01... | |
| 340 | */ | |
| 341 | { | |
| 342 | if (data & 0x01) /* check for refresh value (0x01) */ | |
| 343 | { | |
| 344 | machine().watchdog_reset(); | |
| 345 | } | |
| 346 | else | |
| 347 | { | |
| 348 | popmessage("Watchdog: %02x", data); | |
| 349 | } | |
| 350 | } | |
| 351 | ||
| 352 | ||
| 303 | 353 | static ADDRESS_MAP_START( dblcrown_map, AS_PROGRAM, 8, dblcrown_state ) |
| 304 | 354 | ADDRESS_MAP_UNMAP_HIGH |
| 305 | 355 | AM_RANGE(0x0000, 0x7fff) AM_ROM |
| r29305 | r29306 | |
| 324 | 374 | AM_RANGE(0x03, 0x03) AM_READ_PORT("DSWD") |
| 325 | 375 | AM_RANGE(0x04, 0x04) AM_READ(in_mux_r) |
| 326 | 376 | AM_RANGE(0x05, 0x05) AM_READ(in_mux_type_r) |
| 327 | AM_RANGE(0x10, 0x10) AM_READWRITE(lamps_r,lamps_w) | |
| 328 | AM_RANGE(0x11, 0x11) AM_READWRITE(bank_r,bank_w) | |
| 329 | AM_RANGE(0x12, 0x12) AM_READWRITE(mux_r,mux_w) | |
| 377 | AM_RANGE(0x10, 0x10) AM_READWRITE(lamps_r, lamps_w) | |
| 378 | AM_RANGE(0x11, 0x11) AM_READWRITE(bank_r, bank_w) | |
| 379 | AM_RANGE(0x12, 0x12) AM_READWRITE(mux_r, mux_w) | |
| 330 | 380 | AM_RANGE(0x20, 0x21) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) |
| 331 | ||
| 381 | AM_RANGE(0x30, 0x30) AM_WRITE(watchdog_w) | |
| 332 | 382 | AM_RANGE(0x40, 0x40) AM_WRITE(output_w) |
| 333 | 383 | ADDRESS_MAP_END |
| 334 | 384 | |
| r29305 | r29306 | |
| 379 | 429 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) |
| 380 | 430 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) |
| 381 | 431 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 382 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) | |
| 383 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 384 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 432 | PORT_DIPNAME( 0x20, 0x20, "Hold Type" ) | |
| 433 | PORT_DIPSETTING( 0x20, "Hold" ) | |
| 434 | PORT_DIPSETTING( 0x00, "Discard" ) | |
| 385 | 435 | PORT_DIPNAME( 0x40, 0x40, "Input Test" ) |
| 386 | 436 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) |
| 387 | 437 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r29305 | r29306 | |
| 561 | 611 | static MACHINE_CONFIG_START( dblcrown, dblcrown_state ) |
| 562 | 612 | |
| 563 | 613 | /* basic machine hardware */ |
| 564 | MCFG_CPU_ADD("maincpu",Z80, | |
| 614 | MCFG_CPU_ADD("maincpu", Z80, CPU_CLOCK) | |
| 565 | 615 | MCFG_CPU_PROGRAM_MAP(dblcrown_map) |
| 566 | 616 | MCFG_CPU_IO_MAP(dblcrown_io) |
| 567 | 617 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", dblcrown_state, dblcrown_irq_scanline, "screen", 0, 1) |
| 618 | MCFG_WATCHDOG_TIME_INIT(attotime::from_msec(1000)) /* 1000 ms. (minimal of MAX693A watchdog long timeout period with internal oscillator) */ | |
| 568 | 619 | |
| 569 | 620 | /* video hardware */ |
| 570 | 621 | MCFG_SCREEN_ADD("screen", RASTER) |
| r29305 | r29306 | |
| 584 | 635 | |
| 585 | 636 | /* sound hardware */ |
| 586 | 637 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 587 | MCFG_SOUND_ADD("aysnd", AY8910, | |
| 638 | MCFG_SOUND_ADD("aysnd", AY8910, SND_CLOCK) | |
| 588 | 639 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) |
| 589 | 640 | MACHINE_CONFIG_END |
| 590 | 641 | |
| r29305 | r29306 | |
| 611 | 662 | ROM_LOAD("palce16v8h.u39", 0x0000, 0x0117, CRC(c74231ee) SHA1(f1b9e98f1fde53eee64d5da38fb8a6c22b6333e2) ) |
| 612 | 663 | ROM_END |
| 613 | 664 | |
| 614 | GAME( 1997, dblcrown, 0, dblcrown, dblcrown, driver_device, 0, ROT0, "Cadence Technology", "Double Crown (v1.0.3)", GAME_IMPERFECT_GRAPHICS ) // 1997 DYNA copyright in tile GFX | |
| 665 | ||
| 666 | /* YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS LAYOUT */ | |
| 667 | GAMEL( 1997, dblcrown, 0, dblcrown, dblcrown, driver_device, 0, ROT0, "Cadence Technology", "Double Crown (v1.0.3)", GAME_IMPERFECT_GRAPHICS, layout_dblcrown ) // 1997 DYNA copyright in tile GFX |
| r29305 | r29306 | |
|---|---|---|
| 48 | 48 | #include "sound/ay8910.h" |
| 49 | 49 | #include "sound/dac.h" |
| 50 | 50 | #include "includes/seicross.h" |
| 51 | #include "mcfglgcy.h" | |
| 52 | 51 | |
| 53 | static NVRAM_HANDLER( seicross ) | |
| 54 | { | |
| 55 | seicross_state *state = machine.driver_data<seicross_state>(); | |
| 56 | UINT8 *nvram = state->m_nvram; | |
| 57 | size_t nvram_size = state->m_nvram.bytes(); | |
| 58 | 52 | |
| 59 | if (read_or_write) | |
| 60 | file->write(nvram,nvram_size); | |
| 61 | else | |
| 62 | { | |
| 63 | if (file) | |
| 64 | file->read(nvram,nvram_size); | |
| 65 | else | |
| 66 | { | |
| 67 | /* fill in the default values */ | |
| 68 | memset(nvram,0,nvram_size); | |
| 69 | nvram[0x0d] = nvram[0x0f] = nvram[0x11] = nvram[0x13] = nvram[0x15] = nvram[0x19] = 1; | |
| 70 | nvram[0x17] = 3; | |
| 71 | } | |
| 72 | } | |
| 53 | void seicross_state::nvram_init(nvram_device &nvram, void *data, size_t size) | |
| 54 | { | |
| 55 | static const UINT8 init[32] = { | |
| 56 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, | |
| 57 | 0, 1, 0, 1, 0, 1, 0, 3, 0, 1, 0, 0, 0, 0, 0, 0, }; | |
| 58 | ||
| 59 | memset(data, 0x00, size); | |
| 60 | memcpy(data, init, sizeof(init)); | |
| 73 | 61 | } |
| 74 | 62 | |
| 75 | ||
| 76 | ||
| 77 | 63 | void seicross_state::machine_reset() |
| 78 | 64 | { |
| 79 | 65 | /* start with the protection mcu halted */ |
| r29305 | r29306 | |
| 395 | 381 | } |
| 396 | 382 | |
| 397 | 383 | |
| 398 | static MACHINE_CONFIG_START( nvram, seicross_state ) | |
| 384 | static MACHINE_CONFIG_START( no_nvram, seicross_state ) | |
| 399 | 385 | |
| 400 | 386 | /* basic machine hardware */ |
| 401 | 387 | MCFG_CPU_ADD("maincpu", Z80, 3072000) /* 3.072 MHz? */ |
| r29305 | r29306 | |
| 404 | 390 | MCFG_CPU_VBLANK_INT_DRIVER("screen", seicross_state, vblank_irq) |
| 405 | 391 | |
| 406 | 392 | MCFG_CPU_ADD("mcu", NSC8105, 3072000) /* ??? */ |
| 407 | MCFG_CPU_PROGRAM_MAP(mcu_nvram_map) | |
| 393 | MCFG_CPU_PROGRAM_MAP(mcu_no_nvram_map) | |
| 408 | 394 | |
| 409 | 395 | MCFG_QUANTUM_TIME(attotime::from_hz(1200)) /* 20 CPU slices per frame - an high value to ensure proper */ |
| 410 | 396 | /* synchronization of the CPUs */ |
| 411 | MCFG_NVRAM_HANDLER(seicross) | |
| 412 | 397 | |
| 413 | 398 | /* video hardware */ |
| 414 | 399 | MCFG_SCREEN_ADD("screen", RASTER) |
| r29305 | r29306 | |
| 435 | 420 | MACHINE_CONFIG_END |
| 436 | 421 | |
| 437 | 422 | |
| 438 | static MACHINE_CONFIG_DERIVED( n | |
| 423 | static MACHINE_CONFIG_DERIVED( nvram, no_nvram ) | |
| 439 | 424 | |
| 440 | 425 | /* basic machine hardware */ |
| 441 | 426 | MCFG_CPU_MODIFY("mcu") |
| 442 | MCFG_CPU_PROGRAM_MAP(mcu_n | |
| 427 | MCFG_CPU_PROGRAM_MAP(mcu_nvram_map) | |
| 443 | 428 | |
| 444 | MCFG_NVRAM_ | |
| 429 | MCFG_NVRAM_ADD_CUSTOM_DRIVER("nvram", seicross_state, nvram_init) | |
| 445 | 430 | MACHINE_CONFIG_END |
| 446 | 431 | |
| 447 | 432 |
| r29305 | r29306 | |
|---|---|---|
| 164 | 164 | } |
| 165 | 165 | } |
| 166 | 166 | |
| 167 | READ8_MEMBER(_3do_state::_3do_nvarea_r) { return m_nvram[offset]; } | |
| 168 | WRITE8_MEMBER(_3do_state::_3do_nvarea_w) { m_nvram[offset] = data; } | |
| 167 | READ8_MEMBER(_3do_state::_3do_nvarea_r) { return m_nvmem[offset]; } | |
| 168 | WRITE8_MEMBER(_3do_state::_3do_nvarea_w) { m_nvmem[offset] = data; } | |
| 169 | 169 | |
| 170 | 170 | |
| 171 | 171 |
| r29305 | r29306 | |
|---|---|---|
| 119 | 119 | CONSTANTS |
| 120 | 120 | ***************************************************************************/ |
| 121 | 121 | |
| 122 | #define ARRAY_LEN(_array) (sizeof(_array) / sizeof(_array[0])) | |
| 123 | ||
| 124 | 122 | #define NO_OUTPUT_ENABLE_FUSE_ROW 0xFFFF |
| 125 | 123 | |
| 126 | 124 | /* Output pin flags */ |
| r29305 | r29306 | |
| 1873 | 1871 | |
| 1874 | 1872 | static pal_data paldata[] = { |
| 1875 | 1873 | {"PAL10L8", 320, |
| 1876 | pal10l8pinfuserows, ARRAY_LEN(pal10l8pinfuserows), | |
| 1877 | pal10l8pinfusecolumns, ARRAY_LEN(pal10l8pinfusecolumns), | |
| 1874 | pal10l8pinfuserows, ARRAY_LENGTH(pal10l8pinfuserows), | |
| 1875 | pal10l8pinfusecolumns, ARRAY_LENGTH(pal10l8pinfusecolumns), | |
| 1878 | 1876 | print_pal10l8_product_terms, |
| 1879 | 1877 | config_pal10l8_pins, |
| 1880 | 1878 | NULL, |
| 1881 | 1879 | NULL}, |
| 1882 | 1880 | {"PAL10H8", 320, |
| 1883 | pal10h8pinfuserows, ARRAY_LEN(pal10h8pinfuserows), | |
| 1884 | pal10h8pinfusecolumns, ARRAY_LEN(pal10h8pinfusecolumns), | |
| 1881 | pal10h8pinfuserows, ARRAY_LENGTH(pal10h8pinfuserows), | |
| 1882 | pal10h8pinfusecolumns, ARRAY_LENGTH(pal10h8pinfusecolumns), | |
| 1885 | 1883 | print_pal10h8_product_terms, |
| 1886 | 1884 | config_pal10h8_pins, |
| 1887 | 1885 | NULL, |
| 1888 | 1886 | NULL}, |
| 1889 | 1887 | {"PAL12H6", 384, |
| 1890 | pal12h6pinfuserows, ARRAY_LEN(pal12h6pinfuserows), | |
| 1891 | pal12h6pinfusecolumns, ARRAY_LEN(pal12h6pinfusecolumns), | |
| 1888 | pal12h6pinfuserows, ARRAY_LENGTH(pal12h6pinfuserows), | |
| 1889 | pal12h6pinfusecolumns, ARRAY_LENGTH(pal12h6pinfusecolumns), | |
| 1892 | 1890 | print_pal12h6_product_terms, |
| 1893 | 1891 | config_pal12h6_pins, |
| 1894 | 1892 | NULL, |
| 1895 | 1893 | NULL}, |
| 1896 | 1894 | {"PAL14H4", 448, |
| 1897 | pal14h4pinfuserows, ARRAY_LEN(pal14h4pinfuserows), | |
| 1898 | pal14h4pinfusecolumns, ARRAY_LEN(pal14h4pinfusecolumns), | |
| 1895 | pal14h4pinfuserows, ARRAY_LENGTH(pal14h4pinfuserows), | |
| 1896 | pal14h4pinfusecolumns, ARRAY_LENGTH(pal14h4pinfusecolumns), | |
| 1899 | 1897 | print_pal14h4_product_terms, |
| 1900 | 1898 | config_pal14h4_pins, |
| 1901 | 1899 | NULL, |
| 1902 | 1900 | NULL}, |
| 1903 | 1901 | {"PAL16H2", 512, |
| 1904 | pal16h2pinfuserows, ARRAY_LEN(pal16h2pinfuserows), | |
| 1905 | pal16h2pinfusecolumns, ARRAY_LEN(pal16h2pinfusecolumns), | |
| 1902 | pal16h2pinfuserows, ARRAY_LENGTH(pal16h2pinfuserows), | |
| 1903 | pal16h2pinfusecolumns, ARRAY_LENGTH(pal16h2pinfusecolumns), | |
| 1906 | 1904 | print_pal16h2_product_terms, |
| 1907 | 1905 | config_pal16h2_pins, |
| 1908 | 1906 | NULL, |
| 1909 | 1907 | NULL}, |
| 1910 | 1908 | {"PAL16C1", 512, |
| 1911 | pal16c1pinfuserows, ARRAY_LEN(pal16c1pinfuserows), | |
| 1912 | pal16c1pinfusecolumns, ARRAY_LEN(pal16c1pinfusecolumns), | |
| 1909 | pal16c1pinfuserows, ARRAY_LENGTH(pal16c1pinfuserows), | |
| 1910 | pal16c1pinfusecolumns, ARRAY_LENGTH(pal16c1pinfusecolumns), | |
| 1913 | 1911 | print_pal16c1_product_terms, |
| 1914 | 1912 | config_pal16c1_pins, |
| 1915 | 1913 | NULL, |
| 1916 | 1914 | NULL}, |
| 1917 | 1915 | {"PAL12L6", 384, |
| 1918 | pal12l6pinfuserows, ARRAY_LEN(pal12l6pinfuserows), | |
| 1919 | pal12l6pinfusecolumns, ARRAY_LEN(pal12l6pinfusecolumns), | |
| 1916 | pal12l6pinfuserows, ARRAY_LENGTH(pal12l6pinfuserows), | |
| 1917 | pal12l6pinfusecolumns, ARRAY_LENGTH(pal12l6pinfusecolumns), | |
| 1920 | 1918 | print_pal12l6_product_terms, |
| 1921 | 1919 | config_pal12l6_pins, |
| 1922 | 1920 | NULL, |
| 1923 | 1921 | NULL}, |
| 1924 | 1922 | {"PAL14L4", 448, |
| 1925 | pal14l4pinfuserows, ARRAY_LEN(pal14l4pinfuserows), | |
| 1926 | pal14l4pinfusecolumns, ARRAY_LEN(pal14l4pinfusecolumns), | |
| 1923 | pal14l4pinfuserows, ARRAY_LENGTH(pal14l4pinfuserows), | |
| 1924 | pal14l4pinfusecolumns, ARRAY_LENGTH(pal14l4pinfusecolumns), | |
| 1927 | 1925 | print_pal14l4_product_terms, |
| 1928 | 1926 | config_pal14l4_pins, |
| 1929 | 1927 | NULL, |
| 1930 | 1928 | NULL}, |
| 1931 | 1929 | {"PAL16L2", 512, |
| 1932 | pal16l2pinfuserows, ARRAY_LEN(pal16l2pinfuserows), | |
| 1933 | pal16l2pinfusecolumns, ARRAY_LEN(pal16l2pinfusecolumns), | |
| 1930 | pal16l2pinfuserows, ARRAY_LENGTH(pal16l2pinfuserows), | |
| 1931 | pal16l2pinfusecolumns, ARRAY_LENGTH(pal16l2pinfusecolumns), | |
| 1934 | 1932 | print_pal16l2_product_terms, |
| 1935 | 1933 | config_pal16l2_pins, |
| 1936 | 1934 | NULL, |
| 1937 | 1935 | NULL}, |
| 1938 | 1936 | /*{"15S8", 0, NULL, 0, NULL, 0, NULL, NULL, NULL, NULL},*/ |
| 1939 | 1937 | {"PAL16L8", 2048, |
| 1940 | pal16l8pinfuserows, ARRAY_LEN(pal16l8pinfuserows), | |
| 1941 | pal16l8pinfusecolumns, ARRAY_LEN(pal16l8pinfusecolumns), | |
| 1938 | pal16l8pinfuserows, ARRAY_LENGTH(pal16l8pinfuserows), | |
| 1939 | pal16l8pinfusecolumns, ARRAY_LENGTH(pal16l8pinfusecolumns), | |
| 1942 | 1940 | print_pal16l8_product_terms, |
| 1943 | 1941 | config_pal16l8_pins, |
| 1944 | 1942 | NULL, |
| 1945 | 1943 | NULL}, |
| 1946 | 1944 | {"PAL16R4", 2048, |
| 1947 | pal16r4pinfuserows, ARRAY_LEN(pal16r4pinfuserows), | |
| 1948 | pal16r4pinfusecolumns, ARRAY_LEN(pal16r4pinfusecolumns), | |
| 1945 | pal16r4pinfuserows, ARRAY_LENGTH(pal16r4pinfuserows), | |
| 1946 | pal16r4pinfusecolumns, ARRAY_LENGTH(pal16r4pinfusecolumns), | |
| 1949 | 1947 | print_pal16r4_product_terms, |
| 1950 | 1948 | config_pal16r4_pins, |
| 1951 | 1949 | NULL, |
| 1952 | 1950 | NULL}, |
| 1953 | 1951 | {"PAL16R6", 2048, |
| 1954 | pal16r6pinfuserows, ARRAY_LEN(pal16r6pinfuserows), | |
| 1955 | pal16r6pinfusecolumns, ARRAY_LEN(pal16r6pinfusecolumns), | |
| 1952 | pal16r6pinfuserows, ARRAY_LENGTH(pal16r6pinfuserows), | |
| 1953 | pal16r6pinfusecolumns, ARRAY_LENGTH(pal16r6pinfusecolumns), | |
| 1956 | 1954 | print_pal16r6_product_terms, |
| 1957 | 1955 | config_pal16r6_pins, |
| 1958 | 1956 | NULL, |
| 1959 | 1957 | NULL}, |
| 1960 | 1958 | {"PAL16R8", 2048, |
| 1961 | pal16r8pinfuserows, ARRAY_LEN(pal16r8pinfuserows), | |
| 1962 | pal16r8pinfusecolumns, ARRAY_LEN(pal16r8pinfusecolumns), | |
| 1959 | pal16r8pinfuserows, ARRAY_LENGTH(pal16r8pinfuserows), | |
| 1960 | pal16r8pinfusecolumns, ARRAY_LENGTH(pal16r8pinfusecolumns), | |
| 1963 | 1961 | print_pal16r8_product_terms, |
| 1964 | 1962 | config_pal16r8_pins, |
| 1965 | 1963 | NULL, |
| r29305 | r29306 | |
| 1967 | 1965 | /*{"PAL16RA8", 0, NULL, 0, NULL, 0, NULL, NULL, NULL, NULL}, |
| 1968 | 1966 | {"PAL16V8R", 0, NULL, 0, NULL, 0, NULL, NULL, NULL, NULL},*/ |
| 1969 | 1967 | {"PALCE16V8", 2194, |
| 1970 | palce16v8pinfuserows, ARRAY_LEN(palce16v8pinfuserows), | |
| 1971 | palce16v8pinfusecolumns, ARRAY_LEN(palce16v8pinfusecolumns), | |
| 1968 | palce16v8pinfuserows, ARRAY_LENGTH(palce16v8pinfuserows), | |
| 1969 | palce16v8pinfusecolumns, ARRAY_LENGTH(palce16v8pinfusecolumns), | |
| 1972 | 1970 | print_palce16v8_product_terms, |
| 1973 | 1971 | config_palce16v8_pins, |
| 1974 | 1972 | NULL, |
| 1975 | 1973 | NULL}, |
| 1976 | 1974 | {"GAL16V8", 2194, |
| 1977 | gal16v8pinfuserows, ARRAY_LEN(gal16v8pinfuserows), | |
| 1978 | gal16v8pinfusecolumns, ARRAY_LEN(gal16v8pinfusecolumns), | |
| 1975 | gal16v8pinfuserows, ARRAY_LENGTH(gal16v8pinfuserows), | |
| 1976 | gal16v8pinfusecolumns, ARRAY_LENGTH(gal16v8pinfusecolumns), | |
| 1979 | 1977 | print_gal16v8_product_terms, |
| 1980 | 1978 | config_gal16v8_pins, |
| 1981 | 1979 | is_gal16v8_product_term_enabled, |
| 1982 | 1980 | NULL}, |
| 1983 | 1981 | {"18CV8", 2696, |
| 1984 | peel18cv8pinfuserows, ARRAY_LEN(peel18cv8pinfuserows), | |
| 1985 | peel18cv8pinfusecolumns, ARRAY_LEN(peel18cv8pinfusecolumns), | |
| 1982 | peel18cv8pinfuserows, ARRAY_LENGTH(peel18cv8pinfuserows), | |
| 1983 | peel18cv8pinfusecolumns, ARRAY_LENGTH(peel18cv8pinfusecolumns), | |
| 1986 | 1984 | print_peel18cv8_product_terms, |
| 1987 | 1985 | config_peel18cv8_pins, |
| 1988 | 1986 | NULL, |
| 1989 | 1987 | get_peel18cv8_pin_fuse_state}, |
| 1990 | 1988 | {"GAL18V10", 3540, |
| 1991 | gal18v10pinfuserows, ARRAY_LEN(gal18v10pinfuserows), | |
| 1992 | gal18v10pinfusecolumns, ARRAY_LEN(gal18v10pinfusecolumns), | |
| 1989 | gal18v10pinfuserows, ARRAY_LENGTH(gal18v10pinfuserows), | |
| 1990 | gal18v10pinfusecolumns, ARRAY_LENGTH(gal18v10pinfusecolumns), | |
| 1993 | 1991 | print_gal18v10_product_terms, |
| 1994 | 1992 | config_gal18v10_pins, |
| 1995 | 1993 | NULL, |
| 1996 | 1994 | NULL}, |
| 1997 | 1995 | {"PAL20L8", 2560, |
| 1998 | pal20l8pinfuserows, ARRAY_LEN(pal20l8pinfuserows), | |
| 1999 | pal20l8pinfusecolumns, ARRAY_LEN(pal20l8pinfusecolumns), | |
| 1996 | pal20l8pinfuserows, ARRAY_LENGTH(pal20l8pinfuserows), | |
| 1997 | pal20l8pinfusecolumns, ARRAY_LENGTH(pal20l8pinfusecolumns), | |
| 2000 | 1998 | print_pal20l8_product_terms, |
| 2001 | 1999 | config_pal20l8_pins, |
| 2002 | 2000 | NULL, |
| 2003 | 2001 | NULL}, |
| 2004 | 2002 | {"PAL20L10", 1600, |
| 2005 | pal20l10pinfuserows, ARRAY_LEN(pal20l10pinfuserows), | |
| 2006 | pal20l10pinfusecolumns, ARRAY_LEN(pal20l10pinfusecolumns), | |
| 2003 | pal20l10pinfuserows, ARRAY_LENGTH(pal20l10pinfuserows), | |
| 2004 | pal20l10pinfusecolumns, ARRAY_LENGTH(pal20l10pinfusecolumns), | |
| 2007 | 2005 | print_pal20l10_product_terms, |
| 2008 | 2006 | config_pal20l10_pins, |
| 2009 | 2007 | NULL, |
| 2010 | 2008 | NULL}, |
| 2011 | 2009 | {"PAL20R4", 2560, |
| 2012 | pal20r4pinfuserows, ARRAY_LEN(pal20r4pinfuserows), | |
| 2013 | pal20r4pinfusecolumns, ARRAY_LEN(pal20r4pinfusecolumns), | |
| 2010 | pal20r4pinfuserows, ARRAY_LENGTH(pal20r4pinfuserows), | |
| 2011 | pal20r4pinfusecolumns, ARRAY_LENGTH(pal20r4pinfusecolumns), | |
| 2014 | 2012 | print_pal20r4_product_terms, |
| 2015 | 2013 | config_pal20r4_pins, |
| 2016 | 2014 | NULL, |
| 2017 | 2015 | NULL}, |
| 2018 | 2016 | {"PAL20R6", 2560, |
| 2019 | pal20r6pinfuserows, ARRAY_LEN(pal20r6pinfuserows), | |
| 2020 | pal20r6pinfusecolumns, ARRAY_LEN(pal20r6pinfusecolumns), | |
| 2017 | pal20r6pinfuserows, ARRAY_LENGTH(pal20r6pinfuserows), | |
| 2018 | pal20r6pinfusecolumns, ARRAY_LENGTH(pal20r6pinfusecolumns), | |
| 2021 | 2019 | print_pal20r6_product_terms, |
| 2022 | 2020 | config_pal20r6_pins, |
| 2023 | 2021 | NULL, |
| 2024 | 2022 | NULL}, |
| 2025 | 2023 | {"PAL20R8", 2560, |
| 2026 | pal20r8pinfuserows, ARRAY_LEN(pal20r8pinfuserows), | |
| 2027 | pal20r8pinfusecolumns, ARRAY_LEN(pal20r8pinfusecolumns), | |
| 2024 | pal20r8pinfuserows, ARRAY_LENGTH(pal20r8pinfuserows), | |
| 2025 | pal20r8pinfusecolumns, ARRAY_LENGTH(pal20r8pinfusecolumns), | |
| 2028 | 2026 | print_pal20r8_product_terms, |
| 2029 | 2027 | config_pal20r8_pins, |
| 2030 | 2028 | NULL, |
| 2031 | 2029 | NULL}, |
| 2032 | 2030 | {"PAL20X4", 1600, |
| 2033 | pal20x4pinfuserows, ARRAY_LEN(pal20x4pinfuserows), | |
| 2034 | pal20x4pinfusecolumns, ARRAY_LEN(pal20x4pinfusecolumns), | |
| 2031 | pal20x4pinfuserows, ARRAY_LENGTH(pal20x4pinfuserows), | |
| 2032 | pal20x4pinfusecolumns, ARRAY_LENGTH(pal20x4pinfusecolumns), | |
| 2035 | 2033 | print_pal20x4_product_terms, |
| 2036 | 2034 | config_pal20x4_pins, |
| 2037 | 2035 | NULL, |
| 2038 | 2036 | NULL}, |
| 2039 | 2037 | {"PAL20X8", 1600, |
| 2040 | pal20x8pinfuserows, ARRAY_LEN(pal20x8pinfuserows), | |
| 2041 | pal20x8pinfusecolumns, ARRAY_LEN(pal20x8pinfusecolumns), | |
| 2038 | pal20x8pinfuserows, ARRAY_LENGTH(pal20x8pinfuserows), | |
| 2039 | pal20x8pinfusecolumns, ARRAY_LENGTH(pal20x8pinfusecolumns), | |
| 2042 | 2040 | print_pal20x8_product_terms, |
| 2043 | 2041 | config_pal20x8_pins, |
| 2044 | 2042 | NULL, |
| 2045 | 2043 | NULL}, |
| 2046 | 2044 | {"PAL20X10", 1600, |
| 2047 | pal20x10pinfuserows, ARRAY_LEN(pal20x10pinfuserows), | |
| 2048 | pal20x10pinfusecolumns, ARRAY_LEN(pal20x10pinfusecolumns), | |
| 2045 | pal20x10pinfuserows, ARRAY_LENGTH(pal20x10pinfuserows), | |
| 2046 | pal20x10pinfusecolumns, ARRAY_LENGTH(pal20x10pinfusecolumns), | |
| 2049 | 2047 | print_pal20x10_product_terms, |
| 2050 | 2048 | config_pal20x10_pins, |
| 2051 | 2049 | NULL, |
| r29305 | r29306 | |
| 2055 | 2053 | {"GAL22V10", 0, NULL, 0, NULL, 0, NULL, NULL, NULL, NULL}, |
| 2056 | 2054 | {"PLS100", 0, NULL, 0, NULL, 0, NULL, NULL, NULL, NULL},*/ |
| 2057 | 2055 | {"82S153", 1842, |
| 2058 | _82s153_pls153pinfuserows, ARRAY_LEN(_82s153_pls153pinfuserows), | |
| 2059 | _82s153_pls153pinfusecolumns, ARRAY_LEN(_82s153_pls153pinfusecolumns), | |
| 2056 | _82s153_pls153pinfuserows, ARRAY_LENGTH(_82s153_pls153pinfuserows), | |
| 2057 | _82s153_pls153pinfusecolumns, ARRAY_LENGTH(_82s153_pls153pinfusecolumns), | |
| 2060 | 2058 | print_82s153_pls153_product_terms, |
| 2061 | 2059 | config_82s153_pls153_pins, |
| 2062 | 2060 | NULL, |
| 2063 | 2061 | NULL}, |
| 2064 | 2062 | {"PLS153", 1842, |
| 2065 | _82s153_pls153pinfuserows, ARRAY_LEN(_82s153_pls153pinfuserows), | |
| 2066 | _82s153_pls153pinfusecolumns, ARRAY_LEN(_82s153_pls153pinfusecolumns), | |
| 2063 | _82s153_pls153pinfuserows, ARRAY_LENGTH(_82s153_pls153pinfuserows), | |
| 2064 | _82s153_pls153pinfusecolumns, ARRAY_LENGTH(_82s153_pls153pinfusecolumns), | |
| 2067 | 2065 | print_82s153_pls153_product_terms, |
| 2068 | 2066 | config_82s153_pls153_pins, |
| 2069 | 2067 | NULL, |
| 2070 | 2068 | NULL}, |
| 2071 | 2069 | {"CK2605", 1106, |
| 2072 | ck2605pinfuserows, ARRAY_LEN(ck2605pinfuserows), | |
| 2073 | ck2605pinfusecolumns, ARRAY_LEN(ck2605pinfusecolumns), | |
| 2070 | ck2605pinfuserows, ARRAY_LENGTH(ck2605pinfuserows), | |
| 2071 | ck2605pinfusecolumns, ARRAY_LENGTH(ck2605pinfusecolumns), | |
| 2074 | 2072 | print_ck2605_product_terms, |
| 2075 | 2073 | config_ck2605_pins, |
| 2076 | 2074 | NULL, |
| 2077 | 2075 | NULL}, |
| 2078 | 2076 | #if defined(ricoh_pals) |
| 2079 | 2077 | {"EPL10P8", 664, |
| 2080 | epl10p8pinfuserows, ARRAY_LEN(epl10p8pinfuserows), | |
| 2081 | epl10p8pinfusecolumns, ARRAY_LEN(epl10p8pinfusecolumns), | |
| 2078 | epl10p8pinfuserows, ARRAY_LENGTH(epl10p8pinfuserows), | |
| 2079 | epl10p8pinfusecolumns, ARRAY_LENGTH(epl10p8pinfusecolumns), | |
| 2082 | 2080 | print_epl10p8_product_terms, |
| 2083 | 2081 | config_epl10p8_pins, |
| 2084 | 2082 | NULL, |
| 2085 | 2083 | NULL}, |
| 2086 | 2084 | {"EPL12P6", 786, |
| 2087 | epl12p6pinfuserows, ARRAY_LEN(epl12p6pinfuserows), | |
| 2088 | epl12p6pinfusecolumns, ARRAY_LEN(epl12p6pinfusecolumns), | |
| 2085 | epl12p6pinfuserows, ARRAY_LENGTH(epl12p6pinfuserows), | |
| 2086 | epl12p6pinfusecolumns, ARRAY_LENGTH(epl12p6pinfusecolumns), | |
| 2089 | 2087 | print_epl12p6_product_terms, |
| 2090 | 2088 | config_epl12p6_pins, |
| 2091 | 2089 | NULL, |
| 2092 | 2090 | NULL}, |
| 2093 | 2091 | {"EPL14P4", 908, |
| 2094 | epl14p4pinfuserows, ARRAY_LEN(epl14p4pinfuserows), | |
| 2095 | epl14p4pinfusecolumns, ARRAY_LEN(epl14p4pinfusecolumns), | |
| 2092 | epl14p4pinfuserows, ARRAY_LENGTH(epl14p4pinfuserows), | |
| 2093 | epl14p4pinfusecolumns, ARRAY_LENGTH(epl14p4pinfusecolumns), | |
| 2096 | 2094 | print_epl14p4_product_terms, |
| 2097 | 2095 | config_epl14p4_pins, |
| 2098 | 2096 | NULL, |
| 2099 | 2097 | NULL}, |
| 2100 | 2098 | {"EPL16P2", 1030, |
| 2101 | epl16p2pinfuserows, ARRAY_LEN(epl16p2pinfuserows), | |
| 2102 | epl16p2pinfusecolumns, ARRAY_LEN(epl16p2pinfusecolumns), | |
| 2099 | epl16p2pinfuserows, ARRAY_LENGTH(epl16p2pinfuserows), | |
| 2100 | epl16p2pinfusecolumns, ARRAY_LENGTH(epl16p2pinfusecolumns), | |
| 2103 | 2101 | print_epl16p2_product_terms, |
| 2104 | 2102 | config_epl16p2_pins, |
| 2105 | 2103 | NULL, |
| 2106 | 2104 | NULL}, |
| 2107 | 2105 | {"EPL16P8", 2072, |
| 2108 | epl16p8pinfuserows, ARRAY_LEN(epl16p8pinfuserows), | |
| 2109 | epl16p8pinfusecolumns, ARRAY_LEN(epl16p8pinfusecolumns), | |
| 2106 | epl16p8pinfuserows, ARRAY_LENGTH(epl16p8pinfuserows), | |
| 2107 | epl16p8pinfusecolumns, ARRAY_LENGTH(epl16p8pinfusecolumns), | |
| 2110 | 2108 | print_epl16p8_product_terms, |
| 2111 | 2109 | config_epl16p8_pins, |
| 2112 | 2110 | NULL, |
| 2113 | 2111 | NULL}, |
| 2114 | 2112 | {"EPL16RP8", 2072, |
| 2115 | epl16rp8pinfuserows, ARRAY_LEN(epl16rp8pinfuserows), | |
| 2116 | epl16rp8pinfusecolumns, ARRAY_LEN(epl16rp8pinfusecolumns), | |
| 2113 | epl16rp8pinfuserows, ARRAY_LENGTH(epl16rp8pinfuserows), | |
| 2114 | epl16rp8pinfusecolumns, ARRAY_LENGTH(epl16rp8pinfusecolumns), | |
| 2117 | 2115 | print_epl16rp8_product_terms, |
| 2118 | 2116 | config_epl16rp8_pins, |
| 2119 | 2117 | NULL, |
| 2120 | 2118 | NULL}, |
| 2121 | 2119 | {"EPL16RP6", 2072, |
| 2122 | epl16rp6pinfuserows, ARRAY_LEN(epl16rp6pinfuserows), | |
| 2123 | epl16rp6pinfusecolumns, ARRAY_LEN(epl16rp6pinfusecolumns), | |
| 2120 | epl16rp6pinfuserows, ARRAY_LENGTH(epl16rp6pinfuserows), | |
| 2121 | epl16rp6pinfusecolumns, ARRAY_LENGTH(epl16rp6pinfusecolumns), | |
| 2124 | 2122 | print_epl16rp6_product_terms, |
| 2125 | 2123 | config_epl16rp6_pins, |
| 2126 | 2124 | NULL, |
| 2127 | 2125 | NULL}, |
| 2128 | 2126 | {"EPL16RP4", 2072, |
| 2129 | epl16rp4pinfuserows, ARRAY_LEN(epl16rp4pinfuserows), | |
| 2130 | epl16rp4pinfusecolumns, ARRAY_LEN(epl16rp4pinfusecolumns), | |
| 2127 | epl16rp4pinfuserows, ARRAY_LENGTH(epl16rp4pinfuserows), | |
| 2128 | epl16rp4pinfusecolumns, ARRAY_LENGTH(epl16rp4pinfusecolumns), | |
| 2131 | 2129 | print_epl16rp4_product_terms, |
| 2132 | 2130 | config_epl16rp4_pins, |
| 2133 | 2131 | NULL, |
| 2134 | 2132 | NULL}, |
| 2135 | 2133 | #endif |
| 2136 | 2134 | {"PAL10P8", 328, |
| 2137 | pal10p8pinfuserows, ARRAY_LEN(pal10p8pinfuserows), | |
| 2138 | pal10p8pinfusecolumns, ARRAY_LEN(pal10p8pinfusecolumns), | |
| 2135 | pal10p8pinfuserows, ARRAY_LENGTH(pal10p8pinfuserows), | |
| 2136 | pal10p8pinfusecolumns, ARRAY_LENGTH(pal10p8pinfusecolumns), | |
| 2139 | 2137 | print_pal10p8_product_terms, |
| 2140 | 2138 | config_pal10p8_pins, |
| 2141 | 2139 | NULL, |
| 2142 | 2140 | NULL}, |
| 2143 | 2141 | {"PAL12P6", 390, |
| 2144 | pal12p6pinfuserows, ARRAY_LEN(pal12p6pinfuserows), | |
| 2145 | pal12p6pinfusecolumns, ARRAY_LEN(pal12p6pinfusecolumns), | |
| 2142 | pal12p6pinfuserows, ARRAY_LENGTH(pal12p6pinfuserows), | |
| 2143 | pal12p6pinfusecolumns, ARRAY_LENGTH(pal12p6pinfusecolumns), | |
| 2146 | 2144 | print_pal12p6_product_terms, |
| 2147 | 2145 | config_pal12p6_pins, |
| 2148 | 2146 | NULL, |
| 2149 | 2147 | NULL}, |
| 2150 | 2148 | {"PAL14P4", 452, |
| 2151 | pal14p4pinfuserows, ARRAY_LEN(pal14p4pinfuserows), | |
| 2152 | pal14p4pinfusecolumns, ARRAY_LEN(pal14p4pinfusecolumns), | |
| 2149 | pal14p4pinfuserows, ARRAY_LENGTH(pal14p4pinfuserows), | |
| 2150 | pal14p4pinfusecolumns, ARRAY_LENGTH(pal14p4pinfusecolumns), | |
| 2153 | 2151 | print_pal14p4_product_terms, |
| 2154 | 2152 | config_pal14p4_pins, |
| 2155 | 2153 | NULL, |
| 2156 | 2154 | NULL}, |
| 2157 | 2155 | {"PAL16P2", 514, |
| 2158 | pal16p2pinfuserows, ARRAY_LEN(pal16p2pinfuserows), | |
| 2159 | pal16p2pinfusecolumns, ARRAY_LEN(pal16p2pinfusecolumns), | |
| 2156 | pal16p2pinfuserows, ARRAY_LENGTH(pal16p2pinfuserows), | |
| 2157 | pal16p2pinfusecolumns, ARRAY_LENGTH(pal16p2pinfusecolumns), | |
| 2160 | 2158 | print_pal16p2_product_terms, |
| 2161 | 2159 | config_pal16p2_pins, |
| 2162 | 2160 | NULL, |
| 2163 | 2161 | NULL}, |
| 2164 | 2162 | {"PAL16P8", 2056, |
| 2165 | pal16p8pinfuserows, ARRAY_LEN(pal16p8pinfuserows), | |
| 2166 | pal16p8pinfusecolumns, ARRAY_LEN(pal16p8pinfusecolumns), | |
| 2163 | pal16p8pinfuserows, ARRAY_LENGTH(pal16p8pinfuserows), | |
| 2164 | pal16p8pinfusecolumns, ARRAY_LENGTH(pal16p8pinfusecolumns), | |
| 2167 | 2165 | print_pal16p8_product_terms, |
| 2168 | 2166 | config_pal16p8_pins, |
| 2169 | 2167 | NULL, |
| 2170 | 2168 | NULL}, |
| 2171 | 2169 | {"PAL16RP4", 2056, |
| 2172 | pal16rp4pinfuserows, ARRAY_LEN(pal16rp4pinfuserows), | |
| 2173 | pal16rp4pinfusecolumns, ARRAY_LEN(pal16rp4pinfusecolumns), | |
| 2170 | pal16rp4pinfuserows, ARRAY_LENGTH(pal16rp4pinfuserows), | |
| 2171 | pal16rp4pinfusecolumns, ARRAY_LENGTH(pal16rp4pinfusecolumns), | |
| 2174 | 2172 | print_pal16rp4_product_terms, |
| 2175 | 2173 | config_pal16rp4_pins, |
| 2176 | 2174 | NULL, |
| 2177 | 2175 | NULL}, |
| 2178 | 2176 | {"PAL16RP6", 2056, |
| 2179 | pal16rp6pinfuserows, ARRAY_LEN(pal16rp6pinfuserows), | |
| 2180 | pal16rp6pinfusecolumns, ARRAY_LEN(pal16rp6pinfusecolumns), | |
| 2177 | pal16rp6pinfuserows, ARRAY_LENGTH(pal16rp6pinfuserows), | |
| 2178 | pal16rp6pinfusecolumns, ARRAY_LENGTH(pal16rp6pinfusecolumns), | |
| 2181 | 2179 | print_pal16rp6_product_terms, |
| 2182 | 2180 | config_pal16rp6_pins, |
| 2183 | 2181 | NULL, |
| 2184 | 2182 | NULL}, |
| 2185 | 2183 | {"PAL16RP8", 2056, |
| 2186 | pal16rp8pinfuserows, ARRAY_LEN(pal16rp8pinfuserows), | |
| 2187 | pal16rp8pinfusecolumns, ARRAY_LEN(pal16rp8pinfusecolumns), | |
| 2184 | pal16rp8pinfuserows, ARRAY_LENGTH(pal16rp8pinfuserows), | |
| 2185 | pal16rp8pinfusecolumns, ARRAY_LENGTH(pal16rp8pinfusecolumns), | |
| 2188 | 2186 | print_pal16rp8_product_terms, |
| 2189 | 2187 | config_pal16rp8_pins, |
| 2190 | 2188 | NULL, |
| 2191 | 2189 | NULL}, |
| 2192 | 2190 | {"PAL6L16", 192, |
| 2193 | pal6l16pinfuserows, ARRAY_LEN(pal6l16pinfuserows), | |
| 2194 | pal6l16pinfusecolumns, ARRAY_LEN(pal6l16pinfusecolumns), | |
| 2191 | pal6l16pinfuserows, ARRAY_LENGTH(pal6l16pinfuserows), | |
| 2192 | pal6l16pinfusecolumns, ARRAY_LENGTH(pal6l16pinfusecolumns), | |
| 2195 | 2193 | print_pal6l16_product_terms, |
| 2196 | 2194 | config_pal6l16_pins, |
| 2197 | 2195 | NULL, |
| 2198 | 2196 | NULL}, |
| 2199 | 2197 | {"PAL8L14", 224, |
| 2200 | pal8l14pinfuserows, ARRAY_LEN(pal8l14pinfuserows), | |
| 2201 | pal8l14pinfusecolumns, ARRAY_LEN(pal8l14pinfusecolumns), | |
| 2198 | pal8l14pinfuserows, ARRAY_LENGTH(pal8l14pinfuserows), | |
| 2199 | pal8l14pinfusecolumns, ARRAY_LENGTH(pal8l14pinfusecolumns), | |
| 2202 | 2200 | print_pal8l14_product_terms, |
| 2203 | 2201 | config_pal8l14_pins, |
| 2204 | 2202 | NULL, |
| 2205 | 2203 | NULL}, |
| 2206 | 2204 | {"PAL12H10", 480, |
| 2207 | pal12h10pinfuserows, ARRAY_LEN(pal12h10pinfuserows), | |
| 2208 | pal12h10pinfusecolumns, ARRAY_LEN(pal12h10pinfusecolumns), | |
| 2205 | pal12h10pinfuserows, ARRAY_LENGTH(pal12h10pinfuserows), | |
| 2206 | pal12h10pinfusecolumns, ARRAY_LENGTH(pal12h10pinfusecolumns), | |
| 2209 | 2207 | print_pal12h10_product_terms, |
| 2210 | 2208 | config_pal12h10_pins, |
| 2211 | 2209 | NULL, |
| 2212 | 2210 | NULL}, |
| 2213 | 2211 | {"PAL12L10", 480, |
| 2214 | pal12l10pinfuserows, ARRAY_LEN(pal12l10pinfuserows), | |
| 2215 | pal12l10pinfusecolumns, ARRAY_LEN(pal12l10pinfusecolumns), | |
| 2212 | pal12l10pinfuserows, ARRAY_LENGTH(pal12l10pinfuserows), | |
| 2213 | pal12l10pinfusecolumns, ARRAY_LENGTH(pal12l10pinfusecolumns), | |
| 2216 | 2214 | print_pal12l10_product_terms, |
| 2217 | 2215 | config_pal12l10_pins, |
| 2218 | 2216 | NULL, |
| 2219 | 2217 | NULL}, |
| 2220 | 2218 | {"PAL14H8", 560, |
| 2221 | pal14h8pinfuserows, ARRAY_LEN(pal14h8pinfuserows), | |
| 2222 | pal14h8pinfusecolumns, ARRAY_LEN(pal14h8pinfusecolumns), | |
| 2219 | pal14h8pinfuserows, ARRAY_LENGTH(pal14h8pinfuserows), | |
| 2220 | pal14h8pinfusecolumns, ARRAY_LENGTH(pal14h8pinfusecolumns), | |
| 2223 | 2221 | print_pal14h8_product_terms, |
| 2224 | 2222 | config_pal14h8_pins, |
| 2225 | 2223 | NULL, |
| 2226 | 2224 | NULL}, |
| 2227 | 2225 | {"PAL14L8", 560, |
| 2228 | pal14l8pinfuserows, ARRAY_LEN(pal14l8pinfuserows), | |
| 2229 | pal14l8pinfusecolumns, ARRAY_LEN(pal14l8pinfusecolumns), | |
| 2226 | pal14l8pinfuserows, ARRAY_LENGTH(pal14l8pinfuserows), | |
| 2227 | pal14l8pinfusecolumns, ARRAY_LENGTH(pal14l8pinfusecolumns), | |
| 2230 | 2228 | print_pal14l8_product_terms, |
| 2231 | 2229 | config_pal14l8_pins, |
| 2232 | 2230 | NULL, |
| 2233 | 2231 | NULL}, |
| 2234 | 2232 | {"PAL16H6", 640, |
| 2235 | pal16h6pinfuserows, ARRAY_LEN(pal16h6pinfuserows), | |
| 2236 | pal16h6pinfusecolumns, ARRAY_LEN(pal16h6pinfusecolumns), | |
| 2233 | pal16h6pinfuserows, ARRAY_LENGTH(pal16h6pinfuserows), | |
| 2234 | pal16h6pinfusecolumns, ARRAY_LENGTH(pal16h6pinfusecolumns), | |
| 2237 | 2235 | print_pal16h6_product_terms, |
| 2238 | 2236 | config_pal16h6_pins, |
| 2239 | 2237 | NULL, |
| 2240 | 2238 | NULL}, |
| 2241 | 2239 | {"PAL16L6", 640, |
| 2242 | pal16l6pinfuserows, ARRAY_LEN(pal16l6pinfuserows), | |
| 2243 | pal16l6pinfusecolumns, ARRAY_LEN(pal16l6pinfusecolumns), | |
| 2240 | pal16l6pinfuserows, ARRAY_LENGTH(pal16l6pinfuserows), | |
| 2241 | pal16l6pinfusecolumns, ARRAY_LENGTH(pal16l6pinfusecolumns), | |
| 2244 | 2242 | print_pal16l6_product_terms, |
| 2245 | 2243 | config_pal16l6_pins, |
| 2246 | 2244 | NULL, |
| 2247 | 2245 | NULL}, |
| 2248 | 2246 | {"PAL18H4", 720, |
| 2249 | pal18h4pinfuserows, ARRAY_LEN(pal18h4pinfuserows), | |
| 2250 | pal18h4pinfusecolumns, ARRAY_LEN(pal18h4pinfusecolumns), | |
| 2247 | pal18h4pinfuserows, ARRAY_LENGTH(pal18h4pinfuserows), | |
| 2248 | pal18h4pinfusecolumns, ARRAY_LENGTH(pal18h4pinfusecolumns), | |
| 2251 | 2249 | print_pal18h4_product_terms, |
| 2252 | 2250 | config_pal18h4_pins, |
| 2253 | 2251 | NULL, |
| 2254 | 2252 | NULL}, |
| 2255 | 2253 | {"PAL18L4", 720, |
| 2256 | pal18l4pinfuserows, ARRAY_LEN(pal18l4pinfuserows), | |
| 2257 | pal18l4pinfusecolumns, ARRAY_LEN(pal18l4pinfusecolumns), | |
| 2254 | pal18l4pinfuserows, ARRAY_LENGTH(pal18l4pinfuserows), | |
| 2255 | pal18l4pinfusecolumns, ARRAY_LENGTH(pal18l4pinfusecolumns), | |
| 2258 | 2256 | print_pal18l4_product_terms, |
| 2259 | 2257 | config_pal18l4_pins, |
| 2260 | 2258 | NULL, |
| 2261 | 2259 | NULL}, |
| 2262 | 2260 | {"PAL20C1", 640, |
| 2263 | pal20c1pinfuserows, ARRAY_LEN(pal20c1pinfuserows), | |
| 2264 | pal20c1pinfusecolumns, ARRAY_LEN(pal20c1pinfusecolumns), | |
| 2261 | pal20c1pinfuserows, ARRAY_LENGTH(pal20c1pinfuserows), | |
| 2262 | pal20c1pinfusecolumns, ARRAY_LENGTH(pal20c1pinfusecolumns), | |
| 2265 | 2263 | print_pal20c1_product_terms, |
| 2266 | 2264 | config_pal20c1_pins, |
| 2267 | 2265 | NULL, |
| 2268 | 2266 | NULL}, |
| 2269 | 2267 | {"PAL20L2", 640, |
| 2270 | pal20l2pinfuserows, ARRAY_LEN(pal20l2pinfuserows), | |
| 2271 | pal20l2pinfusecolumns, ARRAY_LEN(pal20l2pinfusecolumns), | |
| 2268 | pal20l2pinfuserows, ARRAY_LENGTH(pal20l2pinfuserows), | |
| 2269 | pal20l2pinfusecolumns, ARRAY_LENGTH(pal20l2pinfusecolumns), | |
| 2272 | 2270 | print_pal20l2_product_terms, |
| 2273 | 2271 | config_pal20l2_pins, |
| 2274 | 2272 | NULL, |
| r29305 | r29306 | |
| 2327 | 2325 | { |
| 2328 | 2326 | int index; |
| 2329 | 2327 | |
| 2330 | for (index = 0; index < ARRAY_LEN(paldata); ++index) | |
| 2328 | for (index = 0; index < ARRAY_LENGTH(paldata); ++index) | |
| 2331 | 2329 | { |
| 2332 | 2330 | if (!core_stricmp(name, paldata[index].name)) |
| 2333 | 2331 | { |
| r29305 | r29306 | |
| 2987 | 2985 | {19, 0, 32, 224}}; |
| 2988 | 2986 | UINT16 index; |
| 2989 | 2987 | |
| 2990 | for (index = 0; index < ARRAY_LEN(pinfuserows); ++index) | |
| 2988 | for (index = 0; index < ARRAY_LENGTH(pinfuserows); ++index) | |
| 2991 | 2989 | { |
| 2992 | 2990 | if (pinfuserows[index].pin == pin) |
| 2993 | 2991 | { |
| r29305 | r29306 | |
| 3021 | 3019 | {19, NO_OUTPUT_ENABLE_FUSE_ROW, 0, 224}}; |
| 3022 | 3020 | UINT16 index; |
| 3023 | 3021 | |
| 3024 | for (index = 0; index < ARRAY_LEN(pinfuserows); ++index) | |
| 3022 | for (index = 0; index < ARRAY_LENGTH(pinfuserows); ++index) | |
| 3025 | 3023 | { |
| 3026 | 3024 | if (pinfuserows[index].pin == pin) |
| 3027 | 3025 | { |
| r29305 | r29306 | |
| 3787 | 3785 | |
| 3788 | 3786 | printf("Equations:\n\n"); |
| 3789 | 3787 | |
| 3790 | for (index = 0; index < ARRAY_LEN(memory_cells); ++index) | |
| 3788 | for (index = 0; index < ARRAY_LENGTH(memory_cells); ++index) | |
| 3791 | 3789 | { |
| 3792 | 3790 | flags = outputpins[index].flags; |
| 3793 | 3791 | |
| r29305 | r29306 | |
| 4246 | 4244 | {18, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE}, |
| 4247 | 4245 | {19, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE}}; |
| 4248 | 4246 | |
| 4249 | set_input_pins(input_pins, ARRAY_LEN(input_pins)); | |
| 4250 | set_output_pins(output_pins, ARRAY_LEN(output_pins)); | |
| 4247 | set_input_pins(input_pins, ARRAY_LENGTH(input_pins)); | |
| 4248 | set_output_pins(output_pins, ARRAY_LENGTH(output_pins)); | |
| 4251 | 4249 | } |
| 4252 | 4250 | |
| 4253 | 4251 | |
| r29305 | r29306 | |
| 4270 | 4268 | {18, OUTPUT_ACTIVEHIGH | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE}, |
| 4271 | 4269 | {19, OUTPUT_ACTIVEHIGH | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE}}; |
| 4272 | 4270 | |
| 4273 | set_input_pins(input_pins, ARRAY_LEN(input_pins)); | |
| 4274 | set_output_pins(output_pins, ARRAY_LEN(output_pins)); | |
| 4271 | set_input_pins(input_pins, ARRAY_LENGTH(input_pins)); | |
| 4272 | set_output_pins(output_pins, ARRAY_LENGTH(output_pins)); | |
| 4275 | 4273 | } |
| 4276 | 4274 | |
| 4277 | 4275 | |
| r29305 | r29306 | |
| 4292 | 4290 | {17, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE}, |
| 4293 | 4291 | {18, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE}}; |
| 4294 | 4292 | |
| 4295 | set_input_pins(input_pins, ARRAY_LEN(input_pins)); | |
| 4296 | set_output_pins(output_pins, ARRAY_LEN(output_pins)); | |
| 4293 | set_input_pins(input_pins, ARRAY_LENGTH(input_pins)); | |
| 4294 | set_output_pins(output_pins, ARRAY_LENGTH(output_pins)); | |
| 4297 | 4295 | } |
| 4298 | 4296 | |
| 4299 | 4297 | |
| r29305 | r29306 | |
| 4314 | 4312 | {17, OUTPUT_ACTIVEHIGH | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE}, |
| 4315 | 4313 | {18, OUTPUT_ACTIVEHIGH | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE}}; |
| 4316 | 4314 | |
| 4317 | set_input_pins(input_pins, ARRAY_LEN(input_pins)); | |
| 4318 | set_output_pins(output_pins, ARRAY_LEN(output_pins)); | |
| 4315 | set_input_pins(input_pins, ARRAY_LENGTH(input_pins)); | |
| 4316 | set_output_pins(output_pins, ARRAY_LENGTH(output_pins)); | |
| 4319 | 4317 | } |
| 4320 | 4318 | |
| 4321 | 4319 | |
| r29305 | r29306 | |
| 4334 | 4332 | {16, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE}, |
| 4335 | 4333 | {17, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE}}; |
| 4336 | 4334 | |
| 4337 | set_input_pins(input_pins, ARRAY_LEN(input_pins)); | |
| 4338 | set_output_pins(output_pins, ARRAY_LEN(output_pins)); | |
| 4335 | set_input_pins(input_pins, ARRAY_LENGTH(input_pins)); | |
| 4336 | set_output_pins(output_pins, ARRAY_LENGTH(output_pins)); | |
| 4339 | 4337 | } |
| 4340 | 4338 | |
| 4341 | 4339 | |
| r29305 | r29306 | |
| 4354 | 4352 | {16, OUTPUT_ACTIVEHIGH | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE}, |
| 4355 | 4353 | {17, OUTPUT_ACTIVEHIGH | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE}}; |
| 4356 | 4354 | |
| 4357 | set_input_pins(input_pins, ARRAY_LEN(input_pins)); | |
| 4358 | set_output_pins(output_pins, ARRAY_LEN(output_pins)); | |
| 4355 | set_input_pins(input_pins, ARRAY_LENGTH(input_pins)); | |
| 4356 | set_output_pins(output_pins, ARRAY_LENGTH(output_pins)); | |
| 4359 | 4357 | } |
| 4360 | 4358 | |
| 4361 | 4359 | |
| r29305 | r29306 | |
| 4372 | 4370 | {15, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE}, |
| 4373 | 4371 | {16, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE}}; |
| 4374 | 4372 | |
| 4375 | set_input_pins(input_pins, ARRAY_LEN(input_pins)); | |
| 4376 | set_output_pins(output_pins, ARRAY_LEN(output_pins)); | |
| 4373 | set_input_pins(input_pins, ARRAY_LENGTH(input_pins)); | |
| 4374 | set_output_pins(output_pins, ARRAY_LENGTH(output_pins)); | |
| 4377 | 4375 | } |
| 4378 | 4376 | |
| 4379 | 4377 | |
| r29305 | r29306 | |
| 4390 | 4388 | {15, OUTPUT_ACTIVEHIGH | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE}, |
| 4391 | 4389 | {16, OUTPUT_ACTIVEHIGH | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE}}; |
| 4392 | 4390 | |
| 4393 | set_input_pins(input_pins, ARRAY_LEN(input_pins)); | |
| 4394 | set_output_pins(output_pins, ARRAY_LEN(output_pins)); | |
| 4391 | set_input_pins(input_pins, ARRAY_LENGTH(input_pins)); | |
| 4392 | set_output_pins(output_pins, ARRAY_LENGTH(output_pins)); | |
| 4395 | 4393 | } |
| 4396 | 4394 | |
| 4397 | 4395 | |
| r29305 | r29306 | |
| 4408 | 4406 | {15, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE}, |
| 4409 | 4407 | {16, OUTPUT_ACTIVEHIGH | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE}}; |
| 4410 | 4408 | |
| 4411 | set_input_pins(input_pins, ARRAY_LEN(input_pins)); | |
| 4412 | set_output_pins(output_pins, ARRAY_LEN(output_pins)); | |
| 4409 | set_input_pins(input_pins, ARRAY_LENGTH(input_pins)); | |
| 4410 | set_output_pins(output_pins, ARRAY_LENGTH(output_pins)); | |
| 4413 | 4411 | } |
| 4414 | 4412 | |
| 4415 | 4413 | |
| r29305 | r29306 | |
| 4438 | 4436 | } |
| 4439 | 4437 | } |
| 4440 | 4438 | |
| 4441 | set_input_pins(input_pins, ARRAY_LEN(input_pins)); | |
| 4439 | set_input_pins(input_pins, ARRAY_LENGTH(input_pins)); | |
| 4442 | 4440 | set_output_pins(output_pins, output_pin_count); |
| 4443 | 4441 | } |
| 4444 | 4442 | |
| r29305 | r29306 | |
| 4474 | 4472 | ++output_pin_count; |
| 4475 | 4473 | } |
| 4476 | 4474 | |
| 4477 | for (index = 0; index < ARRAY_LEN(registered_pins); ++index) | |
| 4475 | for (index = 0; index < ARRAY_LENGTH(registered_pins); ++index) | |
| 4478 | 4476 | { |
| 4479 | 4477 | output_pins[output_pin_count].pin = registered_pins[index]; |
| 4480 | 4478 | output_pins[output_pin_count].flags = OUTPUT_ACTIVELOW | OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED; |
| r29305 | r29306 | |
| 4498 | 4496 | ++output_pin_count; |
| 4499 | 4497 | } |
| 4500 | 4498 | |
| 4501 | set_input_pins(input_pins, ARRAY_LEN(input_pins)); | |
| 4499 | set_input_pins(input_pins, ARRAY_LENGTH(input_pins)); | |
| 4502 | 4500 | set_output_pins(output_pins, output_pin_count); |
| 4503 | 4501 | } |
| 4504 | 4502 | |
| r29305 | r29306 | |
| 4526 | 4524 | ++output_pin_count; |
| 4527 | 4525 | } |
| 4528 | 4526 | |
| 4529 | for (index = 0; index < ARRAY_LEN(registered_pins); ++index) | |
| 4527 | for (index = 0; index < ARRAY_LENGTH(registered_pins); ++index) | |
| 4530 | 4528 | { |
| 4531 | 4529 | output_pins[output_pin_count].pin = registered_pins[index]; |
| 4532 | 4530 | output_pins[output_pin_count].flags = OUTPUT_ACTIVELOW | OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED; |
| r29305 | r29306 | |
| 4542 | 4540 | ++output_pin_count; |
| 4543 | 4541 | } |
| 4544 | 4542 | |
| 4545 | set_input_pins(input_pins, ARRAY_LEN(input_pins)); | |
| 4543 | set_input_pins(input_pins, ARRAY_LENGTH(input_pins)); | |
| 4546 | 4544 | set_output_pins(output_pins, output_pin_count); |
| 4547 | 4545 | } |
| 4548 | 4546 | |
| r29305 | r29306 | |
| 4566 | 4564 | {18, OUTPUT_ACTIVELOW | OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED}, |
| 4567 | 4565 | {19, OUTPUT_ACTIVELOW | OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED}}; |
| 4568 | 4566 | |
| 4569 | set_input_pins(input_pins, ARRAY_LEN(input_pins)); | |
| 4570 | set_output_pins(output_pins, ARRAY_LEN(output_pins)); | |
| 4567 | set_input_pins(input_pins, ARRAY_LENGTH(input_pins)); | |
| 4568 | set_output_pins(output_pins, ARRAY_LENGTH(output_pins)); | |
| 4571 | 4569 | } |
| 4572 | 4570 | |
| 4573 | 4571 | |
| r29305 | r29306 | |
| 4654 | 4652 | static UINT16 sg0 = 2192; |
| 4655 | 4653 | static UINT16 sg1 = 2193; |
| 4656 | 4654 | UINT16 input_pins[18]; |
| 4657 | pin_output_config output_pins[ARRAY_LEN(macrocells)]; | |
| 4655 | pin_output_config output_pins[ARRAY_LENGTH(macrocells)]; | |
| 4658 | 4656 | UINT16 index, input_pin_count, output_pin_count; |
| 4659 | 4657 | |
| 4660 | 4658 | input_pin_count = 0; |
| r29305 | r29306 | |
| 4670 | 4668 | |
| 4671 | 4669 | memcpy(input_pins, input_pins_regs, sizeof(input_pins_regs)); |
| 4672 | 4670 | |
| 4673 | input_pin_count = ARRAY_LEN(input_pins_regs); | |
| 4671 | input_pin_count = ARRAY_LENGTH(input_pins_regs); | |
| 4674 | 4672 | |
| 4675 | for (index = 0; index < ARRAY_LEN(macrocells); ++index) | |
| 4673 | for (index = 0; index < ARRAY_LENGTH(macrocells); ++index) | |
| 4676 | 4674 | { |
| 4677 | 4675 | if (!jed_get_fuse(jed, macrocells[index].sl0_fuse)) |
| 4678 | 4676 | { |
| r29305 | r29306 | |
| 4744 | 4742 | |
| 4745 | 4743 | memcpy(input_pins, input_pins_io, sizeof(input_pins_io)); |
| 4746 | 4744 | |
| 4747 | input_pin_count = ARRAY_LEN(input_pins_io); | |
| 4745 | input_pin_count = ARRAY_LENGTH(input_pins_io); | |
| 4748 | 4746 | |
| 4749 | for (index = 0; index < ARRAY_LEN(macrocells); ++index) | |
| 4747 | for (index = 0; index < ARRAY_LENGTH(macrocells); ++index) | |
| 4750 | 4748 | { |
| 4751 | 4749 | if (does_output_enable_fuse_row_allow_output(pal, jed, macrocells[index].fuserowoutputenable)) |
| 4752 | 4750 | { |
| r29305 | r29306 | |
| 4785 | 4783 | |
| 4786 | 4784 | memcpy(input_pins, input_pins_i_or_o, sizeof(input_pins_i_or_o)); |
| 4787 | 4785 | |
| 4788 | input_pin_count = ARRAY_LEN(input_pins_i_or_o); | |
| 4786 | input_pin_count = ARRAY_LENGTH(input_pins_i_or_o); | |
| 4789 | 4787 | |
| 4790 | for (index = 0; index < ARRAY_LEN(macrocells); ++index) | |
| 4788 | for (index = 0; index < ARRAY_LENGTH(macrocells); ++index) | |
| 4791 | 4789 | { |
| 4792 | 4790 | if (!jed_get_fuse(jed, macrocells[index].sl0_fuse)) |
| 4793 | 4791 | { |
| r29305 | r29306 | |
| 4934 | 4932 | static UINT16 input_pins_registered[] = {2, 3, 4, 5, 6, 7, 8, 9, 12, 13, 14, 15, 16, 17, 18, 19}; |
| 4935 | 4933 | static UINT16 input_pins_combinatorialcomplex[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 13, 14, 15, 16, 17, 18}; |
| 4936 | 4934 | static UINT16 input_pins_combinatorialsimple[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 17, 18, 19}; |
| 4937 | pin_output_config output_pins[ARRAY_LEN(macrocells)]; | |
| 4935 | pin_output_config output_pins[ARRAY_LENGTH(macrocells)]; | |
| 4938 | 4936 | UINT16 index, output_pin_count; |
| 4939 | 4937 | |
| 4940 | 4938 | output_pin_count = 0; |
| r29305 | r29306 | |
| 4950 | 4948 | { |
| 4951 | 4949 | /* Complex Mode */ |
| 4952 | 4950 | |
| 4953 | set_input_pins(input_pins_combinatorialcomplex, ARRAY_LEN(input_pins_combinatorialcomplex)); | |
| 4951 | set_input_pins(input_pins_combinatorialcomplex, ARRAY_LENGTH(input_pins_combinatorialcomplex)); | |
| 4954 | 4952 | |
| 4955 | 4953 | memcpy(gal16v8pinfuserows, pinfuserows_combinatorial, sizeof(pinfuserows_combinatorial)); |
| 4956 | 4954 | memcpy(gal16v8pinfusecolumns, pinfusecolumns_combinatorialcomplex, sizeof(pinfusecolumns_combinatorialcomplex)); |
| 4957 | 4955 | |
| 4958 | for (index = 0; index < ARRAY_LEN(macrocells); ++index) | |
| 4956 | for (index = 0; index < ARRAY_LENGTH(macrocells); ++index) | |
| 4959 | 4957 | { |
| 4960 | 4958 | if (is_gal16v8_product_term_enabled(pal, jed, pal->pinfuserows[index].fuserowoutputenable) && |
| 4961 | 4959 | does_output_enable_fuse_row_allow_output(pal, jed, pal->pinfuserows[index].fuserowoutputenable)) |
| r29305 | r29306 | |
| 4990 | 4988 | { |
| 4991 | 4989 | /* Simple Mode */ |
| 4992 | 4990 | |
| 4993 | set_input_pins(input_pins_combinatorialsimple, ARRAY_LEN(input_pins_combinatorialsimple)); | |
| 4991 | set_input_pins(input_pins_combinatorialsimple, ARRAY_LENGTH(input_pins_combinatorialsimple)); | |
| 4994 | 4992 | |
| 4995 | 4993 | memcpy(gal16v8pinfuserows, pinfuserows_registered, sizeof(pinfuserows_registered)); |
| 4996 | 4994 | memcpy(gal16v8pinfusecolumns, pinfusecolumns_combinatorialsimple, sizeof(pinfusecolumns_combinatorialsimple)); |
| 4997 | 4995 | |
| 4998 | for (index = 0; index < ARRAY_LEN(macrocells); ++index) | |
| 4996 | for (index = 0; index < ARRAY_LENGTH(macrocells); ++index) | |
| 4999 | 4997 | { |
| 5000 | 4998 | if (jed_get_fuse(jed, macrocells[index].ac1_fuse)) |
| 5001 | 4999 | { |
| r29305 | r29306 | |
| 5040 | 5038 | { |
| 5041 | 5039 | /* Registered */ |
| 5042 | 5040 | |
| 5043 | set_input_pins(input_pins_registered, ARRAY_LEN(input_pins_registered)); | |
| 5041 | set_input_pins(input_pins_registered, ARRAY_LENGTH(input_pins_registered)); | |
| 5044 | 5042 | |
| 5045 | 5043 | memcpy(gal16v8pinfusecolumns, pinfusecolumns_registered, sizeof(pinfusecolumns_registered)); |
| 5046 | 5044 | |
| 5047 | for (index = 0; index < ARRAY_LEN(macrocells); ++index) | |
| 5045 | for (index = 0; index < ARRAY_LENGTH(macrocells); ++index) | |
| 5048 | 5046 | { |
| 5049 | 5047 | if (jed_get_fuse(jed, macrocells[index].ac1_fuse)) |
| 5050 | 5048 | { |
| r29305 | r29306 | |
| 5129 | 5127 | {18, 2668, 2669, 2670, 2671}, |
| 5130 | 5128 | {19, 2664, 2665, 2666, 2667}}; |
| 5131 | 5129 | static UINT16 input_pins[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19}; |
| 5132 | pin_output_config output_pins[ARRAY_LEN(macrocells)]; | |
| 5130 | pin_output_config output_pins[ARRAY_LENGTH(macrocells)]; | |
| 5133 | 5131 | UINT16 index, output_pin_count; |
| 5134 | 5132 | |
| 5135 | set_input_pins(input_pins, ARRAY_LEN(input_pins)); | |
| 5133 | set_input_pins(input_pins, ARRAY_LENGTH(input_pins)); | |
| 5136 | 5134 | |
| 5137 | 5135 | output_pin_count = 0; |
| 5138 | 5136 | |
| 5139 | for (index = 0; index < ARRAY_LEN(macrocells); ++index) | |
| 5137 | for (index = 0; index < ARRAY_LENGTH(macrocells); ++index) | |
| 5140 | 5138 | { |
| 5141 | 5139 | if (jed_get_fuse(jed, macrocells[index].feedback1_fuse) && |
| 5142 | 5140 | !jed_get_fuse(jed, macrocells[index].feedback2_fuse)) |
| r29305 | r29306 | |
| 5267 | 5265 | {18, 3458, 3459}, |
| 5268 | 5266 | {19, 3456, 3457}}; |
| 5269 | 5267 | static UINT16 input_pins[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19}; |
| 5270 | pin_output_config output_pins[ARRAY_LEN(macrocells)]; | |
| 5268 | pin_output_config output_pins[ARRAY_LENGTH(macrocells)]; | |
| 5271 | 5269 | UINT16 index, output_pin_count; |
| 5272 | 5270 | |
| 5273 | 5271 | output_pin_count = 0; |
| 5274 | 5272 | |
| 5275 | for (index = 0; index < ARRAY_LEN(output_pins); ++index) | |
| 5273 | for (index = 0; index < ARRAY_LENGTH(output_pins); ++index) | |
| 5276 | 5274 | { |
| 5277 | 5275 | if (jed_get_fuse(jed, macrocells[index].s1_fuse)) |
| 5278 | 5276 | { |
| r29305 | r29306 | |
| 5315 | 5313 | } |
| 5316 | 5314 | } |
| 5317 | 5315 | |
| 5318 | set_input_pins(input_pins, ARRAY_LEN(input_pins)); | |
| 5316 | set_input_pins(input_pins, ARRAY_LENGTH(input_pins)); | |
| 5319 | 5317 | set_output_pins(output_pins, output_pin_count); |
| 5320 | 5318 | } |
| 5321 | 5319 | |
| r29305 | r29306 | |
| 5355 | 5353 | } |
| 5356 | 5354 | } |
| 5357 | 5355 | |
| 5358 | set_input_pins(input_pins, ARRAY_LEN(input_pins)); | |
| 5356 | set_input_pins(input_pins, ARRAY_LENGTH(input_pins)); | |
| 5359 | 5357 | set_output_pins(output_pins, output_pin_count); |
| 5360 | 5358 | } |
| 5361 | 5359 | |
| r29305 | r29306 | |
| 5395 | 5393 | } |
| 5396 | 5394 | } |
| 5397 | 5395 | |
| 5398 | set_input_pins(input_pins, ARRAY_LEN(input_pins)); | |
| 5396 | set_input_pins(input_pins, ARRAY_LENGTH(input_pins)); | |
| 5399 | 5397 | set_output_pins(output_pins, output_pin_count); |
| 5400 | 5398 | } |
| 5401 | 5399 | |
| r29305 | r29306 | |
| 5431 | 5429 | ++output_pin_count; |
| 5432 | 5430 | } |
| 5433 | 5431 | |
| 5434 | for (index = 0; index < ARRAY_LEN(registered_pins); ++index) | |
| 5432 | for (index = 0; index < ARRAY_LENGTH(registered_pins); ++index) | |
| 5435 | 5433 | { |
| 5436 | 5434 | output_pins[output_pin_count].pin = registered_pins[index]; |
| 5437 | 5435 | output_pins[output_pin_count].flags = OUTPUT_ACTIVELOW | OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED; |
| r29305 | r29306 | |
| 5455 | 5453 | ++output_pin_count; |
| 5456 | 5454 | } |
| 5457 | 5455 | |
| 5458 | set_input_pins(input_pins, ARRAY_LEN(input_pins)); | |
| 5456 | set_input_pins(input_pins, ARRAY_LENGTH(input_pins)); | |
| 5459 | 5457 | set_output_pins(output_pins, output_pin_count); |
| 5460 | 5458 | } |
| 5461 | 5459 | |
| r29305 | r29306 | |
| 5483 | 5481 | ++output_pin_count; |
| 5484 | 5482 | } |
| 5485 | 5483 | |
| 5486 | for (index = 0; index < ARRAY_LEN(registered_pins); ++index) | |
| 5484 | for (index = 0; index < ARRAY_LENGTH(registered_pins); ++index) | |
| 5487 | 5485 | { |
| 5488 | 5486 | output_pins[output_pin_count].pin = registered_pins[index]; |
| 5489 | 5487 | output_pins[output_pin_count].flags = OUTPUT_ACTIVELOW | OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED; |
| r29305 | r29306 | |
| 5499 | 5497 | ++output_pin_count; |
| 5500 | 5498 | } |
| 5501 | 5499 | |
| 5502 | set_input_pins(input_pins, ARRAY_LEN(input_pins)); | |
| 5500 | set_input_pins(input_pins, ARRAY_LENGTH(input_pins)); | |
| 5503 | 5501 | set_output_pins(output_pins, output_pin_count); |
| 5504 | 5502 | } |
| 5505 | 5503 | |
| r29305 | r29306 | |
| 5523 | 5521 | {21, OUTPUT_ACTIVELOW | OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED}, |
| 5524 | 5522 | {22, OUTPUT_ACTIVELOW | OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED}}; |
| 5525 | 5523 | |
| 5526 | set_input_pins(input_pins, ARRAY_LEN(input_pins)); | |
| 5527 | set_output_pins(output_pins, ARRAY_LEN(output_pins)); | |
| 5524 | set_input_pins(input_pins, ARRAY_LENGTH(input_pins)); | |
| 5525 | set_output_pins(output_pins, ARRAY_LENGTH(output_pins)); | |
| 5528 | 5526 | } |
| 5529 | 5527 | |
| 5530 | 5528 | |
| r29305 | r29306 | |
| 5549 | 5547 | {22, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_OUTPUT}, |
| 5550 | 5548 | {23, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_OUTPUT}}; |
| 5551 | 5549 | |
| 5552 | set_input_pins(input_pins, ARRAY_LEN(input_pins)); | |
| 5553 | set_output_pins(output_pins, ARRAY_LEN(output_pins)); | |
| 5550 | set_input_pins(input_pins, ARRAY_LENGTH(input_pins)); | |
| 5551 | set_output_pins(output_pins, ARRAY_LENGTH(output_pins)); | |
| 5554 | 5552 | } |
| 5555 | 5553 | |
| 5556 | 5554 | /*------------------------------------------------- |
| r29305 | r29306 | |
| 5573 | 5571 | {22, OUTPUT_ACTIVELOW | OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED}, |
| 5574 | 5572 | {23, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_OUTPUT}}; |
| 5575 | 5573 | |
| 5576 | set_input_pins(input_pins, ARRAY_LEN(input_pins)); | |
| 5577 | set_output_pins(output_pins, ARRAY_LEN(output_pins)); | |
| 5574 | set_input_pins(input_pins, ARRAY_LENGTH(input_pins)); | |
| 5575 | set_output_pins(output_pins, ARRAY_LENGTH(output_pins)); | |
| 5578 | 5576 | } |
| 5579 | 5577 | |
| 5580 | 5578 | |
| r29305 | r29306 | |
| 5599 | 5597 | {22, OUTPUT_ACTIVELOW | OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED}, |
| 5600 | 5598 | {23, OUTPUT_ACTIVELOW | OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED}}; |
| 5601 | 5599 | |
| 5602 | set_input_pins(input_pins, ARRAY_LEN(input_pins)); | |
| 5603 | set_output_pins(output_pins, ARRAY_LEN(output_pins)); | |
| 5600 | set_input_pins(input_pins, ARRAY_LENGTH(input_pins)); | |
| 5601 | set_output_pins(output_pins, ARRAY_LENGTH(output_pins)); | |
| 5604 | 5602 | } |
| 5605 | 5603 | |
| 5606 | 5604 | |
| r29305 | r29306 | |
| 5638 | 5636 | } |
| 5639 | 5637 | } |
| 5640 | 5638 | |
| 5641 | set_input_pins(input_pins, ARRAY_LEN(input_pins)); | |
| 5639 | set_input_pins(input_pins, ARRAY_LENGTH(input_pins)); | |
| 5642 | 5640 | set_output_pins(output_pins, output_pin_count); |
| 5643 | 5641 | } |
| 5644 | 5642 | |
| r29305 | r29306 | |
| 5677 | 5675 | } |
| 5678 | 5676 | } |
| 5679 | 5677 | |
| 5680 | set_input_pins(input_pins, ARRAY_LEN(input_pins)); | |
| 5678 | set_input_pins(input_pins, ARRAY_LENGTH(input_pins)); | |
| 5681 | 5679 | set_output_pins(output_pins, output_pin_count); |
| 5682 | 5680 | } |
| 5683 | 5681 | |
| r29305 | r29306 | |
| 5711 | 5709 | pin_output_config output_pins[8]; |
| 5712 | 5710 | UINT16 index; |
| 5713 | 5711 | |
| 5714 | for (index = 0; index < ARRAY_LEN(memory_cells); ++index) | |
| 5712 | for (index = 0; index < ARRAY_LENGTH(memory_cells); ++index) | |
| 5715 | 5713 | { |
| 5716 | 5714 | output_pins[index].pin = memory_cells[index].pin; |
| 5717 | 5715 | output_pins[index].flags = OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE; |
| r29305 | r29306 | |
| 5726 | 5724 | } |
| 5727 | 5725 | } |
| 5728 | 5726 | |
| 5729 | set_input_pins(input_pins, ARRAY_LEN(input_pins)); | |
| 5730 | set_output_pins(output_pins, ARRAY_LEN(output_pins)); | |
| 5727 | set_input_pins(input_pins, ARRAY_LENGTH(input_pins)); | |
| 5728 | set_output_pins(output_pins, ARRAY_LENGTH(output_pins)); | |
| 5731 | 5729 | } |
| 5732 | 5730 | |
| 5733 | 5731 | |
| r29305 | r29306 | |
| 5759 | 5757 | pin_output_config output_pins[8]; |
| 5760 | 5758 | UINT16 index; |
| 5761 | 5759 | |
| 5762 | for (index = 0; index < ARRAY_LEN(memory_cells); ++index) | |
| 5760 | for (index = 0; index < ARRAY_LENGTH(memory_cells); ++index) | |
| 5763 | 5761 | { |
| 5764 | 5762 | output_pins[index].pin = memory_cells[index].pin; |
| 5765 | 5763 | output_pins[index].flags = OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE; |
| r29305 | r29306 | |
| 5774 | 5772 | } |
| 5775 | 5773 | } |
| 5776 | 5774 | |
| 5777 | set_input_pins(input_pins, ARRAY_LEN(input_pins)); | |
| 5778 | set_output_pins(output_pins, ARRAY_LEN(output_pins)); | |
| 5775 | set_input_pins(input_pins, ARRAY_LENGTH(input_pins)); | |
| 5776 | set_output_pins(output_pins, ARRAY_LENGTH(output_pins)); | |
| 5779 | 5777 | } |
| 5780 | 5778 | |
| 5781 | 5779 | |
| r29305 | r29306 | |
| 5805 | 5803 | pin_output_config output_pins[8]; |
| 5806 | 5804 | UINT16 index; |
| 5807 | 5805 | |
| 5808 | for (index = 0; index < ARRAY_LEN(memory_cells); ++index) | |
| 5806 | for (index = 0; index < ARRAY_LENGTH(memory_cells); ++index) | |
| 5809 | 5807 | { |
| 5810 | 5808 | output_pins[index].pin = memory_cells[index].pin; |
| 5811 | 5809 | output_pins[index].flags = OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE; |
| r29305 | r29306 | |
| 5820 | 5818 | } |
| 5821 | 5819 | } |
| 5822 | 5820 | |
| 5823 | set_input_pins(input_pins, ARRAY_LEN(input_pins)); | |
| 5824 | set_output_pins(output_pins, ARRAY_LEN(output_pins)); | |
| 5821 | set_input_pins(input_pins, ARRAY_LENGTH(input_pins)); | |
| 5822 | set_output_pins(output_pins, ARRAY_LENGTH(output_pins)); | |
| 5825 | 5823 | } |
| 5826 | 5824 | |
| 5827 | 5825 | |
| r29305 | r29306 | |
| 5849 | 5847 | pin_output_config output_pins[8]; |
| 5850 | 5848 | UINT16 index; |
| 5851 | 5849 | |
| 5852 | for (index = 0; index < ARRAY_LEN(memory_cells); ++index) | |
| 5850 | for (index = 0; index < ARRAY_LENGTH(memory_cells); ++index) | |
| 5853 | 5851 | { |
| 5854 | 5852 | output_pins[index].pin = memory_cells[index].pin; |
| 5855 | 5853 | output_pins[index].flags = OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE; |
| r29305 | r29306 | |
| 5864 | 5862 | } |
| 5865 | 5863 | } |
| 5866 | 5864 | |
| 5867 | set_input_pins(input_pins, ARRAY_LEN(input_pins)); | |
| 5868 | set_output_pins(output_pins, ARRAY_LEN(output_pins)); | |
| 5865 | set_input_pins(input_pins, ARRAY_LENGTH(input_pins)); | |
| 5866 | set_output_pins(output_pins, ARRAY_LENGTH(output_pins)); | |
| 5869 | 5867 | } |
| 5870 | 5868 | |
| 5871 | 5869 | |
| r29305 | r29306 | |
| 5899 | 5897 | pin_output_config output_pins[8]; |
| 5900 | 5898 | UINT16 index; |
| 5901 | 5899 | |
| 5902 | for (index = 0; index < ARRAY_LEN(memory_cells); ++index) | |
| 5900 | for (index = 0; index < ARRAY_LENGTH(memory_cells); ++index) | |
| 5903 | 5901 | { |
| 5904 | 5902 | output_pins[index].pin = memory_cells[index].pin; |
| 5905 | 5903 | output_pins[index].flags = OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE; |
| r29305 | r29306 | |
| 5914 | 5912 | } |
| 5915 | 5913 | } |
| 5916 | 5914 | |
| 5917 | set_input_pins(input_pins, ARRAY_LEN(input_pins)); | |
| 5918 | set_output_pins(output_pins, ARRAY_LEN(output_pins)); | |
| 5915 | set_input_pins(input_pins, ARRAY_LENGTH(input_pins)); | |
| 5916 | set_output_pins(output_pins, ARRAY_LENGTH(output_pins)); | |
| 5919 | 5917 | } |
| 5920 | 5918 | |
| 5921 | 5919 | |
| r29305 | r29306 | |
| 5949 | 5947 | pin_output_config output_pins[8]; |
| 5950 | 5948 | UINT16 index; |
| 5951 | 5949 | |
| 5952 | for (index = 0; index < ARRAY_LEN(memory_cells); ++index) | |
| 5950 | for (index = 0; index < ARRAY_LENGTH(memory_cells); ++index) | |
| 5953 | 5951 | { |
| 5954 | 5952 | output_pins[index].pin = memory_cells[index].pin; |
| 5955 | 5953 | output_pins[index].flags = OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED; |
| r29305 | r29306 | |
| 5964 | 5962 | } |
| 5965 | 5963 | } |
| 5966 | 5964 | |
| 5967 | set_input_pins(input_pins, ARRAY_LEN(input_pins)); | |
| 5968 | set_output_pins(output_pins, ARRAY_LEN(output_pins)); | |
| 5965 | set_input_pins(input_pins, ARRAY_LENGTH(input_pins)); | |
| 5966 | set_output_pins(output_pins, ARRAY_LENGTH(output_pins)); | |
| 5969 | 5967 | } |
| 5970 | 5968 | |
| 5971 | 5969 | |
| r29305 | r29306 | |
| 5999 | 5997 | pin_output_config output_pins[8]; |
| 6000 | 5998 | UINT16 index; |
| 6001 | 5999 | |
| 6002 | for (index = 0; index < ARRAY_LEN(memory_cells); ++index) | |
| 6000 | for (index = 0; index < ARRAY_LENGTH(memory_cells); ++index) | |
| 6003 | 6001 | { |
| 6004 | 6002 | output_pins[index].pin = memory_cells[index].pin; |
| 6005 | 6003 | |
| r29305 | r29306 | |
| 6024 | 6022 | } |
| 6025 | 6023 | } |
| 6026 | 6024 | |
| 6027 | set_input_pins(input_pins, ARRAY_LEN(input_pins)); | |
| 6028 | set_output_pins(output_pins, ARRAY_LEN(output_pins)); | |
| 6025 | set_input_pins(input_pins, ARRAY_LENGTH(input_pins)); | |
| 6026 | set_output_pins(output_pins, ARRAY_LENGTH(output_pins)); | |
| 6029 | 6027 | } |
| 6030 | 6028 | |
| 6031 | 6029 | |
| r29305 | r29306 | |
| 6059 | 6057 | pin_output_config output_pins[8]; |
| 6060 | 6058 | UINT16 index; |
| 6061 | 6059 | |
| 6062 | for (index = 0; index < ARRAY_LEN(memory_cells); ++index) | |
| 6060 | for (index = 0; index < ARRAY_LENGTH(memory_cells); ++index) | |
| 6063 | 6061 | { |
| 6064 | 6062 | output_pins[index].pin = memory_cells[index].pin; |
| 6065 | 6063 | |
| r29305 | r29306 | |
| 6083 | 6081 | } |
| 6084 | 6082 | } |
| 6085 | 6083 | |
| 6086 | set_input_pins(input_pins, ARRAY_LEN(input_pins)); | |
| 6087 | set_output_pins(output_pins, ARRAY_LEN(output_pins)); | |
| 6084 | set_input_pins(input_pins, ARRAY_LENGTH(input_pins)); | |
| 6085 | set_output_pins(output_pins, ARRAY_LENGTH(output_pins)); | |
| 6088 | 6086 | } |
| 6089 | 6087 | #endif |
| 6090 | 6088 | |
| r29305 | r29306 | |
| 6101 | 6099 | pin_output_config output_pins[8]; |
| 6102 | 6100 | UINT16 index; |
| 6103 | 6101 | |
| 6104 | for (index = 0; index < ARRAY_LEN(output_pins); ++index) | |
| 6102 | for (index = 0; index < ARRAY_LENGTH(output_pins); ++index) | |
| 6105 | 6103 | { |
| 6106 | 6104 | output_pins[index].pin = index + 12; |
| 6107 | 6105 | output_pins[index].flags = OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE; |
| r29305 | r29306 | |
| 6116 | 6114 | } |
| 6117 | 6115 | } |
| 6118 | 6116 | |
| 6119 | set_input_pins(input_pins, ARRAY_LEN(input_pins)); | |
| 6120 | set_output_pins(output_pins, ARRAY_LEN(output_pins)); | |
| 6117 | set_input_pins(input_pins, ARRAY_LENGTH(input_pins)); | |
| 6118 | set_output_pins(output_pins, ARRAY_LENGTH(output_pins)); | |
| 6121 | 6119 | } |
| 6122 | 6120 | |
| 6123 | 6121 | |
| r29305 | r29306 | |
| 6133 | 6131 | pin_output_config output_pins[6]; |
| 6134 | 6132 | UINT16 index; |
| 6135 | 6133 | |
| 6136 | for (index = 0; index < ARRAY_LEN(output_pins); ++index) | |
| 6134 | for (index = 0; index < ARRAY_LENGTH(output_pins); ++index) | |
| 6137 | 6135 | { |
| 6138 | 6136 | output_pins[index].pin = index + 13; |
| 6139 | 6137 | output_pins[index].flags = OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE; |
| r29305 | r29306 | |
| 6148 | 6146 | } |
| 6149 | 6147 | } |
| 6150 | 6148 | |
| 6151 | set_input_pins(input_pins, ARRAY_LEN(input_pins)); | |
| 6152 | set_output_pins(output_pins, ARRAY_LEN(output_pins)); | |
| 6149 | set_input_pins(input_pins, ARRAY_LENGTH(input_pins)); | |
| 6150 | set_output_pins(output_pins, ARRAY_LENGTH(output_pins)); | |
| 6153 | 6151 | } |
| 6154 | 6152 | |
| 6155 | 6153 | |
| r29305 | r29306 | |
| 6165 | 6163 | pin_output_config output_pins[4]; |
| 6166 | 6164 | UINT16 index; |
| 6167 | 6165 | |
| 6168 | for (index = 0; index < ARRAY_LEN(output_pins); ++index) | |
| 6166 | for (index = 0; index < ARRAY_LENGTH(output_pins); ++index) | |
| 6169 | 6167 | { |
| 6170 | 6168 | output_pins[index].pin = index + 14; |
| 6171 | 6169 | output_pins[index].flags = OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE; |
| r29305 | r29306 | |
| 6180 | 6178 | } |
| 6181 | 6179 | } |
| 6182 | 6180 | |
| 6183 | set_input_pins(input_pins, ARRAY_LEN(input_pins)); | |
| 6184 | set_output_pins(output_pins, ARRAY_LEN(output_pins)); | |
| 6181 | set_input_pins(input_pins, ARRAY_LENGTH(input_pins)); | |
| 6182 | set_output_pins(output_pins, ARRAY_LENGTH(output_pins)); | |
| 6185 | 6183 | } |
| 6186 | 6184 | |
| 6187 | 6185 | |
| r29305 | r29306 | |
| 6197 | 6195 | pin_output_config output_pins[2]; |
| 6198 | 6196 | UINT16 index; |
| 6199 | 6197 | |
| 6200 | for (index = 0; index < ARRAY_LEN(output_pins); ++index) | |
| 6198 | for (index = 0; index < ARRAY_LENGTH(output_pins); ++index) | |
| 6201 | 6199 | { |
| 6202 | 6200 | output_pins[index].pin = index + 15; |
| 6203 | 6201 | output_pins[index].flags = OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE; |
| r29305 | r29306 | |
| 6212 | 6210 | } |
| 6213 | 6211 | } |
| 6214 | 6212 | |
| 6215 | set_input_pins(input_pins, ARRAY_LEN(input_pins)); | |
| 6216 | set_output_pins(output_pins, ARRAY_LEN(output_pins)); | |
| 6213 | set_input_pins(input_pins, ARRAY_LENGTH(input_pins)); | |
| 6214 | set_output_pins(output_pins, ARRAY_LENGTH(output_pins)); | |
| 6217 | 6215 | } |
| 6218 | 6216 | |
| 6219 | 6217 | |
| r29305 | r29306 | |
| 6251 | 6249 | } |
| 6252 | 6250 | } |
| 6253 | 6251 | |
| 6254 | set_input_pins(input_pins, ARRAY_LEN(input_pins)); | |
| 6252 | set_input_pins(input_pins, ARRAY_LENGTH(input_pins)); | |
| 6255 | 6253 | set_output_pins(output_pins, output_pin_count); |
| 6256 | 6254 | } |
| 6257 | 6255 | |
| r29305 | r29306 | |
| 6305 | 6303 | ++output_pin_count; |
| 6306 | 6304 | } |
| 6307 | 6305 | |
| 6308 | for (index = 0; index < ARRAY_LEN(registered_pins); ++index) | |
| 6306 | for (index = 0; index < ARRAY_LENGTH(registered_pins); ++index) | |
| 6309 | 6307 | { |
| 6310 | 6308 | output_pins[output_pin_count].pin = registered_pins[index]; |
| 6311 | 6309 | output_pins[output_pin_count].flags = OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED; |
| r29305 | r29306 | |
| 6356 | 6354 | ++output_pin_count; |
| 6357 | 6355 | } |
| 6358 | 6356 | |
| 6359 | set_input_pins(input_pins, ARRAY_LEN(input_pins)); | |
| 6357 | set_input_pins(input_pins, ARRAY_LENGTH(input_pins)); | |
| 6360 | 6358 | set_output_pins(output_pins, output_pin_count); |
| 6361 | 6359 | } |
| 6362 | 6360 | |
| r29305 | r29306 | |
| 6393 | 6391 | ++output_pin_count; |
| 6394 | 6392 | } |
| 6395 | 6393 | |
| 6396 | for (index = 0; index < ARRAY_LEN(registered_pins); ++index) | |
| 6394 | for (index = 0; index < ARRAY_LENGTH(registered_pins); ++index) | |
| 6397 | 6395 | { |
| 6398 | 6396 | output_pins[output_pin_count].pin = registered_pins[index]; |
| 6399 | 6397 | output_pins[output_pin_count].flags = OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED; |
| r29305 | r29306 | |
| 6427 | 6425 | ++output_pin_count; |
| 6428 | 6426 | } |
| 6429 | 6427 | |
| 6430 | set_input_pins(input_pins, ARRAY_LEN(input_pins)); | |
| 6428 | set_input_pins(input_pins, ARRAY_LENGTH(input_pins)); | |
| 6431 | 6429 | set_output_pins(output_pins, output_pin_count); |
| 6432 | 6430 | } |
| 6433 | 6431 | |
| r29305 | r29306 | |
| 6452 | 6450 | {19, OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED}}; |
| 6453 | 6451 | UINT16 index; |
| 6454 | 6452 | |
| 6455 | for (index = 0; index < ARRAY_LEN(output_pins); ++index) | |
| 6453 | for (index = 0; index < ARRAY_LENGTH(output_pins); ++index) | |
| 6456 | 6454 | { |
| 6457 | 6455 | if (!jed_get_fuse(jed, 2055 - index)) |
| 6458 | 6456 | { |
| r29305 | r29306 | |
| 6464 | 6462 | } |
| 6465 | 6463 | } |
| 6466 | 6464 | |
| 6467 | set_input_pins(input_pins, ARRAY_LEN(input_pins)); | |
| 6468 | set_output_pins(output_pins, ARRAY_LEN(output_pins)); | |
| 6465 | set_input_pins(input_pins, ARRAY_LENGTH(input_pins)); | |
| 6466 | set_output_pins(output_pins, ARRAY_LENGTH(output_pins)); | |
| 6469 | 6467 | } |
| 6470 | 6468 | |
| 6471 | 6469 | |
| r29305 | r29306 | |
| 6496 | 6494 | {22, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE}, |
| 6497 | 6495 | {23, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE}}; |
| 6498 | 6496 | |
| 6499 | set_input_pins(input_pins, ARRAY_LEN(input_pins)); | |
| 6500 | set_output_pins(output_pins, ARRAY_LEN(output_pins)); | |
| 6497 | set_input_pins(input_pins, ARRAY_LENGTH(input_pins)); | |
| 6498 | set_output_pins(output_pins, ARRAY_LENGTH(output_pins)); | |
| 6501 | 6499 | } |
| 6502 | 6500 | |
| 6503 | 6501 | |
| r29305 | r29306 | |
| 6526 | 6524 | {22, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE}, |
| 6527 | 6525 | {23, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE}}; |
| 6528 | 6526 | |
| 6529 | set_input_pins(input_pins, ARRAY_LEN(input_pins)); | |
| 6530 | set_output_pins(output_pins, ARRAY_LEN(output_pins)); | |
| 6527 | set_input_pins(input_pins, ARRAY_LENGTH(input_pins)); | |
| 6528 | set_output_pins(output_pins, ARRAY_LENGTH(output_pins)); | |
| 6531 | 6529 | } |
| 6532 | 6530 | |
| 6533 | 6531 | |
| r29305 | r29306 | |
| 6552 | 6550 | {22, OUTPUT_ACTIVEHIGH | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE}, |
| 6553 | 6551 | {23, OUTPUT_ACTIVEHIGH | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE}}; |
| 6554 | 6552 | |
| 6555 | set_input_pins(input_pins, ARRAY_LEN(input_pins)); | |
| 6556 | set_output_pins(output_pins, ARRAY_LEN(output_pins)); | |
| 6553 | set_input_pins(input_pins, ARRAY_LENGTH(input_pins)); | |
| 6554 | set_output_pins(output_pins, ARRAY_LENGTH(output_pins)); | |
| 6557 | 6555 | } |
| 6558 | 6556 | |
| 6559 | 6557 | |
| r29305 | r29306 | |
| 6578 | 6576 | {22, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE}, |
| 6579 | 6577 | {23, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE}}; |
| 6580 | 6578 | |
| 6581 | set_input_pins(input_pins, ARRAY_LEN(input_pins)); | |
| 6582 | set_output_pins(output_pins, ARRAY_LEN(output_pins)); | |
| 6579 | set_input_pins(input_pins, ARRAY_LENGTH(input_pins)); | |
| 6580 | set_output_pins(output_pins, ARRAY_LENGTH(output_pins)); | |
| 6583 | 6581 | } |
| 6584 | 6582 | |
| 6585 | 6583 | |
| r29305 | r29306 | |
| 6602 | 6600 | {21, OUTPUT_ACTIVEHIGH | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE}, |
| 6603 | 6601 | {22, OUTPUT_ACTIVEHIGH | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE}}; |
| 6604 | 6602 | |
| 6605 | set_input_pins(input_pins, ARRAY_LEN(input_pins)); | |
| 6606 | set_output_pins(output_pins, ARRAY_LEN(output_pins)); | |
| 6603 | set_input_pins(input_pins, ARRAY_LENGTH(input_pins)); | |
| 6604 | set_output_pins(output_pins, ARRAY_LENGTH(output_pins)); | |
| 6607 | 6605 | } |
| 6608 | 6606 | |
| 6609 | 6607 | |
| r29305 | r29306 | |
| 6626 | 6624 | {21, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE}, |
| 6627 | 6625 | {22, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE}}; |
| 6628 | 6626 | |
| 6629 | set_input_pins(input_pins, ARRAY_LEN(input_pins)); | |
| 6630 | set_output_pins(output_pins, ARRAY_LEN(output_pins)); | |
| 6627 | set_input_pins(input_pins, ARRAY_LENGTH(input_pins)); | |
| 6628 | set_output_pins(output_pins, ARRAY_LENGTH(output_pins)); | |
| 6631 | 6629 | } |
| 6632 | 6630 | |
| 6633 | 6631 | |
| r29305 | r29306 | |
| 6648 | 6646 | {20, OUTPUT_ACTIVEHIGH | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE}, |
| 6649 | 6647 | {21, OUTPUT_ACTIVEHIGH | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE}}; |
| 6650 | 6648 | |
| 6651 | set_input_pins(input_pins, ARRAY_LEN(input_pins)); | |
| 6652 | set_output_pins(output_pins, ARRAY_LEN(output_pins)); | |
| 6649 | set_input_pins(input_pins, ARRAY_LENGTH(input_pins)); | |
| 6650 | set_output_pins(output_pins, ARRAY_LENGTH(output_pins)); | |
| 6653 | 6651 | } |
| 6654 | 6652 | |
| 6655 | 6653 | |
| r29305 | r29306 | |
| 6670 | 6668 | {20, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE}, |
| 6671 | 6669 | {21, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE}}; |
| 6672 | 6670 | |
| 6673 | set_input_pins(input_pins, ARRAY_LEN(input_pins)); | |
| 6674 | set_output_pins(output_pins, ARRAY_LEN(output_pins)); | |
| 6671 | set_input_pins(input_pins, ARRAY_LENGTH(input_pins)); | |
| 6672 | set_output_pins(output_pins, ARRAY_LENGTH(output_pins)); | |
| 6675 | 6673 | } |
| 6676 | 6674 | |
| 6677 | 6675 | |
| r29305 | r29306 | |
| 6690 | 6688 | {19, OUTPUT_ACTIVEHIGH | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE}, |
| 6691 | 6689 | {20, OUTPUT_ACTIVEHIGH | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE}}; |
| 6692 | 6690 | |
| 6693 | set_input_pins(input_pins, ARRAY_LEN(input_pins)); | |
| 6694 | set_output_pins(output_pins, ARRAY_LEN(output_pins)); | |
| 6691 | set_input_pins(input_pins, ARRAY_LENGTH(input_pins)); | |
| 6692 | set_output_pins(output_pins, ARRAY_LENGTH(output_pins)); | |
| 6695 | 6693 | } |
| 6696 | 6694 | |
| 6697 | 6695 | |
| r29305 | r29306 | |
| 6710 | 6708 | {19, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE}, |
| 6711 | 6709 | {20, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE}}; |
| 6712 | 6710 | |
| 6713 | set_input_pins(input_pins, ARRAY_LEN(input_pins)); | |
| 6714 | set_output_pins(output_pins, ARRAY_LEN(output_pins)); | |
| 6711 | set_input_pins(input_pins, ARRAY_LENGTH(input_pins)); | |
| 6712 | set_output_pins(output_pins, ARRAY_LENGTH(output_pins)); | |
| 6715 | 6713 | } |
| 6716 | 6714 | |
| 6717 | 6715 | |
| r29305 | r29306 | |
| 6728 | 6726 | {18, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE}, |
| 6729 | 6727 | {19, OUTPUT_ACTIVEHIGH | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE}}; |
| 6730 | 6728 | |
| 6731 | set_input_pins(input_pins, ARRAY_LEN(input_pins)); | |
| 6732 | set_output_pins(output_pins, ARRAY_LEN(output_pins)); | |
| 6729 | set_input_pins(input_pins, ARRAY_LENGTH(input_pins)); | |
| 6730 | set_output_pins(output_pins, ARRAY_LENGTH(output_pins)); | |
| 6733 | 6731 | } |
| 6734 | 6732 | |
| 6735 | 6733 | |
| r29305 | r29306 | |
| 6746 | 6744 | {18, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE}, |
| 6747 | 6745 | {19, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE}}; |
| 6748 | 6746 | |
| 6749 | set_input_pins(input_pins, ARRAY_LEN(input_pins)); | |
| 6750 | set_output_pins(output_pins, ARRAY_LEN(output_pins)); | |
| 6747 | set_input_pins(input_pins, ARRAY_LENGTH(input_pins)); | |
| 6748 | set_output_pins(output_pins, ARRAY_LENGTH(output_pins)); | |
| 6751 | 6749 | } |
| 6752 | 6750 | |
| 6753 | 6751 | |
| r29305 | r29306 | |
| 7213 | 7211 | return print_usage(); |
| 7214 | 7212 | } |
| 7215 | 7213 | |
| 7216 | for (index = 0; index < ARRAY_LEN(paldata); ++index) | |
| 7214 | for (index = 0; index < ARRAY_LENGTH(paldata); ++index) | |
| 7217 | 7215 | { |
| 7218 | 7216 | printf("%s\n", paldata[index].name); |
| 7219 | 7217 | } |
| r29305 | r29306 | |
| 7239 | 7237 | return print_usage(); |
| 7240 | 7238 | } |
| 7241 | 7239 | |
| 7242 | for (index = 0; index < ARRAY_LEN(command_entries); ++index) | |
| 7240 | for (index = 0; index < ARRAY_LENGTH(command_entries); ++index) | |
| 7243 | 7241 | { |
| 7244 | 7242 | if (!strcmp(argv[1], command_entries[index].command)) |
| 7245 | 7243 | return command_entries[index].command_func(argc - 2, &argv[2]); |
| Modified: svn:mergeinfo Merged /trunk:r29217-29253 |
| Previous | 199869 Revisions | Next |