mirror of
https://github.com/holub/mame
synced 2025-07-05 09:57:47 +03:00
(MESS) Pasopia7: fixed keyboard (nw)
- a few keys are assigned wrongly - fdc disabled for now, to allow bootup
This commit is contained in:
parent
eb48a1b23d
commit
888b1a5aac
@ -5,13 +5,15 @@
|
|||||||
preliminary driver by Angelo Salese
|
preliminary driver by Angelo Salese
|
||||||
|
|
||||||
TODO:
|
TODO:
|
||||||
- Z80PIO keyboard irqs doesn't work at all, kludged keyboard inputs to work for now
|
|
||||||
- floppy support (but floppy images are unobtainable at current time)
|
- floppy support (but floppy images are unobtainable at current time)
|
||||||
- cassette device;
|
- cassette device;
|
||||||
- beeper
|
- beeper
|
||||||
- LCD version has gfx bugs, it must use a different ROM charset for instance (apparently a 8 x 4
|
- LCD version has gfx bugs, it must use a different ROM charset for instance (apparently a 8 x 4
|
||||||
one, 40/80 x 8 tilemap);
|
one, 40/80 x 8 tilemap);
|
||||||
|
|
||||||
|
Reading fdc has been commented out, until the code can be modified to
|
||||||
|
work with new upd765 (was causing a hang at boot).
|
||||||
|
|
||||||
***************************************************************************************************/
|
***************************************************************************************************/
|
||||||
|
|
||||||
#include "emu.h"
|
#include "emu.h"
|
||||||
@ -113,31 +115,23 @@ public:
|
|||||||
UINT32 screen_update_pasopia7(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
UINT32 screen_update_pasopia7(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||||
|
|
||||||
void fdc_irq(bool state);
|
void fdc_irq(bool state);
|
||||||
|
TIMER_CALLBACK_MEMBER(pio_timer);
|
||||||
};
|
};
|
||||||
|
|
||||||
#define VDP_CLOCK XTAL_3_579545MHz/4
|
#define VDP_CLOCK XTAL_3_579545MHz/4
|
||||||
#define LCD_CLOCK VDP_CLOCK/10
|
#define LCD_CLOCK VDP_CLOCK/10
|
||||||
|
|
||||||
|
// needed to scan the keyboard, as the pio emulation doesn't do it.
|
||||||
|
TIMER_CALLBACK_MEMBER(pasopia7_state::pio_timer)
|
||||||
|
{
|
||||||
|
m_pio->port_b_write(keyb_r(generic_space(),0,0xff));
|
||||||
|
}
|
||||||
|
|
||||||
VIDEO_START_MEMBER(pasopia7_state,pasopia7)
|
VIDEO_START_MEMBER(pasopia7_state,pasopia7)
|
||||||
{
|
{
|
||||||
m_p7_pal = auto_alloc_array(machine(), UINT8, 0x10);
|
m_p7_pal = auto_alloc_array(machine(), UINT8, 0x10);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define keyb_press(_val_,_charset_) \
|
|
||||||
if(machine.input().code_pressed(_val_)) \
|
|
||||||
{ \
|
|
||||||
ram_space->write_byte(0xfda4,0x01); \
|
|
||||||
ram_space->write_byte(0xfce1,_charset_); \
|
|
||||||
} \
|
|
||||||
|
|
||||||
#define keyb_shift_press(_val_,_charset_) \
|
|
||||||
if(machine.input().code_pressed(_val_) && machine.input().code_pressed(KEYCODE_LSHIFT)) \
|
|
||||||
{ \
|
|
||||||
ram_space->write_byte(0xfda4,0x01); \
|
|
||||||
ram_space->write_byte(0xfce1,_charset_); \
|
|
||||||
} \
|
|
||||||
|
|
||||||
|
|
||||||
static void draw_cg4_screen(running_machine &machine, bitmap_ind16 &bitmap,const rectangle &cliprect,int width)
|
static void draw_cg4_screen(running_machine &machine, bitmap_ind16 &bitmap,const rectangle &cliprect,int width)
|
||||||
{
|
{
|
||||||
UINT8 *vram = machine.root_device().memregion("vram")->base();
|
UINT8 *vram = machine.root_device().memregion("vram")->base();
|
||||||
@ -618,9 +612,9 @@ READ8_MEMBER( pasopia7_state::pasopia7_io_r )
|
|||||||
// else if(io_port == 0x3b) { SN2 }
|
// else if(io_port == 0x3b) { SN2 }
|
||||||
// else if(io_port == 0x3c) { bankswitch }
|
// else if(io_port == 0x3c) { bankswitch }
|
||||||
else
|
else
|
||||||
if(io_port >= 0xe0 && io_port <= 0xe6)
|
// if(io_port >= 0xe0 && io_port <= 0xe6)
|
||||||
return pasopia7_fdc_r(space, offset & 7);
|
// return pasopia7_fdc_r(space, offset & 7);
|
||||||
else
|
// else
|
||||||
{
|
{
|
||||||
logerror("(PC=%06x) Read i/o address %02x\n",m_maincpu->pc(),io_port);
|
logerror("(PC=%06x) Read i/o address %02x\n",m_maincpu->pc(),io_port);
|
||||||
}
|
}
|
||||||
@ -1108,12 +1102,14 @@ DRIVER_INIT_MEMBER(pasopia7_state,p7_raster)
|
|||||||
{
|
{
|
||||||
|
|
||||||
m_screen_type = 1;
|
m_screen_type = 1;
|
||||||
|
machine().scheduler().timer_pulse(attotime::from_hz(500), timer_expired_delegate(FUNC(pasopia7_state::pio_timer),this));
|
||||||
}
|
}
|
||||||
|
|
||||||
DRIVER_INIT_MEMBER(pasopia7_state,p7_lcd)
|
DRIVER_INIT_MEMBER(pasopia7_state,p7_lcd)
|
||||||
{
|
{
|
||||||
|
|
||||||
m_screen_type = 0;
|
m_screen_type = 0;
|
||||||
|
machine().scheduler().timer_pulse(attotime::from_hz(500), timer_expired_delegate(FUNC(pasopia7_state::pio_timer),this));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user