mirror of
https://github.com/holub/mame
synced 2025-04-16 13:34:55 +03:00
Merge pull request #604 from jfdelnero/master
New video and machine drivers : EF9364 and SMT Goupil G1 [Jean-François DEL NERO]
This commit is contained in:
commit
891007f5bc
@ -154,6 +154,18 @@ if (VIDEOS["EF9345"]~=null) then
|
||||
}
|
||||
end
|
||||
|
||||
--------------------------------------------------
|
||||
--
|
||||
--@src/devices/video/ef9364.h,VIDEOS["EF9364"] = true
|
||||
--------------------------------------------------
|
||||
|
||||
if (VIDEOS["EF9364"]~=null) then
|
||||
files {
|
||||
MAME_DIR .. "src/devices/video/ef9364.cpp",
|
||||
MAME_DIR .. "src/devices/video/ef9364.h",
|
||||
}
|
||||
end
|
||||
|
||||
--------------------------------------------------
|
||||
--
|
||||
--@src/devices/video/ef9365.h,VIDEOS["EF9365"] = true
|
||||
|
@ -275,6 +275,7 @@ VIDEOS["BUFSPRITE"] = true
|
||||
VIDEOS["DM9368"] = true
|
||||
--VIDEOS["EF9340_1"] = true
|
||||
--VIDEOS["EF9345"] = true
|
||||
--VIDEOS["EF9364"] = true
|
||||
--VIDEOS["EF9365"] = true
|
||||
--VIDEOS["GF4500"] = true
|
||||
VIDEOS["GF7600GS"] = true
|
||||
|
@ -273,6 +273,7 @@ VIDEOS["DL1416"] = true
|
||||
VIDEOS["DM9368"] = true
|
||||
VIDEOS["EF9340_1"] = true
|
||||
VIDEOS["EF9345"] = true
|
||||
VIDEOS["EF9364"] = true
|
||||
VIDEOS["EF9365"] = true
|
||||
VIDEOS["GF4500"] = true
|
||||
--VIDEOS+= EPIC12"] = true
|
||||
@ -3084,6 +3085,7 @@ files {
|
||||
MAME_DIR .. "src/mame/audio/gamate.cpp",
|
||||
MAME_DIR .. "src/mame/drivers/gameking.cpp",
|
||||
MAME_DIR .. "src/mame/drivers/gimix.cpp",
|
||||
MAME_DIR .. "src/mame/drivers/goupil.cpp",
|
||||
MAME_DIR .. "src/mame/drivers/grfd2301.cpp",
|
||||
MAME_DIR .. "src/mame/drivers/harriet.cpp",
|
||||
MAME_DIR .. "src/mame/drivers/hprot1.cpp",
|
||||
|
359
src/devices/video/ef9364.cpp
Normal file
359
src/devices/video/ef9364.cpp
Normal file
@ -0,0 +1,359 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Jean-Francois DEL NERO
|
||||
|
||||
/*********************************************************************
|
||||
|
||||
ef9364.cpp
|
||||
|
||||
Thomson EF9364 / Sescosem SFF96364 video controller emulator code
|
||||
|
||||
This circuit is a simple black and white 8x8 character generator.
|
||||
It display 64 columns * 16 rows text page.
|
||||
It is able to do automatic text scrolling, page erase.
|
||||
The characters font is stored into an external 1KB EPROM.
|
||||
|
||||
To see how to use this driver, have a look to the Goupil machine
|
||||
driver (goupil.cpp).
|
||||
If you have any question or remark, don't hesitate to contact me
|
||||
at the email present on this website : http://hxc2001.free.fr/
|
||||
|
||||
01/20/2016
|
||||
Jean-Francois DEL NERO
|
||||
*********************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "ef9364.h"
|
||||
|
||||
// devices
|
||||
const device_type EF9364 = &device_creator<ef9364_device>;
|
||||
|
||||
//-------------------------------------------------
|
||||
// default address map
|
||||
//-------------------------------------------------
|
||||
static ADDRESS_MAP_START( ef9364, AS_0, 8, ef9364_device )
|
||||
AM_RANGE(0x00000, ( ( EF9364_TXTPLANE_MAX_SIZE * EF9364_MAX_TXTPLANES ) - 1 ) ) AM_RAM
|
||||
ADDRESS_MAP_END
|
||||
|
||||
//-------------------------------------------------
|
||||
// memory_space_config - return a description of
|
||||
// any address spaces owned by this device
|
||||
//-------------------------------------------------
|
||||
|
||||
const address_space_config *ef9364_device::memory_space_config(address_spacenum spacenum) const
|
||||
{
|
||||
return (spacenum == AS_0) ? &m_space_config : NULL;
|
||||
}
|
||||
|
||||
//**************************************************************************
|
||||
// INLINE HELPERS
|
||||
//**************************************************************************
|
||||
|
||||
//**************************************************************************
|
||||
// live device
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// ef9364_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
ef9364_device::ef9364_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
||||
device_t(mconfig, EF9364, "EF9364", tag, owner, clock, "ef9364", __FILE__),
|
||||
device_memory_interface(mconfig, *this),
|
||||
device_video_interface(mconfig, *this),
|
||||
m_space_config("textram", ENDIANNESS_LITTLE, 8, 12, 0, nullptr, *ADDRESS_MAP_NAME(ef9364)),
|
||||
m_palette(*this)
|
||||
{
|
||||
clock_freq = clock;
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// static_set_palette_tag: Set the tag of the
|
||||
// palette device
|
||||
//-------------------------------------------------
|
||||
|
||||
void ef9364_device::static_set_palette_tag(device_t &device, const char *tag)
|
||||
{
|
||||
downcast<ef9364_device &>(device).m_palette.set_tag(tag);
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// static_set_nb_of_pages: Set the number of hardware pages
|
||||
//-------------------------------------------------
|
||||
|
||||
void ef9364_device::static_set_nb_of_pages(device_t &device, int nb_of_pages )
|
||||
{
|
||||
if( nb_of_pages > 0 && nb_of_pages <= 8 )
|
||||
{
|
||||
downcast<ef9364_device &>(device).nb_of_pages = nb_of_pages;
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// set_color_entry: Set the color value
|
||||
// into the palette
|
||||
//-------------------------------------------------
|
||||
|
||||
void ef9364_device::set_color_entry( int index, UINT8 r, UINT8 g, UINT8 b )
|
||||
{
|
||||
if( index < 2 )
|
||||
{
|
||||
palette[index] = rgb_t(r, g, b);
|
||||
}
|
||||
else
|
||||
{
|
||||
logerror("Invalid EF9364 Palette entry : %02x\n", index);
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void ef9364_device::device_start()
|
||||
{
|
||||
m_textram = &space(0);
|
||||
m_charset = region();
|
||||
|
||||
bitplane_xres = EF9364_NB_OF_COLUMNS*8;
|
||||
bitplane_yres = EF9364_NB_OF_ROWS*(8+4);
|
||||
|
||||
vsync_scanline_pos = 250;
|
||||
|
||||
// Default palette : Black and white
|
||||
palette[0] = rgb_t(0, 0, 0);
|
||||
palette[1] = rgb_t(255, 255, 255);
|
||||
|
||||
m_screen_out.allocate( bitplane_xres, m_screen->height() );
|
||||
|
||||
cursor_cnt = 0;
|
||||
cursor_state = 0;
|
||||
|
||||
save_item(NAME(m_border));
|
||||
|
||||
save_item(NAME(m_screen_out));
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_reset - device-specific reset
|
||||
//-------------------------------------------------
|
||||
|
||||
void ef9364_device::device_reset()
|
||||
{
|
||||
int i;
|
||||
|
||||
x_curs_pos = 0;
|
||||
y_curs_pos = 0;
|
||||
|
||||
char_latch = 0x00;
|
||||
|
||||
for(i=0;i<EF9364_NB_OF_COLUMNS * EF9364_NB_OF_ROWS * nb_of_pages;i++)
|
||||
{
|
||||
m_textram->write_byte ( i , 0x7F );
|
||||
}
|
||||
|
||||
memset(m_border, 0, sizeof(m_border));
|
||||
|
||||
m_screen_out.fill(0);
|
||||
|
||||
set_video_mode();
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// set_video_mode: Set output screen format
|
||||
//-------------------------------------------------
|
||||
|
||||
void ef9364_device::set_video_mode(void)
|
||||
{
|
||||
UINT16 new_width = bitplane_xres;
|
||||
|
||||
if (m_screen->width() != new_width)
|
||||
{
|
||||
rectangle visarea = m_screen->visible_area();
|
||||
visarea.max_x = new_width - 1;
|
||||
|
||||
m_screen->configure(new_width, m_screen->height(), visarea, m_screen->frame_period().attoseconds());
|
||||
}
|
||||
|
||||
//border color
|
||||
memset(m_border, 0, sizeof(m_border));
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// draw_border: Draw the left and right borders
|
||||
// ( No border for the moment ;) )
|
||||
//-------------------------------------------------
|
||||
|
||||
void ef9364_device::draw_border(UINT16 line)
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// screen_update: Framebuffer video ouput
|
||||
//-------------------------------------------------
|
||||
|
||||
UINT32 ef9364_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
int x,y,r;
|
||||
unsigned char c;
|
||||
|
||||
for( r = 0 ; r < EF9364_NB_OF_ROWS ; r++ )
|
||||
{
|
||||
for( y = 0 ; y < 8 ; y++ )
|
||||
{
|
||||
for( x = 0 ; x < EF9364_NB_OF_COLUMNS * 8 ; x++ )
|
||||
{
|
||||
if( ( ( x >> 3 ) != x_curs_pos ) || ( r != y_curs_pos ) || !cursor_state)
|
||||
{
|
||||
c = m_textram->read_byte( ( r * EF9364_NB_OF_COLUMNS ) + ( x>>3 ) );
|
||||
|
||||
if( m_charset->u8(((c&0x7F)<<3) + y ) & (0x80>>(x&7)) )
|
||||
m_screen_out.pix32((r*12)+y, x) = palette[1];
|
||||
else
|
||||
m_screen_out.pix32((r*12)+y, x) = palette[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
if(y != 7)
|
||||
m_screen_out.pix32((r*12)+y, x) = palette[0];
|
||||
else
|
||||
m_screen_out.pix32((r*12)+y, x) = palette[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cursor_cnt = (cursor_cnt + 1) % 13;
|
||||
if(!cursor_cnt)
|
||||
cursor_state ^= 1;
|
||||
|
||||
copybitmap(bitmap, m_screen_out, 0, 0, 0, 0, cliprect);
|
||||
return 0;
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// update_scanline: Scanline callback
|
||||
//-------------------------------------------------
|
||||
|
||||
void ef9364_device::update_scanline(UINT16 scanline)
|
||||
{
|
||||
if (scanline == vsync_scanline_pos)
|
||||
{
|
||||
// vsync
|
||||
}
|
||||
|
||||
if (scanline == 0)
|
||||
{
|
||||
draw_border(0);
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// data_w: Registers write access callback
|
||||
//-------------------------------------------------
|
||||
|
||||
void ef9364_device::command_w(UINT8 cmd)
|
||||
{
|
||||
int x,y,i,j;
|
||||
|
||||
switch( cmd&7 )
|
||||
{
|
||||
case 0x0: // Page Erase & Cursor home
|
||||
for( y=0 ; y < EF9364_NB_OF_ROWS ; y++ )
|
||||
{
|
||||
for( x=0 ; x < EF9364_NB_OF_COLUMNS ; x++ )
|
||||
{
|
||||
m_textram->write_byte ( y * EF9364_NB_OF_COLUMNS + x , 0x7F );
|
||||
}
|
||||
}
|
||||
x_curs_pos = 0;
|
||||
y_curs_pos = 0;
|
||||
break;
|
||||
|
||||
case 0x1: // Erase to end of the line and return cursor
|
||||
for( ; x_curs_pos < EF9364_NB_OF_COLUMNS ; x_curs_pos++ )
|
||||
{
|
||||
m_textram->write_byte ( y_curs_pos * EF9364_NB_OF_COLUMNS + x_curs_pos , 0x7F );
|
||||
}
|
||||
x_curs_pos = 0;
|
||||
break;
|
||||
|
||||
case 0x2: // Line feed
|
||||
y_curs_pos++;
|
||||
if( y_curs_pos >= EF9364_NB_OF_ROWS )
|
||||
{
|
||||
// Scroll
|
||||
for( j = 1 ; j < EF9364_NB_OF_ROWS ; j++ )
|
||||
{
|
||||
for( i = 0 ; i < EF9364_NB_OF_COLUMNS ; i++ )
|
||||
{
|
||||
m_textram->write_byte ( (j-1) * EF9364_NB_OF_COLUMNS + i , m_textram->read_byte ( j * EF9364_NB_OF_COLUMNS + i ) );
|
||||
}
|
||||
}
|
||||
// Erase last line
|
||||
for( i = 0 ; i < EF9364_NB_OF_COLUMNS ; i++ )
|
||||
{
|
||||
m_textram->write_byte ( ( EF9364_NB_OF_ROWS - 1 ) * EF9364_NB_OF_COLUMNS + i , 0x7F );
|
||||
}
|
||||
|
||||
y_curs_pos = EF9364_NB_OF_ROWS - 1;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x3: // Nop
|
||||
|
||||
break;
|
||||
|
||||
case 0x4: // Cursor left
|
||||
if(x_curs_pos)
|
||||
x_curs_pos--;
|
||||
break;
|
||||
|
||||
case 0x5: // Erasure of cursor Line.
|
||||
for( x = 0 ; x < EF9364_NB_OF_COLUMNS ; x++ )
|
||||
{
|
||||
m_textram->write_byte ( y_curs_pos * EF9364_NB_OF_COLUMNS + x , 0x7F );
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x6: // Cursor up
|
||||
if(y_curs_pos)
|
||||
y_curs_pos--;
|
||||
break;
|
||||
|
||||
case 0x7: // Write char
|
||||
if(cmd&0x8)
|
||||
m_textram->write_byte ( y_curs_pos * EF9364_NB_OF_COLUMNS + x_curs_pos , char_latch );
|
||||
|
||||
x_curs_pos++;
|
||||
if( x_curs_pos >= EF9364_NB_OF_COLUMNS )
|
||||
{
|
||||
x_curs_pos=0;
|
||||
y_curs_pos++;
|
||||
if( y_curs_pos >= EF9364_NB_OF_ROWS )
|
||||
{
|
||||
// Scroll
|
||||
for( j = 1 ; j < EF9364_NB_OF_ROWS ; j++ )
|
||||
{
|
||||
for( i = 0 ; i < EF9364_NB_OF_COLUMNS ; i++ )
|
||||
{
|
||||
m_textram->write_byte ( (j-1) * EF9364_NB_OF_COLUMNS + i , m_textram->read_byte ( j * EF9364_NB_OF_COLUMNS + i ) );
|
||||
}
|
||||
}
|
||||
// Erase last line
|
||||
for( i = 0 ; i < EF9364_NB_OF_COLUMNS ; i++ )
|
||||
{
|
||||
m_textram->write_byte ( ( EF9364_NB_OF_ROWS - 1 ) * EF9364_NB_OF_COLUMNS + i , 0x7F );
|
||||
}
|
||||
|
||||
y_curs_pos = EF9364_NB_OF_ROWS - 1;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void ef9364_device::char_latch_w(UINT8 data)
|
||||
{
|
||||
char_latch = data;
|
||||
}
|
104
src/devices/video/ef9364.h
Normal file
104
src/devices/video/ef9364.h
Normal file
@ -0,0 +1,104 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Jean-Francois DEL NERO
|
||||
/*********************************************************************
|
||||
|
||||
ef9364.h
|
||||
|
||||
Thomson EF9364 video controller
|
||||
|
||||
*********************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __EF9364_H__
|
||||
#define __EF9364_H__
|
||||
|
||||
#define EF9364_NB_OF_COLUMNS 64
|
||||
#define EF9364_NB_OF_ROWS 16
|
||||
|
||||
#define EF9364_TXTPLANE_MAX_SIZE ( EF9364_NB_OF_COLUMNS * EF9364_NB_OF_ROWS )
|
||||
#define EF9364_MAX_TXTPLANES 2
|
||||
|
||||
#define MCFG_EF9364_PALETTE(_palette_tag) \
|
||||
ef9364_device::static_set_palette_tag(*device, "^" _palette_tag);
|
||||
|
||||
#define MCFG_EF9364_PAGES_CNT(_pages_number) \
|
||||
ef9364_device::static_set_nb_of_pages(*device,_pages_number);
|
||||
|
||||
#define MCFG_EF9364_IRQ_HANDLER(_devcb) \
|
||||
devcb = &ef9364_device::set_irq_handler(*device, DEVCB_##_devcb);
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
// ======================> ef9364_device
|
||||
|
||||
class ef9364_device : public device_t,
|
||||
public device_memory_interface,
|
||||
public device_video_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
ef9364_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
// static configuration
|
||||
static void static_set_palette_tag(device_t &device, const char *tag);
|
||||
static void static_set_nb_of_pages(device_t &device, int nb_bitplanes );
|
||||
|
||||
// device interface
|
||||
|
||||
void update_scanline(UINT16 scanline);
|
||||
void set_color_entry( int index, UINT8 r, UINT8 g, UINT8 b );
|
||||
|
||||
UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
void char_latch_w(UINT8 data);
|
||||
void command_w(UINT8 cmd);
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
|
||||
// device_config_memory_interface overrides
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
|
||||
|
||||
// address space configurations
|
||||
const address_space_config m_space_config;
|
||||
|
||||
// inline helper
|
||||
|
||||
private:
|
||||
void screen_scanning( int force_clear );
|
||||
void set_video_mode(void);
|
||||
void draw_border(UINT16 line);
|
||||
|
||||
// internal state
|
||||
|
||||
memory_region *m_charset;
|
||||
address_space *m_textram;
|
||||
|
||||
UINT8 x_curs_pos;
|
||||
UINT8 y_curs_pos;
|
||||
UINT8 char_latch;
|
||||
|
||||
UINT8 m_border[80]; //border color
|
||||
|
||||
rgb_t palette[2];
|
||||
int nb_of_pages;
|
||||
int bitplane_xres;
|
||||
int bitplane_yres;
|
||||
int vsync_scanline_pos;
|
||||
int cursor_cnt;
|
||||
int cursor_state;
|
||||
|
||||
UINT32 clock_freq;
|
||||
bitmap_rgb32 m_screen_out;
|
||||
|
||||
required_device<palette_device> m_palette;
|
||||
};
|
||||
|
||||
// device type definition
|
||||
extern const device_type EF9364;
|
||||
|
||||
#endif
|
511
src/mame/drivers/goupil.cpp
Normal file
511
src/mame/drivers/goupil.cpp
Normal file
@ -0,0 +1,511 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Jean-François DEL NERO
|
||||
/***************************************************************************
|
||||
|
||||
SMT Goupil G1 driver
|
||||
|
||||
Current state :
|
||||
|
||||
-> CPU / ROM / RAM working
|
||||
-> Video output working
|
||||
-> Keyboard support working (need to be polished... )
|
||||
-> Floppy FDC not fully implemented.
|
||||
-> Sound support missing.
|
||||
|
||||
Software :
|
||||
-> The Monitor is working
|
||||
-> The internal Basic is working (-> 6800 0xC3 illegal opcode emulation needed).
|
||||
|
||||
02/04/2016
|
||||
Jean-François DEL NERO
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "cpu/m6800/m6800.h"
|
||||
#include "machine/6522via.h"
|
||||
#include "machine/i8279.h"
|
||||
#include "video/ef9364.h"
|
||||
#include "video/mc6845.h"
|
||||
#include "machine/6850acia.h"
|
||||
#include "machine/wd_fdc.h"
|
||||
|
||||
#include "softlist.h"
|
||||
|
||||
#define MAIN_CLOCK XTAL_4MHz
|
||||
#define VIDEO_CLOCK MAIN_CLOCK / 8 /* 1.75 Mhz */
|
||||
#define CPU_CLOCK MAIN_CLOCK / 4 /* 1 Mhz */
|
||||
|
||||
class goupil_g1_state : public driver_device
|
||||
{
|
||||
public:
|
||||
goupil_g1_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag)
|
||||
, m_acia(*this, "ef6850")
|
||||
, m_ef9364(*this, "ef9364")
|
||||
, m_maincpu(*this, "maincpu")
|
||||
, m_via_video(*this, "m_via_video")
|
||||
, m_via_keyb(*this, "m_via_keyb")
|
||||
, m_via_modem(*this, "m_via_modem")
|
||||
, m_fdc(*this, "fd1791")
|
||||
, m_floppy0(*this, "fd1791:0")
|
||||
, m_floppy1(*this, "fd1791:1")
|
||||
, m_floppy(NULL)
|
||||
{ }
|
||||
|
||||
DECLARE_WRITE8_MEMBER(via_video_pba_w);
|
||||
DECLARE_WRITE8_MEMBER(via_video_pbb_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(via_video_ca2_w);
|
||||
|
||||
DECLARE_READ8_MEMBER(kbd1_r);
|
||||
DECLARE_READ8_MEMBER(kbd2_r);
|
||||
DECLARE_READ8_MEMBER(shift_kb1_r);
|
||||
DECLARE_READ8_MEMBER(shift_kb2_r);
|
||||
DECLARE_READ8_MEMBER(ctrl_kb1_r);
|
||||
DECLARE_READ8_MEMBER(ctrl_kb2_r);
|
||||
|
||||
DECLARE_WRITE8_MEMBER(scanlines_kbd1_w);
|
||||
DECLARE_WRITE8_MEMBER(scanlines_kbd2_w);
|
||||
|
||||
DECLARE_READ_LINE_MEMBER(via_keyb_ca2_r);
|
||||
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
|
||||
UINT8 m_row_kbd1;
|
||||
UINT8 m_row_kbd2;
|
||||
int old_state_ca2;
|
||||
UINT8 via_video_pbb_data;
|
||||
UINT8 cnttim;
|
||||
UINT8 valkeyb;
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(goupil_scanline);
|
||||
|
||||
private:
|
||||
required_device<acia6850_device> m_acia;
|
||||
required_device<ef9364_device> m_ef9364;
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<via6522_device> m_via_video;
|
||||
required_device<via6522_device> m_via_keyb;
|
||||
required_device<via6522_device> m_via_modem;
|
||||
required_device<fd1791_t> m_fdc;
|
||||
required_device<floppy_connector> m_floppy0;
|
||||
required_device<floppy_connector> m_floppy1;
|
||||
floppy_image_device *m_floppy;
|
||||
};
|
||||
|
||||
/**********************************
|
||||
* Floppy controller I/O Handlers *
|
||||
***********************************/
|
||||
// TODO
|
||||
|
||||
/**********************************
|
||||
* Keyboard I/O Handlers *
|
||||
***********************************/
|
||||
|
||||
TIMER_DEVICE_CALLBACK_MEMBER( goupil_g1_state::goupil_scanline )
|
||||
{
|
||||
m_ef9364->update_scanline((UINT16)param);
|
||||
}
|
||||
|
||||
static ADDRESS_MAP_START(goupil_mem, AS_PROGRAM, 8, goupil_g1_state)
|
||||
ADDRESS_MAP_UNMAP_HIGH
|
||||
AM_RANGE(0x0000,0x3fff) AM_RAM
|
||||
AM_RANGE(0x4000,0x7fff) AM_RAM
|
||||
AM_RANGE(0xC000,0xE3FF) AM_ROM AM_REGION("maincpu", 0x1000) // Basic ROM (BASIC 1 up to BASIC 9).
|
||||
|
||||
AM_RANGE(0xe400,0xe7ff) AM_RAM
|
||||
AM_RANGE(0xE800,0xE80F) AM_DEVREADWRITE("ef6850", acia6850_device, data_r, data_w)
|
||||
AM_RANGE(0xE810,0xE81F) AM_DEVREADWRITE("m_via_video", via6522_device, read, write)
|
||||
|
||||
AM_RANGE(0xE820,0xE820) AM_DEVREADWRITE("i8279_kb1", i8279_device, data_r, data_w )
|
||||
AM_RANGE(0xE821,0xE821) AM_DEVREADWRITE("i8279_kb1", i8279_device, status_r, cmd_w )
|
||||
|
||||
AM_RANGE(0xE830,0xE830) AM_DEVREADWRITE("i8279_kb2", i8279_device, data_r, data_w )
|
||||
AM_RANGE(0xE831,0xE831) AM_DEVREADWRITE("i8279_kb2", i8279_device, status_r, cmd_w )
|
||||
|
||||
AM_RANGE(0xE840,0xE84F) AM_DEVREADWRITE("m_via_keyb", via6522_device, read, write)
|
||||
|
||||
AM_RANGE(0xE860,0xE86F) AM_DEVREADWRITE("m_via_modem", via6522_device, read, write)
|
||||
|
||||
AM_RANGE(0xe8f0,0xe8ff) AM_DEVREADWRITE("fd1791", fd1791_t, read, write)
|
||||
//AM_RANGE(0xf08a,0xf08a) AM_READWRITE( fdc_sel0_r, fdc_sel0_w )
|
||||
//AM_RANGE(0xf08b,0xf08b) AM_READWRITE( fdc_sel1_r, fdc_sel1_w )
|
||||
|
||||
AM_RANGE(0xf400,0xf7ff) AM_ROM AM_REGION("maincpu", 0x0800) // Modem (MOD 3)
|
||||
AM_RANGE(0xf800,0xffff) AM_ROM AM_REGION("maincpu", 0x0000) // Monitor (MON 1 + MON 2)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( goupil_io, AS_IO, 8, goupil_g1_state)
|
||||
ADDRESS_MAP_UNMAP_HIGH
|
||||
ADDRESS_MAP_END
|
||||
|
||||
WRITE8_MEMBER( goupil_g1_state::scanlines_kbd1_w )
|
||||
{
|
||||
m_row_kbd1 = data;
|
||||
}
|
||||
|
||||
READ8_MEMBER( goupil_g1_state::ctrl_kb1_r )
|
||||
{
|
||||
char kbdrow[6];
|
||||
unsigned char data;
|
||||
|
||||
kbdrow[0] = 'C';
|
||||
kbdrow[1] = 'T';
|
||||
kbdrow[2] = 'R';
|
||||
kbdrow[3] = '0';
|
||||
kbdrow[4] = 0;
|
||||
|
||||
data = ioport(kbdrow)->read();
|
||||
if( data & 0x02 )
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
READ8_MEMBER( goupil_g1_state::ctrl_kb2_r )
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
READ8_MEMBER( goupil_g1_state::shift_kb1_r )
|
||||
{
|
||||
char kbdrow[6];
|
||||
unsigned char data;
|
||||
|
||||
kbdrow[0] = 'C';
|
||||
kbdrow[1] = 'T';
|
||||
kbdrow[2] = 'R';
|
||||
kbdrow[3] = '0';
|
||||
kbdrow[4] = 0;
|
||||
|
||||
data = ioport(kbdrow)->read();
|
||||
if( data & 0x01 )
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
READ8_MEMBER( goupil_g1_state::shift_kb2_r )
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
READ8_MEMBER( goupil_g1_state::kbd1_r )
|
||||
{
|
||||
char kbdrow[6];
|
||||
UINT8 data = 0xff;
|
||||
|
||||
kbdrow[0] = 'A';
|
||||
kbdrow[1] = 'X';
|
||||
kbdrow[2] = '0' + ( m_row_kbd1 & 7 ) ;
|
||||
kbdrow[3] = 0;
|
||||
|
||||
data = ioport(kbdrow)->read();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( goupil_g1_state::scanlines_kbd2_w )
|
||||
{
|
||||
m_row_kbd2 = data & 7;
|
||||
}
|
||||
|
||||
READ_LINE_MEMBER( goupil_g1_state::via_keyb_ca2_r )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
READ8_MEMBER( goupil_g1_state::kbd2_r )
|
||||
{
|
||||
char kbdrow[6];
|
||||
UINT8 data = 0xff;
|
||||
|
||||
kbdrow[0] = 'B';
|
||||
kbdrow[1] = 'X';
|
||||
kbdrow[2] = '0' + ( m_row_kbd2 & 7 ) ;
|
||||
kbdrow[3] = 0;
|
||||
|
||||
data = ioport(kbdrow)->read();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
/* Input ports */
|
||||
static INPUT_PORTS_START( goupil_g1 )
|
||||
PORT_START("AX0")
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z')
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_D) PORT_CHAR('d') PORT_CHAR('D')
|
||||
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_E) PORT_CHAR('e') PORT_CHAR('E')
|
||||
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_S) PORT_CHAR('s') PORT_CHAR('S')
|
||||
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_C) PORT_CHAR('c') PORT_CHAR('C')
|
||||
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('X')
|
||||
PORT_START("AX1")
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_R) PORT_CHAR('r') PORT_CHAR('R')
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_G) PORT_CHAR('g') PORT_CHAR('G')
|
||||
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_T) PORT_CHAR('t') PORT_CHAR('T')
|
||||
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F) PORT_CHAR('f') PORT_CHAR('F')
|
||||
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_CHAR('b') PORT_CHAR('B')
|
||||
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_V) PORT_CHAR('v') PORT_CHAR('V')
|
||||
PORT_START("AX2")
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Y) PORT_CHAR('y') PORT_CHAR('Y')
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_J) PORT_CHAR('j') PORT_CHAR('J')
|
||||
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_U) PORT_CHAR('u') PORT_CHAR('U')
|
||||
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_H) PORT_CHAR('h') PORT_CHAR('H')
|
||||
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('?')
|
||||
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_N) PORT_CHAR('n') PORT_CHAR('N')
|
||||
PORT_START("AX3")
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q')
|
||||
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A')
|
||||
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_W) PORT_CHAR('w') PORT_CHAR('W')
|
||||
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F2)
|
||||
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F3)
|
||||
PORT_START("AX4")
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_I) PORT_CHAR('i') PORT_CHAR('I')
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_L) PORT_CHAR('l') PORT_CHAR('L')
|
||||
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O')
|
||||
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_K) PORT_CHAR('k') PORT_CHAR('K')
|
||||
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_CHAR(':') PORT_CHAR('/')
|
||||
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR('.')
|
||||
PORT_START("AX5")
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("TAB") PORT_CODE(KEYCODE_TAB) PORT_CHAR(UCHAR_MAMEKEY(TAB))
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Return") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13)
|
||||
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("BS") PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8)
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('_')
|
||||
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ')
|
||||
PORT_START("AX6")
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P')
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(0x00F9) PORT_CHAR('%')
|
||||
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_M) PORT_CHAR('m') PORT_CHAR('M')
|
||||
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('=') PORT_CHAR('+')
|
||||
PORT_START("AX7")
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F1)
|
||||
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("CTR0")
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_LSHIFT)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ctrl") PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_SHIFT_2)
|
||||
|
||||
PORT_START("BX0")
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_START("BX1")
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_START("BX2")
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_START("BX3")
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_CHAR('1')
|
||||
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_CHAR('4')
|
||||
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0')
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_CHAR('7')
|
||||
PORT_START("BX4")
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_START("BX5")
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_START("BX6")
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_CHAR('3')
|
||||
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_CHAR('6')
|
||||
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_CHAR('9')
|
||||
PORT_START("BX7")
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_CHAR('2')
|
||||
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_5) PORT_CHAR('5')
|
||||
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_CHAR('8')
|
||||
INPUT_PORTS_END
|
||||
|
||||
static SLOT_INTERFACE_START( goupil_floppies )
|
||||
SLOT_INTERFACE( "525qd", FLOPPY_525_QD )
|
||||
SLOT_INTERFACE_END
|
||||
|
||||
void goupil_g1_state::machine_start()
|
||||
{
|
||||
std::string region_tag;
|
||||
|
||||
m_floppy = NULL;
|
||||
valkeyb = 0xFF;
|
||||
}
|
||||
|
||||
void goupil_g1_state::machine_reset()
|
||||
{
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(goupil_g1_state::via_video_pba_w)
|
||||
{
|
||||
#ifdef DBGMODE
|
||||
printf("%s: write via_video_pba_w reg : 0x%X\n",machine().describe_context(),data);
|
||||
#endif
|
||||
m_ef9364->char_latch_w(data);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(goupil_g1_state::via_video_pbb_w)
|
||||
{
|
||||
#ifdef DBGMODE
|
||||
printf("%s: write via_video_pbb_w reg : 0x%X\n",machine().describe_context(),data);
|
||||
#endif
|
||||
via_video_pbb_data = data;
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER( goupil_g1_state::via_video_ca2_w )
|
||||
{
|
||||
if(old_state_ca2==0 and state==1)
|
||||
{
|
||||
m_ef9364->command_w(via_video_pbb_data&0xF);
|
||||
}
|
||||
old_state_ca2 = state;
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_START( goupil_g1, goupil_g1_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu",M6808, CPU_CLOCK)
|
||||
MCFG_CPU_PROGRAM_MAP(goupil_mem)
|
||||
MCFG_CPU_IO_MAP(goupil_io)
|
||||
|
||||
/* sound hardware */
|
||||
// TODO !
|
||||
|
||||
MCFG_DEVICE_ADD ("ef6850", ACIA6850, 0)
|
||||
|
||||
/* screen */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_REFRESH_RATE(50)
|
||||
MCFG_SCREEN_UPDATE_DEVICE("ef9364", ef9364_device, screen_update)
|
||||
|
||||
MCFG_SCREEN_SIZE((64*8), (16*(8+4)))
|
||||
MCFG_SCREEN_VISIBLE_AREA(0, (64*8)-1, 0, (16*(8+4))-1)
|
||||
MCFG_PALETTE_ADD("palette", 16)
|
||||
|
||||
MCFG_DEVICE_ADD("ef9364", EF9364, VIDEO_CLOCK)
|
||||
MCFG_EF9364_PALETTE("palette")
|
||||
MCFG_EF9364_PAGES_CNT(1);
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("goupil_sl", goupil_g1_state, goupil_scanline, "screen", 0, 10)
|
||||
|
||||
MCFG_DEVICE_ADD("m_via_video", VIA6522, 0)
|
||||
MCFG_VIA6522_WRITEPA_HANDLER(WRITE8(goupil_g1_state, via_video_pba_w))
|
||||
MCFG_VIA6522_WRITEPB_HANDLER(WRITE8(goupil_g1_state, via_video_pbb_w))
|
||||
MCFG_VIA6522_CA2_HANDLER(WRITELINE(goupil_g1_state, via_video_ca2_w))
|
||||
|
||||
MCFG_DEVICE_ADD("m_via_keyb", VIA6522, 0)
|
||||
MCFG_VIA6522_IRQ_HANDLER(DEVWRITELINE("maincpu", m6808_cpu_device, irq_line))
|
||||
|
||||
MCFG_DEVICE_ADD("m_via_modem", VIA6522, 0)
|
||||
MCFG_VIA6522_IRQ_HANDLER(DEVWRITELINE("maincpu", m6808_cpu_device, irq_line))
|
||||
|
||||
/* Floppy */
|
||||
MCFG_FD1791_ADD("fd1791", XTAL_8MHz )
|
||||
MCFG_FLOPPY_DRIVE_ADD("fd1791:0", goupil_floppies, "525qd", floppy_image_device::default_floppy_formats)
|
||||
MCFG_FLOPPY_DRIVE_ADD("fd1791:1", goupil_floppies, "525qd", floppy_image_device::default_floppy_formats)
|
||||
|
||||
MCFG_DEVICE_ADD("i8279_kb1", I8279, CPU_CLOCK)
|
||||
MCFG_I8279_OUT_SL_CB(WRITE8(goupil_g1_state, scanlines_kbd1_w)) // scan SL lines
|
||||
MCFG_I8279_IN_RL_CB(READ8(goupil_g1_state, kbd1_r)) // kbd RL lines
|
||||
MCFG_I8279_IN_SHIFT_CB(READ8(goupil_g1_state, shift_kb1_r))
|
||||
MCFG_I8279_IN_CTRL_CB(READ8(goupil_g1_state, ctrl_kb1_r))
|
||||
MCFG_I8279_OUT_IRQ_CB(DEVWRITELINE("m_via_keyb", via6522_device, write_ca1))
|
||||
|
||||
MCFG_DEVICE_ADD("i8279_kb2", I8279, CPU_CLOCK)
|
||||
MCFG_I8279_OUT_SL_CB(WRITE8(goupil_g1_state, scanlines_kbd2_w)) // scan SL lines
|
||||
MCFG_I8279_IN_RL_CB(READ8(goupil_g1_state, kbd2_r)) // kbd RL lines
|
||||
MCFG_I8279_IN_SHIFT_CB(READ8(goupil_g1_state, shift_kb2_r))
|
||||
MCFG_I8279_IN_CTRL_CB(READ8(goupil_g1_state, ctrl_kb2_r))
|
||||
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
/* ROM definition */
|
||||
ROM_START( goupilg1 )
|
||||
ROM_REGION( 0x10000, "maincpu", 0 )
|
||||
ROM_DEFAULT_BIOS("v1_0")
|
||||
|
||||
ROM_SYSTEM_BIOS(0, "v1_0", "Version 1.0")
|
||||
ROMX_LOAD( "SMT_Goupil_G1_MON_1.bin", 0x0000, 0x0400, CRC(98B7BE69) SHA1(69E83FE78A43FCF2B08FB0BCEFB0D217A57B1ECB), ROM_BIOS(1) )
|
||||
ROM_LOAD ( "SMT_Goupil_G1_MON_2.bin", 0x0400, 0x0400, CRC(19386B81) SHA1(E52F63FD29D374319781E9677DE6D3FD61A3684C) )
|
||||
|
||||
ROM_LOAD( "SMT_Goupil_G1_MOD_3.bin", 0x0800, 0x0400, CRC(E662F152) SHA1(11B91C5737E7572A2C18472B66BBD16B485132D5) )
|
||||
|
||||
ROMX_LOAD( "SMT_Goupil_G1_Basic_1.bin", 0x1000, 0x0400, CRC(AD105B12) SHA1(631CD4B997F76B57BF2509E4BFF30B1595C8BD13), ROM_BIOS(1) )
|
||||
ROMX_LOAD( "SMT_Goupil_G1_Basic_2.bin", 0x1400, 0x0400, CRC(0C5C309C) SHA1(F1CAB4B0F9191E53113790A95F1AB7108F9406A1), ROM_BIOS(1) )
|
||||
ROMX_LOAD( "SMT_Goupil_G1_Basic_3.bin", 0x1800, 0x0400, CRC(1F1EB127) SHA1(DBBB880C79D515ACBFCB2BE9A4C96962F3E4EDEA), ROM_BIOS(1) )
|
||||
ROMX_LOAD( "SMT_Goupil_G1_Basic_4.bin", 0x1C00, 0x0400, CRC(09BE48E4) SHA1(86CAE0D159583C1D572A5754F3BB6B4A2E479359), ROM_BIOS(1) )
|
||||
ROMX_LOAD( "SMT_Goupil_G1_Basic_5.bin", 0x2000, 0x0400, CRC(BDEB395C) SHA1(32A50468F1CA772EE45A1F5C61C66F3ECC774074), ROM_BIOS(1) )
|
||||
ROMX_LOAD( "SMT_Goupil_G1_Basic_6.bin", 0x2400, 0x0400, CRC(850A4000) SHA1(720F0BB3E45877835219B7E1D943EF4F19B9977D), ROM_BIOS(1) )
|
||||
ROMX_LOAD( "SMT_Goupil_G1_Basic_7.bin", 0x2800, 0x0400, CRC(586C7670) SHA1(13E2E96B9F1A53555CE0D55F657CF3C6B96F10A0), ROM_BIOS(1) )
|
||||
ROMX_LOAD( "SMT_Goupil_G1_Basic_8.bin", 0x2C00, 0x0400, CRC(33281300) SHA1(CE631FA8157A3F8869C5FEFE24B7F40E06696DF9), ROM_BIOS(1) )
|
||||
ROMX_LOAD( "SMT_Goupil_G1_Basic_9.bin", 0x3000, 0x0400, CRC(A3911201) SHA1(8623A0A2D83EB3A27A795030643C5C05A4350A9F), ROM_BIOS(1) )
|
||||
|
||||
ROM_REGION( 0x400, "ef9364", 0 )
|
||||
ROM_LOAD( "SMT_Goupil_G1_Charset.bin", 0x0000, 0x0400, CRC(8B6DA54B) SHA1(AC2204600F45C6DD0DF1E759B62ED25928F02A12) )
|
||||
ROM_END
|
||||
|
||||
/* Driver */
|
||||
|
||||
/* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */
|
||||
COMP( 1979, goupilg1, 0, 0, goupil_g1, goupil_g1,driver_device, 0, "SMT", "Goupil G1", MACHINE_IS_SKELETON )
|
@ -2829,6 +2829,7 @@ hp_ipc
|
||||
lggp40
|
||||
mt735
|
||||
squale
|
||||
goupilg1
|
||||
micral
|
||||
rd100
|
||||
proteus3
|
||||
|
Loading…
Reference in New Issue
Block a user