mirror of
https://github.com/holub/mame
synced 2025-10-06 09:00:04 +03:00
Merge branch 'master' of https://github.com/mamedev/mame.git
This commit is contained in:
commit
ccf953911f
@ -650,6 +650,11 @@ ifdef MSVC_BUILD
|
||||
else
|
||||
ifeq ($(TARGETOS),win32)
|
||||
BGFXINC += -I$(3RDPARTY)/bx/include/compat/mingw
|
||||
ifeq ($(PTR64),1)
|
||||
BGFXINC += -L$(3RDPARTY)/dxsdk/lib/x64 -D_WIN32_WINNT=0x601
|
||||
else
|
||||
BGFXINC += -L$(3RDPARTY)/dxsdk/lib/x86 -D_WIN32_WINNT=0x601
|
||||
endif
|
||||
endif
|
||||
ifeq ($(TARGETOS),freebsd)
|
||||
BGFXINC += -I$(3RDPARTY)/bx/include/compat/freebsd
|
||||
@ -661,11 +666,6 @@ endif
|
||||
|
||||
ifeq ($(TARGETOS),win32)
|
||||
BGFXINC += -I$(3RDPARTY)/dxsdk/Include
|
||||
ifeq ($(PTR64),1)
|
||||
BGFXINC += -L$(3RDPARTY)/dxsdk/lib/x64 -D_WIN32_WINNT=0x601
|
||||
else
|
||||
BGFXINC += -L$(3RDPARTY)/dxsdk/lib/x86 -D_WIN32_WINNT=0x601
|
||||
endif
|
||||
endif
|
||||
|
||||
$(LIBOBJ)/bgfx/%.o: $(3RDPARTY)/bgfx/src/%.cpp | $(OSPREBUILD)
|
||||
|
@ -91,11 +91,11 @@ static ADDRESS_MAP_START( toki_map, AS_PROGRAM, 16, toki_state )
|
||||
AM_RANGE(0x060000, 0x06d7ff) AM_RAM
|
||||
AM_RANGE(0x06d800, 0x06dfff) AM_RAM AM_SHARE("spriteram")
|
||||
AM_RANGE(0x06e000, 0x06e7ff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette")
|
||||
AM_RANGE(0x06e800, 0x06efff) AM_RAM_WRITE(toki_background1_videoram16_w) AM_SHARE("bg1_vram16")
|
||||
AM_RANGE(0x06f000, 0x06f7ff) AM_RAM_WRITE(toki_background2_videoram16_w) AM_SHARE("bg2_vram16")
|
||||
AM_RANGE(0x06f800, 0x06ffff) AM_RAM_WRITE(toki_foreground_videoram16_w) AM_SHARE("videoram")
|
||||
AM_RANGE(0x06e800, 0x06efff) AM_RAM_WRITE(background1_videoram_w) AM_SHARE("bg1_vram")
|
||||
AM_RANGE(0x06f000, 0x06f7ff) AM_RAM_WRITE(background2_videoram_w) AM_SHARE("bg2_vram")
|
||||
AM_RANGE(0x06f800, 0x06ffff) AM_RAM_WRITE(foreground_videoram_w) AM_SHARE("videoram")
|
||||
AM_RANGE(0x080000, 0x08000d) AM_DEVREADWRITE("seibu_sound", seibu_sound_device, main_word_r, main_word_w)
|
||||
AM_RANGE(0x0a0000, 0x0a005f) AM_WRITE(toki_control_w) AM_SHARE("scrollram16")
|
||||
AM_RANGE(0x0a0000, 0x0a005f) AM_WRITE(toki_control_w) AM_SHARE("scrollram")
|
||||
AM_RANGE(0x0c0000, 0x0c0001) AM_READ_PORT("DSW")
|
||||
AM_RANGE(0x0c0002, 0x0c0003) AM_READ_PORT("INPUTS")
|
||||
AM_RANGE(0x0c0004, 0x0c0005) AM_READ_PORT("SYSTEM")
|
||||
@ -106,16 +106,16 @@ static ADDRESS_MAP_START( tokib_map, AS_PROGRAM, 16, toki_state )
|
||||
AM_RANGE(0x000000, 0x05ffff) AM_ROM
|
||||
AM_RANGE(0x060000, 0x06dfff) AM_RAM
|
||||
AM_RANGE(0x06e000, 0x06e7ff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette")
|
||||
AM_RANGE(0x06e800, 0x06efff) AM_RAM_WRITE(toki_background1_videoram16_w) AM_SHARE("bg1_vram16")
|
||||
AM_RANGE(0x06f000, 0x06f7ff) AM_RAM_WRITE(toki_background2_videoram16_w) AM_SHARE("bg2_vram16")
|
||||
AM_RANGE(0x06f800, 0x06ffff) AM_RAM_WRITE(toki_foreground_videoram16_w) AM_SHARE("videoram")
|
||||
AM_RANGE(0x06e800, 0x06efff) AM_RAM_WRITE(background1_videoram_w) AM_SHARE("bg1_vram")
|
||||
AM_RANGE(0x06f000, 0x06f7ff) AM_RAM_WRITE(background2_videoram_w) AM_SHARE("bg2_vram")
|
||||
AM_RANGE(0x06f800, 0x06ffff) AM_RAM_WRITE(foreground_videoram_w) AM_SHARE("videoram")
|
||||
AM_RANGE(0x071000, 0x071001) AM_WRITENOP /* sprite related? seems another scroll register */
|
||||
/* gets written the same value as 75000a (bg2 scrollx) */
|
||||
AM_RANGE(0x071804, 0x071807) AM_WRITENOP /* sprite related, always 01be0100 */
|
||||
AM_RANGE(0x07180e, 0x071e45) AM_WRITEONLY AM_SHARE("spriteram")
|
||||
AM_RANGE(0x072000, 0x072001) AM_READ(watchdog_reset16_r) /* probably */
|
||||
AM_RANGE(0x075000, 0x075001) AM_WRITE(tokib_soundcommand16_w)
|
||||
AM_RANGE(0x075004, 0x07500b) AM_WRITEONLY AM_SHARE("scrollram16")
|
||||
AM_RANGE(0x075004, 0x07500b) AM_WRITEONLY AM_SHARE("scrollram")
|
||||
AM_RANGE(0x0c0000, 0x0c0001) AM_READ_PORT("DSW")
|
||||
AM_RANGE(0x0c0002, 0x0c0003) AM_READ_PORT("INPUTS")
|
||||
AM_RANGE(0x0c0004, 0x0c0005) AM_READ_PORT("SYSTEM")
|
||||
@ -826,6 +826,9 @@ DRIVER_INIT_MEMBER(toki_state,tokib)
|
||||
memcpy (&base[0x18000 + i * 0x800], &temp[0x1800 + i * 0x2000], 0x800);
|
||||
}
|
||||
}
|
||||
|
||||
save_item(NAME(m_msm5205next));
|
||||
save_item(NAME(m_toggle));
|
||||
}
|
||||
|
||||
DRIVER_INIT_MEMBER(toki_state,jujuba)
|
||||
@ -877,15 +880,15 @@ DRIVER_INIT_MEMBER(toki_state,jujuba)
|
||||
|
||||
|
||||
// these 2 are both unique revisions
|
||||
GAME( 1989, toki, 0, toki, toki, toki_state, toki, ROT0, "TAD Corporation", "Toki (World, set 1)", 0 )
|
||||
GAME( 1989, tokiu, toki, toki, toki, toki_state, toki, ROT0, "TAD Corporation (Fabtek license)", "Toki (US, set 1)", 0 )
|
||||
GAME( 1989, toki, 0, toki, toki, toki_state, toki, ROT0, "TAD Corporation", "Toki (World, set 1)", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1989, tokiu, toki, toki, toki, toki_state, toki, ROT0, "TAD Corporation (Fabtek license)", "Toki (US, set 1)", GAME_SUPPORTS_SAVE )
|
||||
|
||||
// these 3 are all the same revision, only the region byte differs
|
||||
GAME( 1989, tokia, toki, toki, toki, toki_state, toki, ROT0, "TAD Corporation", "Toki (World, set 2)", 0 )
|
||||
GAME( 1989, tokiua,toki, toki, toki, toki_state, toki, ROT0, "TAD Corporation (Fabtek license)", "Toki (US, set 2)", 0 )
|
||||
GAME( 1989, juju, toki, toki, toki, toki_state, toki, ROT0, "TAD Corporation", "JuJu Densetsu (Japan)", 0 )
|
||||
GAME( 1989, tokia, toki, toki, toki, toki_state, toki, ROT0, "TAD Corporation", "Toki (World, set 2)", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1989, tokiua,toki, toki, toki, toki_state, toki, ROT0, "TAD Corporation (Fabtek license)", "Toki (US, set 2)", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1989, juju, toki, toki, toki, toki_state, toki, ROT0, "TAD Corporation", "JuJu Densetsu (Japan)", GAME_SUPPORTS_SAVE )
|
||||
|
||||
GAME( 1990, tokib, toki, tokib, tokib, toki_state, tokib, ROT0, "bootleg (Datsu)", "Toki (Datsu bootleg)", 0 )
|
||||
GAME( 1990, jujub, toki, tokib, tokib, toki_state, tokib, ROT0, "bootleg (Playmark)", "JuJu Densetsu (Playmark bootleg)", 0 )
|
||||
GAME( 1990, tokib, toki, tokib, tokib, toki_state, tokib, ROT0, "bootleg (Datsu)", "Toki (Datsu bootleg)", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1990, jujub, toki, tokib, tokib, toki_state, tokib, ROT0, "bootleg (Playmark)", "JuJu Densetsu (Playmark bootleg)", GAME_SUPPORTS_SAVE )
|
||||
/* Sound hardware seems to have been slightly modified, the coins are handled ok, but there is no music and bad sfx. Program roms have a slight bitswap, Flipscreen also seems to be ignored */
|
||||
GAME( 1989, jujuba, toki, toki, toki, toki_state, jujuba, ROT180, "bootleg", "JuJu Densetsu (Japan, bootleg)", GAME_IMPERFECT_SOUND ) // bootleg of tokia/juju revison
|
||||
GAME( 1989, jujuba, toki, toki, toki, toki_state, jujuba, ROT180, "bootleg", "JuJu Densetsu (Japan, bootleg)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) // bootleg of tokia/juju revison
|
||||
|
@ -7,24 +7,18 @@ class toki_state : public driver_device
|
||||
public:
|
||||
toki_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_spriteram(*this, "spriteram") ,
|
||||
m_background1_videoram16(*this, "bg1_vram16"),
|
||||
m_background2_videoram16(*this, "bg2_vram16"),
|
||||
m_videoram(*this, "videoram"),
|
||||
m_scrollram16(*this, "scrollram16"),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_audiocpu(*this, "audiocpu"),
|
||||
m_seibu_sound(*this, "seibu_sound"),
|
||||
m_msm(*this, "msm"),
|
||||
m_gfxdecode(*this, "gfxdecode"),
|
||||
m_screen(*this, "screen"),
|
||||
m_palette(*this, "palette") { }
|
||||
|
||||
required_device<buffered_spriteram16_device> m_spriteram;
|
||||
required_shared_ptr<UINT16> m_background1_videoram16;
|
||||
required_shared_ptr<UINT16> m_background2_videoram16;
|
||||
required_shared_ptr<UINT16> m_videoram;
|
||||
required_shared_ptr<UINT16> m_scrollram16;
|
||||
m_palette(*this, "palette"),
|
||||
m_spriteram(*this, "spriteram") ,
|
||||
m_background1_videoram(*this, "bg1_vram"),
|
||||
m_background2_videoram(*this, "bg2_vram"),
|
||||
m_videoram(*this, "videoram"),
|
||||
m_scrollram(*this, "scrollram") { }
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<cpu_device> m_audiocpu;
|
||||
@ -34,30 +28,41 @@ public:
|
||||
required_device<screen_device> m_screen;
|
||||
required_device<palette_device> m_palette;
|
||||
|
||||
required_device<buffered_spriteram16_device> m_spriteram;
|
||||
required_shared_ptr<UINT16> m_background1_videoram;
|
||||
required_shared_ptr<UINT16> m_background2_videoram;
|
||||
required_shared_ptr<UINT16> m_videoram;
|
||||
required_shared_ptr<UINT16> m_scrollram;
|
||||
|
||||
int m_msm5205next;
|
||||
int m_toggle;
|
||||
|
||||
tilemap_t *m_background_layer;
|
||||
tilemap_t *m_foreground_layer;
|
||||
tilemap_t *m_text_layer;
|
||||
|
||||
DECLARE_WRITE16_MEMBER(tokib_soundcommand16_w);
|
||||
DECLARE_READ16_MEMBER(pip16_r);
|
||||
DECLARE_WRITE8_MEMBER(toki_adpcm_data_w);
|
||||
DECLARE_WRITE16_MEMBER(toki_control_w);
|
||||
DECLARE_WRITE16_MEMBER(toki_foreground_videoram16_w);
|
||||
DECLARE_WRITE16_MEMBER(toki_background1_videoram16_w);
|
||||
DECLARE_WRITE16_MEMBER(toki_background2_videoram16_w);
|
||||
DECLARE_WRITE16_MEMBER(foreground_videoram_w);
|
||||
DECLARE_WRITE16_MEMBER(background1_videoram_w);
|
||||
DECLARE_WRITE16_MEMBER(background2_videoram_w);
|
||||
DECLARE_WRITE8_MEMBER(toki_adpcm_control_w);
|
||||
DECLARE_WRITE8_MEMBER(toki_adpcm_data_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(toki_adpcm_int);
|
||||
|
||||
DECLARE_DRIVER_INIT(tokib);
|
||||
DECLARE_DRIVER_INIT(jujuba);
|
||||
DECLARE_DRIVER_INIT(toki);
|
||||
|
||||
TILE_GET_INFO_MEMBER(get_text_tile_info);
|
||||
TILE_GET_INFO_MEMBER(get_back_tile_info);
|
||||
TILE_GET_INFO_MEMBER(get_fore_tile_info);
|
||||
|
||||
virtual void video_start();
|
||||
|
||||
UINT32 screen_update_toki(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
UINT32 screen_update_tokib(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
void toki_draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect);
|
||||
void tokib_draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect);
|
||||
DECLARE_WRITE_LINE_MEMBER(toki_adpcm_int);
|
||||
};
|
||||
|
@ -29,7 +29,7 @@ remove all the code writing the $a0000 area.)
|
||||
WRITE16_MEMBER(toki_state::toki_control_w)
|
||||
{
|
||||
m_screen->update_partial(m_screen->vpos() - 1);
|
||||
COMBINE_DATA(&m_scrollram16[offset]);
|
||||
COMBINE_DATA(&m_scrollram[offset]);
|
||||
}
|
||||
|
||||
TILE_GET_INFO_MEMBER(toki_state::get_text_tile_info)
|
||||
@ -48,7 +48,7 @@ TILE_GET_INFO_MEMBER(toki_state::get_text_tile_info)
|
||||
|
||||
TILE_GET_INFO_MEMBER(toki_state::get_back_tile_info)
|
||||
{
|
||||
int tile = m_background1_videoram16[tile_index];
|
||||
int tile = m_background1_videoram[tile_index];
|
||||
int color = (tile >> 12) & 0xf;
|
||||
|
||||
tile &= 0xfff;
|
||||
@ -61,7 +61,7 @@ TILE_GET_INFO_MEMBER(toki_state::get_back_tile_info)
|
||||
|
||||
TILE_GET_INFO_MEMBER(toki_state::get_fore_tile_info)
|
||||
{
|
||||
int tile = m_background2_videoram16[tile_index];
|
||||
int tile = m_background2_videoram[tile_index];
|
||||
int color = (tile >> 12) & 0xf;
|
||||
|
||||
tile &= 0xfff;
|
||||
@ -92,22 +92,22 @@ void toki_state::video_start()
|
||||
|
||||
/*************************************/
|
||||
|
||||
WRITE16_MEMBER(toki_state::toki_foreground_videoram16_w)
|
||||
WRITE16_MEMBER(toki_state::foreground_videoram_w)
|
||||
{
|
||||
UINT16 *videoram = m_videoram;
|
||||
COMBINE_DATA(&videoram[offset]);
|
||||
m_text_layer->mark_tile_dirty(offset);
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(toki_state::toki_background1_videoram16_w)
|
||||
WRITE16_MEMBER(toki_state::background1_videoram_w)
|
||||
{
|
||||
COMBINE_DATA(&m_background1_videoram16[offset]);
|
||||
COMBINE_DATA(&m_background1_videoram[offset]);
|
||||
m_background_layer->mark_tile_dirty(offset);
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(toki_state::toki_background2_videoram16_w)
|
||||
WRITE16_MEMBER(toki_state::background2_videoram_w)
|
||||
{
|
||||
COMBINE_DATA(&m_background2_videoram16[offset]);
|
||||
COMBINE_DATA(&m_background2_videoram[offset]);
|
||||
m_foreground_layer->mark_tile_dirty(offset);
|
||||
}
|
||||
|
||||
@ -249,25 +249,25 @@ UINT32 toki_state::screen_update_toki(screen_device &screen, bitmap_ind16 &bitma
|
||||
{
|
||||
int background_y_scroll,foreground_y_scroll,background_x_scroll,foreground_x_scroll;
|
||||
|
||||
background_x_scroll=((m_scrollram16[0x06] &0x7f) << 1)
|
||||
|((m_scrollram16[0x06] &0x80) >> 7)
|
||||
|((m_scrollram16[0x05] &0x10) << 4);
|
||||
background_y_scroll=((m_scrollram16[0x0d]&0x10)<<4)+((m_scrollram16[0x0e]&0x7f)<<1)+((m_scrollram16[0x0e]&0x80)>>7);
|
||||
background_x_scroll=((m_scrollram[0x06] &0x7f) << 1)
|
||||
|((m_scrollram[0x06] &0x80) >> 7)
|
||||
|((m_scrollram[0x05] &0x10) << 4);
|
||||
background_y_scroll=((m_scrollram[0x0d]&0x10)<<4)+((m_scrollram[0x0e]&0x7f)<<1)+((m_scrollram[0x0e]&0x80)>>7);
|
||||
|
||||
m_background_layer->set_scrollx(0, background_x_scroll );
|
||||
m_background_layer->set_scrolly(0, background_y_scroll );
|
||||
|
||||
foreground_x_scroll= ((m_scrollram16[0x16] &0x7f) << 1)
|
||||
|((m_scrollram16[0x16] &0x80) >> 7)
|
||||
|((m_scrollram16[0x15] &0x10) << 4);
|
||||
foreground_y_scroll=((m_scrollram16[0x1d]&0x10)<<4)+((m_scrollram16[0x1e]&0x7f)<<1)+((m_scrollram16[0x1e]&0x80)>>7);
|
||||
foreground_x_scroll= ((m_scrollram[0x16] &0x7f) << 1)
|
||||
|((m_scrollram[0x16] &0x80) >> 7)
|
||||
|((m_scrollram[0x15] &0x10) << 4);
|
||||
foreground_y_scroll=((m_scrollram[0x1d]&0x10)<<4)+((m_scrollram[0x1e]&0x7f)<<1)+((m_scrollram[0x1e]&0x80)>>7);
|
||||
|
||||
m_foreground_layer->set_scrollx(0, foreground_x_scroll );
|
||||
m_foreground_layer->set_scrolly(0, foreground_y_scroll );
|
||||
|
||||
flip_screen_set((m_scrollram16[0x28]&0x8000)==0);
|
||||
flip_screen_set((m_scrollram[0x28]&0x8000)==0);
|
||||
|
||||
if (m_scrollram16[0x28]&0x100) {
|
||||
if (m_scrollram[0x28]&0x100) {
|
||||
m_background_layer->draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE,0);
|
||||
m_foreground_layer->draw(screen, bitmap, cliprect, 0,0);
|
||||
} else {
|
||||
@ -283,12 +283,12 @@ UINT32 toki_state::screen_update_tokib(screen_device &screen, bitmap_ind16 &bitm
|
||||
{
|
||||
m_foreground_layer->set_scroll_rows(1);
|
||||
m_background_layer->set_scroll_rows(1);
|
||||
m_background_layer->set_scrolly(0, m_scrollram16[0]+1 );
|
||||
m_background_layer->set_scrollx(0, m_scrollram16[1]-0x103 );
|
||||
m_foreground_layer->set_scrolly(0, m_scrollram16[2]+1 );
|
||||
m_foreground_layer->set_scrollx(0, m_scrollram16[3]-0x101 );
|
||||
m_background_layer->set_scrolly(0, m_scrollram[0]+1 );
|
||||
m_background_layer->set_scrollx(0, m_scrollram[1]-0x103 );
|
||||
m_foreground_layer->set_scrolly(0, m_scrollram[2]+1 );
|
||||
m_foreground_layer->set_scrollx(0, m_scrollram[3]-0x101 );
|
||||
|
||||
if (m_scrollram16[3]&0x2000) {
|
||||
if (m_scrollram[3]&0x2000) {
|
||||
m_background_layer->draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE,0);
|
||||
m_foreground_layer->draw(screen, bitmap, cliprect, 0,0);
|
||||
} else {
|
||||
|
@ -20,6 +20,7 @@ Note:
|
||||
|
||||
#include "emu.h"
|
||||
#include "cpu/m6502/m4510.h"
|
||||
#include "machine/mos6526.h"
|
||||
|
||||
#define MAIN_CLOCK XTAL_3_5MHz
|
||||
|
||||
@ -29,6 +30,8 @@ public:
|
||||
c65_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_cia0(*this, "cia_0"),
|
||||
m_cia1(*this, "cia_1"),
|
||||
m_screen(*this, "screen"),
|
||||
m_palette(*this, "palette"),
|
||||
m_workram(*this, "wram"),
|
||||
@ -42,6 +45,8 @@ public:
|
||||
|
||||
// devices
|
||||
required_device<m4510_device> m_maincpu;
|
||||
required_device<mos6526_device> m_cia0;
|
||||
required_device<mos6526_device> m_cia1;
|
||||
required_device<screen_device> m_screen;
|
||||
required_device<palette_device> m_palette;
|
||||
required_shared_ptr<UINT8> m_workram;
|
||||
@ -53,7 +58,8 @@ public:
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
|
||||
UINT8 *m_iplrom;
|
||||
|
||||
UINT8 m_keyb_input[10];
|
||||
UINT8 m_keyb_mux;
|
||||
|
||||
DECLARE_READ8_MEMBER(vic4567_dummy_r);
|
||||
DECLARE_WRITE8_MEMBER(vic4567_dummy_w);
|
||||
@ -63,9 +69,14 @@ public:
|
||||
DECLARE_WRITE8_MEMBER(DMAgic_w);
|
||||
DECLARE_READ8_MEMBER(CIASelect_r);
|
||||
DECLARE_WRITE8_MEMBER(CIASelect_w);
|
||||
DECLARE_READ8_MEMBER(cia0_porta_r);
|
||||
DECLARE_WRITE8_MEMBER(cia0_porta_w);
|
||||
DECLARE_READ8_MEMBER(cia0_portb_r);
|
||||
DECLARE_WRITE8_MEMBER(cia0_portb_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(cia0_irq);
|
||||
|
||||
DECLARE_READ8_MEMBER(dummy_r);
|
||||
|
||||
|
||||
// screen updates
|
||||
UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
DECLARE_PALETTE_INIT(c65);
|
||||
@ -89,6 +100,7 @@ private:
|
||||
UINT8 m_VIC3_ControlB;
|
||||
void PalEntryFlush(UINT8 offset);
|
||||
void DMAgicExecute(address_space &space,UINT32 address);
|
||||
void IRQCheck(UINT8 irq_cause);
|
||||
int inner_x_char(int xoffs);
|
||||
int inner_y_char(int yoffs);
|
||||
};
|
||||
@ -154,10 +166,17 @@ READ8_MEMBER(c65_state::vic4567_dummy_r)
|
||||
case 0x12:
|
||||
res = (m_screen->vpos() & 0xff);
|
||||
return res;
|
||||
case 0x20:
|
||||
return m_VIC2_EXTColor;
|
||||
case 0x15:
|
||||
return 0xff; // silence log for now
|
||||
case 0x19:
|
||||
return m_VIC2_IRQPend;
|
||||
|
||||
case 0x1a:
|
||||
return m_VIC2_IRQMask;
|
||||
|
||||
case 0x20:
|
||||
return m_VIC2_EXTColor;
|
||||
|
||||
case 0x30:
|
||||
return m_VIC3_ControlA;
|
||||
case 0x31:
|
||||
@ -174,10 +193,12 @@ WRITE8_MEMBER(c65_state::vic4567_dummy_w)
|
||||
switch(offset)
|
||||
{
|
||||
case 0x19:
|
||||
m_VIC2_IRQPend = data & 0x8f;
|
||||
m_VIC2_IRQPend &= ~data;
|
||||
IRQCheck(0);
|
||||
break;
|
||||
case 0x1a:
|
||||
m_VIC2_IRQMask = data & 0xf;
|
||||
IRQCheck(0);
|
||||
break;
|
||||
case 0x20:
|
||||
m_VIC2_EXTColor = data & 0xf;
|
||||
@ -307,6 +328,17 @@ READ8_MEMBER(c65_state::CIASelect_r)
|
||||
else
|
||||
{
|
||||
// CIA at 0xdc00
|
||||
switch((offset & 0x700) | 0x800)
|
||||
{
|
||||
case 0xc00:
|
||||
return m_cia0->read(space,offset);
|
||||
case 0xd00:
|
||||
return m_cia1->read(space,offset);
|
||||
default:
|
||||
printf("Unknown I/O access read to offset %04x\n",offset);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return 0xff;
|
||||
@ -319,10 +351,57 @@ WRITE8_MEMBER(c65_state::CIASelect_w)
|
||||
else
|
||||
{
|
||||
// CIA at 0xdc00
|
||||
switch((offset & 0x700) | 0x800)
|
||||
{
|
||||
case 0xc00:
|
||||
m_cia0->write(space,offset,data);
|
||||
break;
|
||||
|
||||
case 0xd00:
|
||||
m_cia1->write(space,offset,data);
|
||||
break;
|
||||
default:
|
||||
printf("Unknown I/O access write to offset %04x data = %02x\n",offset,data);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
READ8_MEMBER(c65_state::cia0_porta_r)
|
||||
{
|
||||
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
READ8_MEMBER(c65_state::cia0_portb_r)
|
||||
{
|
||||
static const char *const c64ports[] = { "ROW0", "ROW1", "ROW2", "ROW3", "ROW4", "ROW5", "ROW6", "ROW7" };
|
||||
UINT8 res;
|
||||
|
||||
res = 0xff;
|
||||
for(int i=0;i<8;i++)
|
||||
{
|
||||
|
||||
m_keyb_input[i] = machine().root_device().ioport(c64ports[i])->read();
|
||||
|
||||
if(m_keyb_mux & 1 << (i))
|
||||
res &= m_keyb_input[i];
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(c65_state::cia0_porta_w)
|
||||
{
|
||||
m_keyb_mux = ~data;
|
||||
printf("%02x\n",m_keyb_mux);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(c65_state::cia0_portb_w)
|
||||
{
|
||||
}
|
||||
|
||||
READ8_MEMBER(c65_state::dummy_r)
|
||||
{
|
||||
return 0;
|
||||
@ -357,59 +436,86 @@ ADDRESS_MAP_END
|
||||
|
||||
|
||||
static INPUT_PORTS_START( c65 )
|
||||
/* dummy active high structure */
|
||||
PORT_START("SYSA")
|
||||
PORT_DIPNAME( 0x01, 0x00, "SYSA" )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x01, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x02, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x04, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x08, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x20, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x40, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x80, DEF_STR( On ) )
|
||||
PORT_START( "ROW0" )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Crsr Down Up") PORT_CODE(KEYCODE_RALT) PORT_CHAR(UCHAR_MAMEKEY(DOWN)) PORT_CHAR(UCHAR_MAMEKEY(UP))
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F3) PORT_CHAR(UCHAR_MAMEKEY(F5))
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F2) PORT_CHAR(UCHAR_MAMEKEY(F3))
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(F1))
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F4) PORT_CHAR(UCHAR_MAMEKEY(F7))
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Crsr Right Left") PORT_CODE(KEYCODE_RCONTROL) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) PORT_CHAR(UCHAR_MAMEKEY(LEFT))
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Return") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13)
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("INST DEL") PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8) PORT_CHAR(UCHAR_MAMEKEY(INSERT))
|
||||
|
||||
PORT_START( "ROW1" )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Shift (Left)") PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_E) PORT_CHAR('E')
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_S) PORT_CHAR('S')
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Z) PORT_CHAR('Z')
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$')
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_A) PORT_CHAR('A')
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_W) PORT_CHAR('W')
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#')
|
||||
|
||||
PORT_START( "ROW2" )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_X) PORT_CHAR('X')
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_T) PORT_CHAR('T')
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F) PORT_CHAR('F')
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_C) PORT_CHAR('C')
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('&')
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_D) PORT_CHAR('D')
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_R) PORT_CHAR('R')
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%')
|
||||
|
||||
PORT_START( "ROW3" )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_V) PORT_CHAR('V')
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_U) PORT_CHAR('U')
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_H) PORT_CHAR('H')
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_B) PORT_CHAR('B')
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('(')
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_G) PORT_CHAR('G')
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Y) PORT_CHAR('Y')
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('\'')
|
||||
|
||||
PORT_START( "ROW4" )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_N) PORT_CHAR('N')
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_O) PORT_CHAR('O')
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_K) PORT_CHAR('K')
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_M) PORT_CHAR('M')
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0) PORT_CHAR('0')
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J) PORT_CHAR('J')
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_I) PORT_CHAR('I')
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR(')')
|
||||
|
||||
PORT_START( "ROW5" )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<')
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('@')
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COLON) PORT_CHAR(':') PORT_CHAR('[')
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>')
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('-')
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_L) PORT_CHAR('L')
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_P) PORT_CHAR('P')
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('+')
|
||||
|
||||
PORT_START( "ROW6" )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?')
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("\xE2\x86\x91 Pi") PORT_CODE(KEYCODE_DEL) PORT_CHAR(0x2191) PORT_CHAR(0x03C0)
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('=')
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Shift (Right)") PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("CLR HOME") PORT_CODE(KEYCODE_INSERT) PORT_CHAR(UCHAR_MAMEKEY(HOME))
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(';') PORT_CHAR(']')
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR('*')
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSLASH2) PORT_CHAR('\xA3')
|
||||
|
||||
PORT_START( "ROW7" )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("RUN STOP") PORT_CODE(KEYCODE_HOME)
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) PORT_CHAR('Q')
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("CBM") PORT_CODE(KEYCODE_LALT)
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ')
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('"')
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_TAB) PORT_CHAR(UCHAR_SHIFT_2)
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("\xE2\x86\x90") PORT_CODE(KEYCODE_TILDE) PORT_CHAR(0x2190)
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!')
|
||||
|
||||
/* dummy active low structure */
|
||||
PORT_START("DSWA")
|
||||
PORT_DIPNAME( 0x01, 0x01, "DSWA" )
|
||||
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
@ -445,12 +551,37 @@ static GFXDECODE_START( c65 )
|
||||
GFXDECODE_ENTRY( "maincpu", 0xd000, charlayout, 0, 16 ) // another identical copy is at 0x9000
|
||||
GFXDECODE_END
|
||||
|
||||
void c65_state::IRQCheck(UINT8 irq_cause)
|
||||
{
|
||||
m_VIC2_IRQPend |= (irq_cause != 0) ? 0x80 : 0x00;
|
||||
m_VIC2_IRQPend |= irq_cause;
|
||||
|
||||
m_maincpu->set_input_line(M4510_IRQ_LINE,m_VIC2_IRQMask & m_VIC2_IRQPend ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
INTERRUPT_GEN_MEMBER(c65_state::vic3_vblank_irq)
|
||||
{
|
||||
IRQCheck(1);
|
||||
//if(m_VIC2_IRQMask & 1)
|
||||
// m_maincpu->set_input_line(M4510_IRQ_LINE,HOLD_LINE);
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER(c65_state::cia0_irq)
|
||||
{
|
||||
printf("%d IRQ\n",state);
|
||||
|
||||
#if 0
|
||||
if(state)
|
||||
{
|
||||
static const char *const c64ports[] = { "ROW0", "ROW1", "ROW2", "ROW3", "ROW4", "ROW5", "ROW6", "ROW7" };
|
||||
for(int i=0;i<8;i++)
|
||||
m_keyb_input[i] = machine().root_device().ioport(c64ports[i])->read();
|
||||
}
|
||||
#endif
|
||||
// m_cia0_irq = state;
|
||||
// c65_irq(state || m_vicirq);
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_START( c65, c65_state )
|
||||
|
||||
/* basic machine hardware */
|
||||
@ -458,6 +589,21 @@ static MACHINE_CONFIG_START( c65, c65_state )
|
||||
MCFG_CPU_PROGRAM_MAP(c65_map)
|
||||
MCFG_CPU_VBLANK_INT_DRIVER("screen",c65_state,vic3_vblank_irq)
|
||||
|
||||
MCFG_DEVICE_ADD("cia_0", MOS6526, MAIN_CLOCK)
|
||||
MCFG_MOS6526_TOD(60)
|
||||
MCFG_MOS6526_IRQ_CALLBACK(WRITELINE(c65_state, cia0_irq))
|
||||
MCFG_MOS6526_PA_INPUT_CALLBACK(READ8(c65_state, cia0_porta_r))
|
||||
MCFG_MOS6526_PA_OUTPUT_CALLBACK(WRITE8(c65_state, cia0_porta_w))
|
||||
MCFG_MOS6526_PB_INPUT_CALLBACK(READ8(c65_state, cia0_portb_r))
|
||||
MCFG_MOS6526_PB_OUTPUT_CALLBACK(WRITE8(c65_state, cia0_portb_w))
|
||||
|
||||
MCFG_DEVICE_ADD("cia_1", MOS6526, MAIN_CLOCK)
|
||||
MCFG_MOS6526_TOD(60)
|
||||
// MCFG_MOS6526_IRQ_CALLBACK(WRITELINE(c65_state, c65_cia1_interrupt))
|
||||
// MCFG_MOS6526_PA_INPUT_CALLBACK(READ8(c65_state, c65_cia1_port_a_r))
|
||||
// MCFG_MOS6526_PA_OUTPUT_CALLBACK(WRITE8(c65_state, c65_cia1_port_a_w))
|
||||
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
// MCFG_SCREEN_REFRESH_RATE(60)
|
||||
|
Loading…
Reference in New Issue
Block a user