Previous 15994 Revisions Next

r8681 Sunday 1st August, 2010 at 15:42:24 UTC by Angelo Salese
[MYCOM]: Small fixes
[src/mess/drivers]mycom.c

src/mess/drivers/mycom.c
r8680r8681
44
55   preliminary driver by Angelo Salese
66
7   TODO:
8   - SN doesn't seem to work properly, needs to find out what's the WE bit
9     for.
10   - Hook-up FDC and CMT load / save;
11   - Printer
12   - RTC
13
714****************************************************************************/
815
916#include "emu.h"
1017#include "cpu/z80/z80.h"
1118#include "video/mc6845.h"
1219#include "machine/i8255a.h"
20#include "sound/sn76496.h"
1321
1422static UINT16 mycom_amask;
1523static UINT8 ram_bank;
1624static UINT16 vram_addr;
1725static UINT16 cursor_addr,cursor_raster;
1826static UINT8 keyb_press,keyb_press_flag,shift_press_flag;
19static UINT8 video_mode;
27static UINT8 video_mode,sn_we;
2028
2129static VIDEO_START( mycom )
2230{
r8680r8681
354362
355363static WRITE8_DEVICE_HANDLER( vram_laddr_w )
356364{
357   vram_addr = (vram_addr & 0x700) | (data & 0xff);
365   vram_addr = (vram_addr & 0x700) | (data & 0x0ff);
366
367   /* doesn't work? */
368   //printf("%02x %02x\n",data,sn_we);
369   //if(sn_we)
370   //   sn76496_w(device->machine->device("sn1"), 0, data);
358371}
359372
360373static WRITE8_DEVICE_HANDLER( vram_haddr_w )
361374{
362   vram_addr = (vram_addr & 0xff) | ((data & 0x07) << 8);
375   vram_addr = (vram_addr & 0x0ff) | ((data & 0x007) << 8);
363376}
364377
365378static READ8_DEVICE_HANDLER( input_1a )
366379{
367380   /*
381   x--- ---- display flag
368382   ---- --x- keyboard shift
369383   ---- ---x keyboard strobe
370384   */
r8680r8681
395409   /*
396410   x--- ---- width 80/40 (0 = 80, 1 = 40)
397411   -x-- ---- video mode (0= tile, 1 = bitmap)
398   --x- ---- PSG CS bit
399   ---x ---- PSG WE bit
412   --x- ---- PSG Chip Select bit
413   ---x ---- PSG Write Enable bit
400414   ---- x--- cmt remote
401415   ---- -x-- cmt output
402416   ---- --x- printer reset
r8680r8681
404418   */
405419
406420   video_mode = data & 0xc0;
421   sn_we = data & 0x10;
422//   printf("%02x\n",data & 0x10);
407423}
408424
409425static I8255A_INTERFACE( ppi8255_intf_0 )
r8680r8681
521537
522538    MDRV_VIDEO_START(mycom)
523539    MDRV_VIDEO_UPDATE(mycom)
540
541   MDRV_SPEAKER_STANDARD_MONO("mono")
542
543   MDRV_SOUND_ADD("sn1", SN76489A, 1996800) // unknown clock / divider
544   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
524545MACHINE_DRIVER_END
525546
526547/* ROM definition */

Previous 15994 Revisions Next


© 1998-2018 The MESS Team