Previous 199869 Revisions Next

r19854 Thursday 27th December, 2012 at 12:10:06 UTC by Robbbert
(MESS) Pasopia7: fixed keyboard (nw)
- a few keys are assigned wrongly
- fdc disabled for now, to allow bootup
[src/mess/drivers]pasopia7.c

trunk/src/mess/drivers/pasopia7.c
r19853r19854
55    preliminary driver by Angelo Salese
66
77    TODO:
8    - Z80PIO keyboard irqs doesn't work at all, kludged keyboard inputs to work for now
98    - floppy support (but floppy images are unobtainable at current time)
109    - cassette device;
1110    - beeper
1211    - LCD version has gfx bugs, it must use a different ROM charset for instance (apparently a 8 x 4
1312      one, 40/80 x 8 tilemap);
1413
14    Reading fdc has been commented out, until the code can be modified to
15    work with new upd765 (was causing a hang at boot).
16
1517***************************************************************************************************/
1618
1719#include "emu.h"
r19853r19854
113115   UINT32 screen_update_pasopia7(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
114116
115117   void fdc_irq(bool state);
118   TIMER_CALLBACK_MEMBER(pio_timer);
116119};
117120
118121#define VDP_CLOCK XTAL_3_579545MHz/4
119122#define LCD_CLOCK VDP_CLOCK/10
120123
124// needed to scan the keyboard, as the pio emulation doesn't do it.
125TIMER_CALLBACK_MEMBER(pasopia7_state::pio_timer)
126{
127   m_pio->port_b_write(keyb_r(generic_space(),0,0xff));
128}
129
121130VIDEO_START_MEMBER(pasopia7_state,pasopia7)
122131{
123132   m_p7_pal = auto_alloc_array(machine(), UINT8, 0x10);
124133}
125134
126#define keyb_press(_val_,_charset_) \
127   if(machine.input().code_pressed(_val_)) \
128   { \
129      ram_space->write_byte(0xfda4,0x01); \
130      ram_space->write_byte(0xfce1,_charset_); \
131   } \
132
133#define keyb_shift_press(_val_,_charset_) \
134   if(machine.input().code_pressed(_val_) && machine.input().code_pressed(KEYCODE_LSHIFT)) \
135   { \
136      ram_space->write_byte(0xfda4,0x01); \
137      ram_space->write_byte(0xfce1,_charset_); \
138   } \
139
140
141135static void draw_cg4_screen(running_machine &machine, bitmap_ind16 &bitmap,const rectangle &cliprect,int width)
142136{
143137   UINT8 *vram = machine.root_device().memregion("vram")->base();
r19853r19854
618612//  else if(io_port == 0x3b)                    { SN2 }
619613//  else if(io_port == 0x3c)                    { bankswitch }
620614   else
621   if(io_port >= 0xe0 && io_port <= 0xe6)
622      return pasopia7_fdc_r(space, offset & 7);
623   else
615//   if(io_port >= 0xe0 && io_port <= 0xe6)
616//      return pasopia7_fdc_r(space, offset & 7);
617//   else
624618   {
625619      logerror("(PC=%06x) Read i/o address %02x\n",m_maincpu->pc(),io_port);
626620   }
r19853r19854
11081102{
11091103
11101104   m_screen_type = 1;
1105   machine().scheduler().timer_pulse(attotime::from_hz(500), timer_expired_delegate(FUNC(pasopia7_state::pio_timer),this));
11111106}
11121107
11131108DRIVER_INIT_MEMBER(pasopia7_state,p7_lcd)
11141109{
11151110
11161111   m_screen_type = 0;
1112   machine().scheduler().timer_pulse(attotime::from_hz(500), timer_expired_delegate(FUNC(pasopia7_state::pio_timer),this));
11171113}
11181114
11191115
11201116/* Driver */
11211117
1122COMP( 1983, pasopia7,    0,              0,       p7_raster,     pasopia7, pasopia7_state,   p7_raster,  "Toshiba", "Pasopia 7 (Raster)", GAME_NOT_WORKING )
1123COMP( 1983, pasopia7lcd, pasopia7,       0,       p7_lcd,        pasopia7, pasopia7_state,   p7_lcd,     "Toshiba", "Pasopia 7 (LCD)", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS )
1118COMP( 1983, pasopia7,    0,        0,       p7_raster,     pasopia7, pasopia7_state,   p7_raster,  "Toshiba", "Pasopia 7 (Raster)", GAME_NOT_WORKING )
1119COMP( 1983, pasopia7lcd, pasopia7, 0,       p7_lcd,        pasopia7, pasopia7_state,   p7_lcd,     "Toshiba", "Pasopia 7 (LCD)", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS )

Previous 199869 Revisions Next


© 1997-2024 The MAME Team