Previous 199869 Revisions Next

r34568 Friday 23rd January, 2015 at 20:23:52 UTC by Angelo Salese
Planning.
[/branches/kale/src/emu/drivers]xtal.h
[/branches/kale/src/mess/drivers]c65.c

branches/kale/src/emu/drivers/xtal.h
r243079r243080
5757   XTAL_2_5MHz         = 2500000,      /* Janken Man units */
5858   XTAL_3MHz           = 3000000,      /* Probably only used to drive 68705 or similar MCUs on 80's Taito PCBs */
5959   XTAL_3_12MHz        = 3120000,      /* SP0250 clock on Gottlieb games */
60   XTAL_3_5MHz         = 3500000,      /* Reported by Commodore 65 document, true xtal unchecked on PCB */
6061   XTAL_3_52128MHz     = 3521280,      /* RCA COSMAC VIP */
6162   XTAL_3_579545MHz    = 3579545,      /* NTSC color subcarrier, extremely common, used on 100's of PCBs (Keytronic custom part #48-300-010 is equivalent) */
6263   XTAL_3_6864MHz      = 3686400,      /* CPS3 */
branches/kale/src/mess/drivers/c65.c
r243079r243080
66
77Attempt at rewriting the driver ...
88
9Note:
10- VIC-4567 will be eventually be added via compile switch, once that I
11  get the hang of the system (and checking where the old code fails
12  eventually)
13
914***************************************************************************/
1015
1116
1217#include "emu.h"
1318#include "cpu/m6502/m4510.h"
1419
15#define MAIN_CLOCK XTAL_8MHz
20#define MAIN_CLOCK XTAL_3_5MHz
1621
1722class c65_state : public driver_device
1823{
1924public:
2025   c65_state(const machine_config &mconfig, device_type type, const char *tag)
2126      : driver_device(mconfig, type, tag),
22         m_maincpu(*this, "maincpu")
27         m_maincpu(*this, "maincpu"),
28         m_screen(*this, "screen")
2329   { }
2430
2531   // devices
2632   required_device<cpu_device> m_maincpu;
33   required_device<screen_device> m_screen;
34   DECLARE_READ8_MEMBER(vic4567_dummy_r);
35   DECLARE_WRITE8_MEMBER(vic4567_dummy_w);
2736
2837   // screen updates
2938   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
r243079r243080
4756   return 0;
4857}
4958
59READ8_MEMBER(c65_state::vic4567_dummy_r)
60{
61   UINT8 res;
62
63   res=0xff;
64   switch(offset)
65   {
66      case 0x11:
67         res = (m_screen->vpos() & 0x100) >> 1;
68         return res;
69      case 0x12:
70         res = (m_screen->vpos() & 0xff);
71         return res;
72   }
73   
74   printf("%02x\n",offset); // TODO: PC
75   return res;
76}
77
78WRITE8_MEMBER(c65_state::vic4567_dummy_w)
79{
80   switch(offset)
81   {
82      /* KEY register, handles vic-iii and vic-ii modes via two consecutive writes
83        0xa5 -> 0x96 vic-iii mode
84          any other write vic-ii mode
85        */
86      //case 0x2f: break;
87      default: printf("%02x %02x\n",offset,data); break;
88   }
89
90}
91
5092static ADDRESS_MAP_START( c65_map, AS_PROGRAM, 8, c65_state )
5193   AM_RANGE(0x00000, 0x01fff) AM_RAM // TODO: bank
5294   AM_RANGE(0x0c800, 0x0cfff) AM_ROM AM_REGION("maincpu", 0xc800)
95   AM_RANGE(0x0d000, 0x0d07f) AM_READWRITE(vic4567_dummy_r,vic4567_dummy_w)
5396   // 0x0d000, 0x0d07f VIC-4567
5497   // 0x0d080, 0x0d09f FDC
5598   // 0x0d0a0, 0x0d0ff Ram Expansion Control (REC)
r243079r243080
143186static MACHINE_CONFIG_START( c65, c65_state )
144187
145188   /* basic machine hardware */
146   MCFG_CPU_ADD("maincpu",M4510,MAIN_CLOCK/2)
189   MCFG_CPU_ADD("maincpu",M4510,MAIN_CLOCK)
147190   MCFG_CPU_PROGRAM_MAP(c65_map)
148191
149192   /* video hardware */
r243079r243080
153196   MCFG_SCREEN_UPDATE_DRIVER(c65_state, screen_update)
154197//  MCFG_SCREEN_SIZE(32*8, 32*8)
155198//  MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 32*8-1)
156   MCFG_SCREEN_RAW_PARAMS(MAIN_CLOCK/2, 442, 0, 320, 264, 0, 240) /* generic NTSC video timing, change accordingly */
199   MCFG_SCREEN_RAW_PARAMS(MAIN_CLOCK, 525, 0, 320, 525, 0, 240) // mods needed
157200   MCFG_SCREEN_PALETTE("palette")
158201
159202   MCFG_PALETTE_ADD("palette", 0x100)


Previous 199869 Revisions Next


© 1997-2024 The MAME Team