Previous 199869 Revisions Next

r41644 Saturday 7th November, 2015 at 17:50:13 UTC by fulivi
imds2: USARTs added, rs232 ports still missing
[src/mame/drivers]ddenlovr.c equites.c imds2.c microkit.c
[src/mame/includes]equites.h imds2.h
[src/mame/video]equites.c

trunk/src/mame/drivers/ddenlovr.c
r250155r250156
697697   if (baddr / 8 >= src_len)
698698   {
699699#ifdef MAME_DEBUG
700//      popmessage("GFX ROM OVER %06x", baddr / 8);
700      popmessage("GFX ROM OVER %06x", baddr / 8);
701701#endif
702702      return 1;
703703   }
trunk/src/mame/drivers/equites.c
r250155r250156
524524
525525
526526/******************************************************************************/
527// Local Functions
528
529/******************************************************************************/
527530// Interrupt Handlers
528531
532// Equites Hardware
529533TIMER_DEVICE_CALLBACK_MEMBER(equites_state::equites_scanline)
530534{
531535   int scanline = param;
r250155r250156
592596
593597
594598/******************************************************************************/
595// CPU Handlers
599// Main CPU Handlers
596600
597CUSTOM_INPUT_MEMBER(equites_state::gekisou_unknown_bit_r)
601CUSTOM_INPUT_MEMBER(equites_state::gekisou_unknown_status)
598602{
599   return m_gekisou_unknown_bit;
603   return m_unknown_bit;
600604}
601605
602WRITE16_MEMBER(equites_state::gekisou_unknown_bit_w)
606WRITE16_MEMBER(equites_state::gekisou_unknown_0_w)
603607{
604   // data bit is A16 (offset)
605   m_gekisou_unknown_bit = (offset == 0) ? 0 : 1;;
608   m_unknown_bit = 0;
606609}
607610
611WRITE16_MEMBER(equites_state::gekisou_unknown_1_w)
612{
613   m_unknown_bit = 1;
614}
608615
616
617
618/******************************************************************************/
619// Main CPU Memory Map
620
609621READ16_MEMBER(equites_state::equites_spriteram_kludge_r)
610622{
611623   if (m_spriteram[0] == 0x5555)
r250155r250156
647659}
648660
649661
650
651/******************************************************************************/
652// CPU Memory Maps
653
654662static ADDRESS_MAP_START( equites_map, AS_PROGRAM, 16, equites_state )
655663   ADDRESS_MAP_UNMAP_HIGH
656664   AM_RANGE(0x000000, 0x00ffff) AM_ROM // ROM area is written several times (dev system?)
657   AM_RANGE(0x040000, 0x040fff) AM_RAM
665   AM_RANGE(0x040000, 0x040fff) AM_RAM AM_SHARE("nvram")   // nvram is for gekisou only
658666   AM_RANGE(0x080000, 0x080fff) AM_READWRITE8(equites_fg_videoram_r, equites_fg_videoram_w, 0x00ff)
659667   AM_RANGE(0x0c0000, 0x0c01ff) AM_RAM_WRITE(equites_bg_videoram_w) AM_SHARE("bg_videoram")
660668   AM_RANGE(0x0c0200, 0x0c0fff) AM_RAM
r250155r250156
667675   AM_RANGE(0x18c000, 0x18c001) AM_MIRROR(0x020000) AM_MASK(0x020000) AM_WRITE(mcu_switch_w)
668676   AM_RANGE(0x1c0000, 0x1c0001) AM_READ_PORT("IN0") AM_WRITE(equites_scrollreg_w)
669677   AM_RANGE(0x380000, 0x380001) AM_WRITE8(equites_bgcolor_w, 0xff00)
678   // 580000 unknown (protection?) (gekisou only, installed by DRIVER_INIT)
679   // 5a0000 unknown (protection?) (gekisou only, installed by DRIVER_INIT)
670680   AM_RANGE(0x780000, 0x780001) AM_WRITE(watchdog_reset16_w)
671681ADDRESS_MAP_END
672682
673static ADDRESS_MAP_START( gekisou_map, AS_PROGRAM, 16, equites_state )
674   AM_RANGE(0x040000, 0x040fff) AM_RAM AM_SHARE("nvram") // mainram is battery-backed
675   AM_RANGE(0x580000, 0x580001) AM_MIRROR(0x020000) AM_MASK(0x020000) AM_WRITE(gekisou_unknown_bit_w)
676   AM_IMPORT_FROM( equites_map )
677ADDRESS_MAP_END
678
679
680683static ADDRESS_MAP_START( splndrbt_map, AS_PROGRAM, 16, equites_state )
681684   ADDRESS_MAP_UNMAP_HIGH
682685   AM_RANGE(0x000000, 0x00ffff) AM_ROM
683   AM_RANGE(0x040000, 0x040fff) AM_RAM
686   AM_RANGE(0x040000, 0x040fff) AM_RAM AM_SHARE("workram")
684687   AM_RANGE(0x080000, 0x080001) AM_READ_PORT("IN0")
685688   AM_RANGE(0x0c0000, 0x0c0001) AM_READ_PORT("IN1")
686689   AM_RANGE(0x0c0000, 0x0c0001) AM_MIRROR(0x020000) AM_MASK(0x020000) AM_WRITE8(equites_bgcolor_w, 0xff00) // note: addressmask does not apply here
r250155r250156
699702   AM_RANGE(0x600100, 0x6001ff) AM_RAM AM_SHARE("spriteram_2") // sprite RAM 2 (8-bit)
700703ADDRESS_MAP_END
701704
702
703705static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, equites_state )
704706   AM_RANGE(0x0000, 0xbfff) AM_ROM
705707   AM_RANGE(0xc000, 0xc000) AM_READ(soundlatch_byte_r)
r250155r250156
778780
779781   /* this is actually a variable resistor */
780782   PORT_START(FRQ_ADJUSTER_TAG)
781   PORT_ADJUSTER(25, "MSM5232 Clock") // approximate factory setting
783   PORT_ADJUSTER(25, "MSM5232 Clock")
782784INPUT_PORTS_END
783785
784786/******************************************************************************/
r250155r250156
797799   PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_UNKNOWN )
798800   PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_UNKNOWN )
799801   PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_UNKNOWN )
800   PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, equites_state, gekisou_unknown_bit_r, NULL)
802   PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, equites_state,gekisou_unknown_status, NULL)
801803
802804   /* this is actually a variable resistor */
803805   PORT_START(FRQ_ADJUSTER_TAG)
804   PORT_ADJUSTER(24, "MSM5232 Clock") // approximate factory setting
806   PORT_ADJUSTER(24, "MSM5232 Clock")
805807INPUT_PORTS_END
806808
807809/******************************************************************************/
r250155r250156
834836
835837   /* this is actually a variable resistor */
836838   PORT_START(FRQ_ADJUSTER_TAG)
837   PORT_ADJUSTER(33, "MSM5232 Clock") // approximate factory setting
839   PORT_ADJUSTER(33, "MSM5232 Clock")
838840INPUT_PORTS_END
839841
840842/******************************************************************************/
r250155r250156
867869
868870   /* this is actually a variable resistor */
869871   PORT_START(FRQ_ADJUSTER_TAG)
870   PORT_ADJUSTER(33, "MSM5232 Clock") // approximate factory setting
872   PORT_ADJUSTER(33, "MSM5232 Clock")
871873INPUT_PORTS_END
872874
873875/******************************************************************************/
r250155r250156
900902
901903   /* this is actually a variable resistor */
902904   PORT_START(FRQ_ADJUSTER_TAG)
903   PORT_ADJUSTER(28, "MSM5232 Clock") // approximate factory setting
905   PORT_ADJUSTER(28, "MSM5232 Clock")
904906INPUT_PORTS_END
905907
906908/******************************************************************************/
r250155r250156
949951
950952   /* this is actually a variable resistor */
951953   PORT_START(FRQ_ADJUSTER_TAG)
952   PORT_ADJUSTER(27, "MSM5232 Clock") // approximate factory setting
954   PORT_ADJUSTER(27, "MSM5232 Clock")
953955INPUT_PORTS_END
954956
955957
r250155r250156
10861088
10871089/******************************************************************************/
10881090
1089void equites_state::machine_start()
1091MACHINE_START_MEMBER(equites_state,equites)
10901092{
1091   // zerofill
1092   m_fg_char_bank = 0;
1093   m_bgcolor = 0;
1094   m_splndrbt_bg_scrollx = 0;
1095   m_splndrbt_bg_scrolly = 0;
1096   m_sound_prom_address = 0;
1097   m_dac_latch = 0;
1098   m_eq8155_port_b = 0;
1099   m_eq8155_port_a = 0;
1100   m_eq8155_port_c = 0;
1101   m_ay_port_a = 0;
1102   m_ay_port_b = 0;
1103   m_eq_cymbal_ctrl = 0;
1104   m_cymvol = 0.0;
1105   m_hihatvol = 0.0;
1106   m_timer_count = 0;
1107   m_gekisou_unknown_bit = 0;
1108
1109   // register for savestates
11101093   save_item(NAME(m_fg_char_bank));
11111094   save_item(NAME(m_bgcolor));
11121095   save_item(NAME(m_splndrbt_bg_scrollx));
r250155r250156
11221105   save_item(NAME(m_cymvol));
11231106   save_item(NAME(m_hihatvol));
11241107   save_item(NAME(m_timer_count));
1125   save_item(NAME(m_gekisou_unknown_bit));
1108   save_item(NAME(m_unknown_bit));
11261109
11271110   m_nmi_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(equites_state::equites_nmi_callback), this));
11281111
r250155r250156
11301113   m_adjuster_timer->adjust(attotime::from_hz(60), 0, attotime::from_hz(60));
11311114}
11321115
1133void equites_state::machine_reset()
1116MACHINE_RESET_MEMBER(equites_state,equites)
11341117{
11351118   flip_screen_set(0);
1119
1120   m_fg_char_bank = 0;
1121   m_bgcolor = 0;
1122   m_splndrbt_bg_scrollx = 0;
1123   m_splndrbt_bg_scrolly = 0;
1124   m_sound_prom_address = 0;
1125   m_dac_latch = 0;
1126   m_eq8155_port_b = 0;
1127   m_eq8155_port_a = 0;
1128   m_eq8155_port_c = 0;
1129   m_ay_port_a = 0;
1130   m_ay_port_b = 0;
1131   m_eq_cymbal_ctrl = 0;
1132   m_cymvol = 0.0;
1133   m_hihatvol = 0.0;
1134   m_timer_count = 0;
1135   m_unknown_bit = 0;
11361136}
11371137
11381138
r250155r250156
11621162   MCFG_PALETTE_INIT_OWNER(equites_state,equites)
11631163
11641164   MCFG_VIDEO_START_OVERRIDE(equites_state,equites)
1165
1166   MCFG_MACHINE_START_OVERRIDE(equites_state,equites)
1167   MCFG_MACHINE_RESET_OVERRIDE(equites_state,equites)
11651168MACHINE_CONFIG_END
11661169
11671170static MACHINE_CONFIG_DERIVED( gekisou, equites )
11681171
1169   /* basic machine hardware */
1170   MCFG_CPU_MODIFY("maincpu")
1171   MCFG_CPU_PROGRAM_MAP(gekisou_map)
1172
11731172   // mcu not dumped, so add simulated mcu
11741173   MCFG_CPU_ADD("mcu", ALPHA8301L, 4000000/8)
11751174   MCFG_CPU_PROGRAM_MAP(mcu_map)
r250155r250156
12051204   MCFG_PALETTE_INIT_OWNER(equites_state,splndrbt)
12061205
12071206   MCFG_VIDEO_START_OVERRIDE(equites_state,splndrbt)
1207
1208   MCFG_MACHINE_START_OVERRIDE(equites_state,equites)
1209   MCFG_MACHINE_RESET_OVERRIDE(equites_state,equites)
12081210MACHINE_CONFIG_END
12091211
12101212static MACHINE_CONFIG_DERIVED( hvoltage, splndrbt )
r250155r250156
17681770/******************************************************************************/
17691771// Initializations
17701772
1771void equites_state::unpack_block(const char *region, int offset, int size)
1773void equites_state::unpack_block( const char *region, int offset, int size )
17721774{
17731775   UINT8 *rom = memregion(region)->base();
1776   int i;
17741777
1775   for (int i = 0; i < size; i++)
1778   for (i = 0; i < size; ++i)
17761779   {
17771780      rom[(offset + i + size)] = (rom[(offset + i)] >> 4);
17781781      rom[(offset + i)] &= 0x0f;
17791782   }
17801783}
17811784
1782void equites_state::unpack_region(const char *region)
1785void equites_state::unpack_region( const char *region )
17831786{
17841787   unpack_block(region, 0x0000, 0x2000);
17851788   unpack_block(region, 0x4000, 0x2000);
r250155r250156
17921795   unpack_region("gfx3");
17931796}
17941797
1798DRIVER_INIT_MEMBER(equites_state,bullfgtr)
1799{
1800   unpack_region("gfx2");
1801   unpack_region("gfx3");
1802}
1803
1804DRIVER_INIT_MEMBER(equites_state,kouyakyu)
1805{
1806   unpack_region("gfx2");
1807   unpack_region("gfx3");
1808}
1809
1810DRIVER_INIT_MEMBER(equites_state,gekisou)
1811{
1812   unpack_region("gfx2");
1813   unpack_region("gfx3");
1814
1815   // install special handlers for unknown device (protection?)
1816   m_maincpu->space(AS_PROGRAM).install_write_handler(0x580000, 0x580001, write16_delegate(FUNC(equites_state::gekisou_unknown_0_w),this));
1817   m_maincpu->space(AS_PROGRAM).install_write_handler(0x5a0000, 0x5a0001, write16_delegate(FUNC(equites_state::gekisou_unknown_1_w),this));
1818}
1819
17951820DRIVER_INIT_MEMBER(equites_state,splndrbt)
17961821{
17971822   unpack_region("gfx3");
r250155r250156
18041829// Game Entries
18051830
18061831// Equites Hardware
1807GAME( 1984, equites,   0,        equites,  equites,  equites_state, equites,  ROT90, "Alpha Denshi Co.", "Equites", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
1808GAME( 1984, equitess,  equites,  equites,  equites,  equites_state, equites,  ROT90, "Alpha Denshi Co. (Sega license)", "Equites (Sega)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
1809GAME( 1984, bullfgtr,  0,        equites,  bullfgtr, equites_state, equites,  ROT90, "Alpha Denshi Co.", "Bull Fighter", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
1810GAME( 1984, bullfgtrs, bullfgtr, equites,  bullfgtr, equites_state, equites,  ROT90, "Alpha Denshi Co. (Sega license)", "Bull Fighter (Sega)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
1811GAME( 1985, kouyakyu,  0,        equites,  kouyakyu, equites_state, equites,  ROT0,  "Alpha Denshi Co.", "The Koukou Yakyuu", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
1812GAME( 1985, gekisou,   0,        gekisou,  gekisou,  equites_state, equites,  ROT90, "Eastern Corp.", "Gekisou (Japan)", MACHINE_UNEMULATED_PROTECTION | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
1832GAME( 1984, equites,  0,        equites,  equites,  equites_state, equites,  ROT90, "Alpha Denshi Co.", "Equites", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
1833GAME( 1984, equitess, equites,  equites,  equites,  equites_state, equites,  ROT90, "Alpha Denshi Co. (Sega license)", "Equites (Sega)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
1834GAME( 1984, bullfgtr, 0,        equites,  bullfgtr, equites_state, bullfgtr, ROT90, "Alpha Denshi Co.", "Bull Fighter", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
1835GAME( 1984, bullfgtrs,bullfgtr, equites,  bullfgtr, equites_state, bullfgtr, ROT90, "Alpha Denshi Co. (Sega license)", "Bull Fighter (Sega)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
1836GAME( 1985, kouyakyu, 0,        equites,  kouyakyu, equites_state, kouyakyu, ROT0,  "Alpha Denshi Co.", "The Koukou Yakyuu", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
1837GAME( 1985, gekisou,  0,        gekisou,  gekisou,  equites_state, gekisou,  ROT90, "Eastern Corp.", "Gekisou (Japan)", MACHINE_UNEMULATED_PROTECTION | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
18131838
18141839// Splendor Blast Hardware
1815GAME( 1985, splndrbt,  0,        splndrbt, splndrbt, equites_state, splndrbt, ROT0,  "Alpha Denshi Co.", "Splendor Blast", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
1816GAME( 1985, hvoltage,  0,        hvoltage, hvoltage, equites_state, splndrbt, ROT0,  "Alpha Denshi Co.", "High Voltage", MACHINE_UNEMULATED_PROTECTION | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
1840GAME( 1985, splndrbt, 0,        splndrbt, splndrbt, equites_state, splndrbt, ROT0,  "Alpha Denshi Co.", "Splendor Blast", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
1841GAME( 1985, hvoltage, 0,        hvoltage, hvoltage, equites_state, splndrbt, ROT0,  "Alpha Denshi Co.", "High Voltage", MACHINE_UNEMULATED_PROTECTION | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
trunk/src/mame/drivers/imds2.c
r250155r250156
9696// CPU oscillator of IPC board: 8 MHz
9797#define IPC_XTAL_Y2     XTAL_8MHz
9898
99// Y1 oscillator of IPC board: 19.6608 MHz
100#define IPC_XTAL_Y1     XTAL_19_6608MHz
101
99102// Main oscillator of IOC board: 22.032 MHz
100103#define IOC_XTAL_Y2     22032000
101104
r250155r250156
116119   ADDRESS_MAP_UNMAP_LOW
117120   AM_RANGE(0xc0 , 0xc0) AM_READWRITE(imds2_ipc_dbbout_r , imds2_ipc_dbbin_data_w)
118121   AM_RANGE(0xc1 , 0xc1) AM_READWRITE(imds2_ipc_status_r , imds2_ipc_dbbin_cmd_w)
122        AM_RANGE(0xf0 , 0xf3) AM_DEVREADWRITE("ipctimer" , pit8253_device , read , write)
123        AM_RANGE(0xf4 , 0xf4) AM_DEVREADWRITE("ipcusart0" , i8251_device , data_r , data_w)
124        AM_RANGE(0xf5 , 0xf5) AM_DEVREADWRITE("ipcusart0" , i8251_device , status_r , control_w)
125        AM_RANGE(0xf6 , 0xf6) AM_DEVREADWRITE("ipcusart1" , i8251_device , data_r , data_w)
126        AM_RANGE(0xf7 , 0xf7) AM_DEVREADWRITE("ipcusart1" , i8251_device , status_r , control_w)
119127   AM_RANGE(0xf8 , 0xf9) AM_DEVREADWRITE("iocpio" , i8041_device , upi41_master_r , upi41_master_w)
120128   AM_RANGE(0xfa , 0xfb) AM_READWRITE(imds2_ipclocpic_r , imds2_ipclocpic_w)
121129   AM_RANGE(0xfc , 0xfd) AM_READWRITE(imds2_ipcsyspic_r , imds2_ipcsyspic_w)
r250155r250156
165173   m_ipccpu(*this , "ipccpu"),
166174   m_ipcsyspic(*this , "ipcsyspic"),
167175   m_ipclocpic(*this , "ipclocpic"),
176        m_ipctimer(*this , "ipctimer"),
177        m_ipcusart0(*this , "ipcusart0"),
178        m_ipcusart1(*this , "ipcusart1"),
168179   m_ioccpu(*this , "ioccpu"),
169180   m_iocdma(*this , "iocdma"),
170181   m_ioccrtc(*this , "ioccrtc"),
r250155r250156
245256   m_ipclocpic->write(space , offset == 0 , data);
246257}
247258
259WRITE_LINE_MEMBER(imds2_state::imds2_baud_clk_0_w)
260{
261        m_ipcusart0->write_txc(state);
262        m_ipcusart0->write_rxc(state);
263}
264
265WRITE_LINE_MEMBER(imds2_state::imds2_baud_clk_1_w)
266{
267        m_ipcusart1->write_txc(state);
268        m_ipcusart1->write_rxc(state);
269}
270
248271WRITE8_MEMBER(imds2_state::imds2_miscout_w)
249272{
250273   m_miscout = data;
r250155r250156
752775      MCFG_PIC8259_ADD("ipcsyspic" , WRITELINE(imds2_state , imds2_ipc_intr) , VCC , NULL)
753776      MCFG_PIC8259_ADD("ipclocpic" , DEVWRITELINE("ipcsyspic" , pic8259_device , ir7_w) , VCC  , NULL)
754777
755      MCFG_CPU_ADD("ioccpu" , I8080A , IOC_XTAL_Y2 / 9)     // 2.448 MHz
778      MCFG_DEVICE_ADD("ipctimer" , PIT8253 , 0)
779      MCFG_PIT8253_CLK0(IPC_XTAL_Y1 / 16)
780      MCFG_PIT8253_CLK1(IPC_XTAL_Y1 / 16)
781      MCFG_PIT8253_CLK2(IPC_XTAL_Y1 / 16)
782      MCFG_PIT8253_OUT0_HANDLER(WRITELINE(imds2_state , imds2_baud_clk_0_w))
783      MCFG_PIT8253_OUT1_HANDLER(WRITELINE(imds2_state , imds2_baud_clk_1_w))
784      MCFG_PIT8253_OUT2_HANDLER(DEVWRITELINE("ipclocpic" , pic8259_device , ir4_w))
785
786                MCFG_DEVICE_ADD("ipcusart0" , I8251 , 0)
787                MCFG_I8251_RTS_HANDLER(DEVWRITELINE("ipcusart0" , i8251_device , write_cts))
788                MCFG_I8251_RXRDY_HANDLER(DEVWRITELINE("ipclocpic" , pic8259_device , ir0_w))
789                MCFG_I8251_TXRDY_HANDLER(DEVWRITELINE("ipclocpic" , pic8259_device , ir1_w))
790
791                MCFG_DEVICE_ADD("ipcusart1" , I8251 , 0)
792                MCFG_I8251_RXRDY_HANDLER(DEVWRITELINE("ipclocpic" , pic8259_device , ir2_w))
793                MCFG_I8251_TXRDY_HANDLER(DEVWRITELINE("ipclocpic" , pic8259_device , ir3_w))
794
795      MCFG_CPU_ADD("ioccpu" , I8080A , IOC_XTAL_Y2 / 18)     // 2.448 MHz but running at 50% (due to wait states & DMA usage of bus)
756796      MCFG_CPU_PROGRAM_MAP(ioc_mem_map)
757797      MCFG_CPU_IO_MAP(ioc_io_map)
758798      MCFG_QUANTUM_TIME(attotime::from_hz(100))
r250155r250156
812852      MCFG_DEVICE_ADD("iocfdc" , I8271 , IOC_XTAL_Y1 / 2)
813853      MCFG_I8271_DRQ_CALLBACK(DEVWRITELINE("iocdma" , i8257_device , dreq1_w))
814854      MCFG_FLOPPY_DRIVE_ADD("iocfdc:0", imds2_floppies, "8sssd", floppy_image_device::default_floppy_formats)
815            MCFG_SLOT_FIXED(true)
855      MCFG_SLOT_FIXED(true)
816856
817857      MCFG_CPU_ADD("iocpio" , I8041 , IOC_XTAL_Y3)
818858      MCFG_CPU_IO_MAP(pio_io_map)
trunk/src/mame/drivers/microkit.c
r250155r250156
66
77    http://www.vintagecomputer.net/browse_thread.cfm?id=511
88
9    Press CR or LF to get the * prompt.
10    Commands:
11    $Pxxxx - Jump to address xxxx
12    ?Mxxxx yyyy - Dump memory starting at xxxx for yyyy bytes
13    !Mxxxx yy zz... - Write data (yy etc) to memory xxxx. Data gets entered when you
14                      press the space after the data.
9*/
1510
16    There's no sound or storage facilities, therefore no software.
17
18    ToDo:
19    - No technical manual or schematic available, so the entire driver is bodgy guesswork.
20    - Address 0 needs to be read/writeable, otherwise the numbers you enter will get
21            internally corrupted.
22    - Address 8000 is IDL which hangs the system, so program counter is preset to 8001.
23    - The keyboard is hooked up serially, which is ok, but the output to the terminal
24            is rubbish, so parallel is used so you can at least see something.
25    - When you enter commands, you can't see what you're doing.
26    - When you enter numbers, they display as rubbish or act as control codes. They
27            internally work though.
28    - The computer looks like a rack-mount metal box with a rudimentary front panel.
29            Buttons are: Reset; Load; Run program; Run Utility
30            There is a RUN LED.
31            None of these items are emulated.
32            It also has a power switch and lamp, and a fuse.
33
34*****************************************************************************************/
35
3611#include "emu.h"
3712#include "cpu/cosmac/cosmac.h"
38#include "bus/rs232/rs232.h"
39#include "machine/terminal.h"
4013
41
4214class microkit_state : public driver_device
4315{
4416public:
4517   microkit_state(const machine_config &mconfig, device_type type, const char *tag)
4618      : driver_device(mconfig, type, tag)
47      , m_maincpu(*this, "maincpu")
48      , m_rs232(*this, "rs232")
49      , m_terminal(*this, "terminal")
5019   { }
51
52   DECLARE_READ_LINE_MEMBER(clear_r);
53   DECLARE_WRITE8_MEMBER(ram_w);
54   DECLARE_READ8_MEMBER(ram_r);
55
56private:
57   virtual void machine_reset();
58   UINT8 m_resetcnt;
59   UINT8 m_ram_data;
60   required_device<cosmac_device> m_maincpu;
61   required_device<rs232_port_device> m_rs232;
62   required_device<generic_terminal_device> m_terminal;
6320};
6421
6522static ADDRESS_MAP_START( microkit_mem, AS_PROGRAM, 8, microkit_state )
66   AM_RANGE(0x0000, 0x0000) AM_READWRITE(ram_r,ram_w)
67   AM_RANGE(0x8000, 0x81ff) AM_ROM AM_REGION("maincpu", 0)
68   AM_RANGE(0x8200, 0x83ff) AM_RAM
23   AM_RANGE(0x0000, 0x01ff) AM_ROM AM_REGION("maincpu", 0)
6924ADDRESS_MAP_END
7025
7126static ADDRESS_MAP_START( microkit_io, AS_IO, 8, microkit_state )
72   AM_RANGE(0x07, 0x07) AM_WRITENOP // writes a lots of zeros here
7327ADDRESS_MAP_END
7428
7529static INPUT_PORTS_START( microkit )
7630INPUT_PORTS_END
7731
78READ_LINE_MEMBER( microkit_state::clear_r )
79{
80   if (m_resetcnt < 0x10)
81      m_maincpu->set_state_int(COSMAC_R0, 0x8001); // skip IDL
82   if (m_resetcnt < 0x20)
83      m_resetcnt++;
84   // set reset pin to normal
85   return 1;
86}
87
88READ8_MEMBER( microkit_state::ram_r )
89{
90   return m_ram_data;
91}
92
93WRITE8_MEMBER( microkit_state::ram_w )
94{
95   m_ram_data = data;
96   if (data > 0 && data < 0x80)
97      m_terminal->write(space, 0, data);
98}
99
100void microkit_state::machine_reset()
101{
102   m_resetcnt = 0;
103   m_ram_data = 0;
104}
105
106static DEVICE_INPUT_DEFAULTS_START( serial_keyb )
107   DEVICE_INPUT_DEFAULTS( "RS232_TXBAUD", 0xff, RS232_BAUD_300 )
108   DEVICE_INPUT_DEFAULTS( "RS232_RXBAUD", 0xff, RS232_BAUD_300 )
109   DEVICE_INPUT_DEFAULTS( "RS232_STARTBITS", 0xff, RS232_STARTBITS_1 )
110   DEVICE_INPUT_DEFAULTS( "RS232_DATABITS", 0xff, RS232_DATABITS_8 )
111   DEVICE_INPUT_DEFAULTS( "RS232_PARITY", 0xff, RS232_PARITY_NONE )
112   DEVICE_INPUT_DEFAULTS( "RS232_STOPBITS", 0xff, RS232_STOPBITS_2 )
113DEVICE_INPUT_DEFAULTS_END
114
115
11632static MACHINE_CONFIG_START( microkit, microkit_state )
11733   // basic machine hardware
118   MCFG_CPU_ADD("maincpu", CDP1802, 1750000)
34   MCFG_CPU_ADD("maincpu", CDP1801, 2000000)
11935   MCFG_CPU_PROGRAM_MAP(microkit_mem)
12036   MCFG_CPU_IO_MAP(microkit_io)
12137   MCFG_COSMAC_WAIT_CALLBACK(VCC)
122   MCFG_COSMAC_CLEAR_CALLBACK(READLINE(microkit_state, clear_r))
123
124   /* video hardware */
125   MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, "keyboard")
126   MCFG_RS232_RXD_HANDLER(DEVWRITELINE("maincpu", cosmac_device, ef4_w))
127   MCFG_DEVICE_CARD_DEVICE_INPUT_DEFAULTS("keyboard", serial_keyb)
128   MCFG_DEVICE_ADD("terminal", GENERIC_TERMINAL, 0)
12938MACHINE_CONFIG_END
13039
13140ROM_START( microkit )
trunk/src/mame/includes/equites.h
r250155r250156
2020      m_bg_videoram(*this, "bg_videoram"),
2121      m_spriteram(*this, "spriteram"),
2222      m_spriteram_2(*this, "spriteram_2"),
23      m_workram(*this, "workram"),
2324      m_mcuram(*this, "mcuram"),
2425      m_maincpu(*this, "maincpu"),
2526      m_audiocpu(*this, "audiocpu"),
r250155r250156
3940   UINT8 *m_fg_videoram;    // 8bits
4041   required_shared_ptr<UINT16> m_spriteram;
4142   optional_shared_ptr<UINT16> m_spriteram_2;
43   optional_shared_ptr<UINT16> m_workram;
4244   optional_shared_ptr<UINT8> m_mcuram;
4345
4446   /* video-related */
r250155r250156
6365   float     m_cymvol;
6466   float     m_hihatvol;
6567   int       m_timer_count;
66   int       m_gekisou_unknown_bit;
68   int       m_unknown_bit;    // Gekisou special handling
6769
6870   /* devices */
6971   required_device<cpu_device> m_maincpu;
r250155r250156
8385   DECLARE_WRITE8_MEMBER(equites_dac_latch_w);
8486   DECLARE_WRITE8_MEMBER(equites_8155_portb_w);
8587   DECLARE_WRITE8_MEMBER(equites_8155_w);
86   DECLARE_WRITE16_MEMBER(gekisou_unknown_bit_w);
88   DECLARE_WRITE16_MEMBER(gekisou_unknown_0_w);
89   DECLARE_WRITE16_MEMBER(gekisou_unknown_1_w);
8790   DECLARE_READ16_MEMBER(equites_spriteram_kludge_r);
8891   DECLARE_READ8_MEMBER(mcu_ram_r);
8992   DECLARE_WRITE8_MEMBER(mcu_ram_w);
r250155r250156
99102   DECLARE_WRITE8_MEMBER(equites_flipb_w);
100103   DECLARE_WRITE16_MEMBER(splndrbt_bg_scrollx_w);
101104   DECLARE_WRITE16_MEMBER(splndrbt_bg_scrolly_w);
102   DECLARE_CUSTOM_INPUT_MEMBER(gekisou_unknown_bit_r);
105   DECLARE_CUSTOM_INPUT_MEMBER(gekisou_unknown_status);
103106   DECLARE_WRITE8_MEMBER(equites_8910porta_w);
104107   DECLARE_WRITE8_MEMBER(equites_8910portb_w);
108   DECLARE_DRIVER_INIT(bullfgtr);
109   DECLARE_DRIVER_INIT(kouyakyu);
110   DECLARE_DRIVER_INIT(gekisou);
105111   DECLARE_DRIVER_INIT(splndrbt);
106112   DECLARE_DRIVER_INIT(equites);
107113   TILE_GET_INFO_MEMBER(equites_fg_info);
108114   TILE_GET_INFO_MEMBER(splndrbt_fg_info);
109115   TILE_GET_INFO_MEMBER(equites_bg_info);
110116   TILE_GET_INFO_MEMBER(splndrbt_bg_info);
117   DECLARE_MACHINE_START(equites);
118   DECLARE_MACHINE_RESET(equites);
111119   DECLARE_VIDEO_START(equites);
112120   DECLARE_PALETTE_INIT(equites);
113121   DECLARE_VIDEO_START(splndrbt);
r250155r250156
119127   TIMER_DEVICE_CALLBACK_MEMBER(equites_scanline);
120128   TIMER_DEVICE_CALLBACK_MEMBER(splndrbt_scanline);
121129   DECLARE_WRITE_LINE_MEMBER(equites_msm5232_gate);
122   void equites_draw_sprites_block(bitmap_ind16 &bitmap, const rectangle &cliprect, int start, int end);
130   void equites_draw_sprites_block( bitmap_ind16 &bitmap, const rectangle &cliprect, int start, int end );
123131   void equites_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
124   void splndrbt_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
125   void splndrbt_copy_bg(bitmap_ind16 &dst_bitmap, const rectangle &cliprect);
126   void equites_update_dac();
127   void unpack_block(const char *region, int offset, int size);
128   void unpack_region(const char *region);
129
130   virtual void machine_start();
131   virtual void machine_reset();
132   void splndrbt_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
133   void splndrbt_copy_bg( bitmap_ind16 &dst_bitmap, const rectangle &cliprect );
134   void equites_update_dac(  );
135   void unpack_block( const char *region, int offset, int size );
136   void unpack_region( const char *region );
132137};
trunk/src/mame/includes/imds2.h
r250155r250156
1616#include "machine/i8271.h"
1717#include "imagedev/flopdrv.h"
1818#include "bus/centronics/ctronics.h"
19#include "machine/i8251.h"
1920
2021class imds2_state : public driver_device
2122{
r250155r250156
3031   DECLARE_READ8_MEMBER(imds2_ipclocpic_r);
3132   DECLARE_WRITE8_MEMBER(imds2_ipcsyspic_w);
3233   DECLARE_WRITE8_MEMBER(imds2_ipclocpic_w);
34   DECLARE_WRITE_LINE_MEMBER(imds2_baud_clk_0_w);
35   DECLARE_WRITE_LINE_MEMBER(imds2_baud_clk_1_w);
3336
3437   DECLARE_WRITE8_MEMBER(imds2_miscout_w);
3538   DECLARE_READ8_MEMBER(imds2_miscin_r);
r250155r250156
7376   required_device<i8085a_cpu_device> m_ipccpu;
7477   required_device<pic8259_device> m_ipcsyspic;
7578   required_device<pic8259_device> m_ipclocpic;
79   required_device<pit8253_device> m_ipctimer;
80        required_device<i8251_device> m_ipcusart0;
81        required_device<i8251_device> m_ipcusart1;
7682   required_device<i8080a_cpu_device> m_ioccpu;
7783   required_device<i8257_device> m_iocdma;
7884   required_device<i8275_device> m_ioccrtc;
trunk/src/mame/video/equites.c
r250155r250156
230230 *
231231 *************************************/
232232
233void equites_state::equites_draw_sprites_block(bitmap_ind16 &bitmap, const rectangle &cliprect, int start, int end)
233void equites_state::equites_draw_sprites_block( bitmap_ind16 &bitmap, const rectangle &cliprect, int start, int end )
234234{
235235   for (int offs = end - 2; offs >= start; offs -= 2)
236236   {
r250155r250156
30130103020303 03030303 03030303 03030303
302302*/
303303
304void equites_state::splndrbt_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect)
304void equites_state::splndrbt_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect )
305305{
306306   const UINT8 * const xrom = memregion("user2")->base();
307307   const UINT8 * const yrom = xrom + 0x100;
r250155r250156
360360                  if (bx >= cliprect.min_x && bx <= cliprect.max_x)
361361                  {
362362                     int xx = scalex ? (x * 29 + scalex) / (scalex << 1) + 1 : 16;   // FIXME This is wrong. Should use the PROM.
363                     int const offset = (fx ? (31 - xx) : xx) + ((fy ^ yhalf) ? (16 + line) : (15 - line)) * gfx->rowbytes();
363                     int const offset = (fx ? (31 - xx) : xx) + ((fy ^ yhalf) ? (16 + line) : (15 - line) ) * gfx->rowbytes();
364364
365365                     int pen = srcgfx[offset];
366366
r250155r250156
375375}
376376
377377
378void equites_state::splndrbt_copy_bg(bitmap_ind16 &dst_bitmap, const rectangle &cliprect)
378void equites_state::splndrbt_copy_bg( bitmap_ind16 &dst_bitmap, const rectangle &cliprect )
379379{
380380   bitmap_ind16 &src_bitmap = m_bg_tilemap->pixmap();
381381   bitmap_ind8 &flags_bitmap = m_bg_tilemap->flagsmap();


Previous 199869 Revisions Next


© 1997-2024 The MAME Team