Previous 15994 Revisions Next

r4377 Tuesday 3rd March, 2009 at 21:20:48 UTC by Wilbert Pol
[PET family] Updated to use the new pia6821 device implementation.
[src/mess/drivers]pet.c
[src/mess/includes]pet.h
[src/mess/machine]pet.c

src/mess/includes/pet.h
r4376r4377
88#define PET_H_
99
1010#include "video/mc6845.h"
11#include "machine/6821new.h"
1112#include "machine/6522via.h"
1213#include "devices/cartslot.h"
1314
r4376r4377
3536
3637extern int pet_font;
3738extern const via6522_interface pet_via;
39extern const pia6821_interface pet_pia0;
40extern const pia6821_interface petb_pia0;
41extern const pia6821_interface pet_pia1;
3842
3943extern UINT8 *pet_memory;
4044extern UINT8 *pet_videoram;
r4376r4377
4650
4751DRIVER_INIT( pet2001 );
4852DRIVER_INIT( pet );
49DRIVER_INIT( petb );
50DRIVER_INIT( pet40 );
5153DRIVER_INIT( pet80 );
5254DRIVER_INIT( superpet );
5355MACHINE_RESET( pet );
src/mess/machine/pet.c
r4376r4377
99#include "cpu/m6809/m6809.h"
1010
1111#include "includes/cbm.h"
12#include "machine/6821pia.h"
12#include "machine/6821new.h"
1313#include "machine/6522via.h"
1414#include "includes/cbmserb.h"
1515#include "includes/cbmieeeb.h"
r4376r4377
7474  cb1 video sync in
7575  cb2 cassette 1 motor out
7676*/
77static READ8_HANDLER ( pet_pia0_port_a_read )
77static READ8_DEVICE_HANDLER ( pet_pia0_port_a_read )
7878{
7979   int data = 0xf0 | pet_keyline_select;
8080
81   if ((cassette_get_state(devtag_get_device(space->machine, CASSETTE, "cassette1")) & CASSETTE_MASK_UISTATE) != CASSETTE_STOPPED)
81   if ((cassette_get_state(devtag_get_device(device->machine, CASSETTE, "cassette1")) & CASSETTE_MASK_UISTATE) != CASSETTE_STOPPED)
8282      data &= ~0x10;
8383
84   if ((cassette_get_state(devtag_get_device(space->machine, CASSETTE, "cassette2")) & CASSETTE_MASK_UISTATE) != CASSETTE_STOPPED)
84   if ((cassette_get_state(devtag_get_device(device->machine, CASSETTE, "cassette2")) & CASSETTE_MASK_UISTATE) != CASSETTE_STOPPED)
8585      data &= ~0x20;
8686
87   if (!cbm_ieee_eoi_r(space->machine))
87   if (!cbm_ieee_eoi_r(device->machine))
8888      data &= ~0x40;
8989
9090   return data;
9191}
9292
93static WRITE8_HANDLER ( pet_pia0_port_a_write )
93static WRITE8_DEVICE_HANDLER ( pet_pia0_port_a_write )
9494{
9595   pet_keyline_select = data & 0x0f;
9696}
9797
9898/* Keyboard reading/handling for regular keyboard */
99static  READ8_HANDLER ( pet_pia0_port_b_read )
99static  READ8_DEVICE_HANDLER ( pet_pia0_port_b_read )
100100{
101101   UINT8 data = 0xff;
102102   static const char *const keynames[] = { "ROW0", "ROW1", "ROW2", "ROW3", "ROW4",
r4376r4377
104104
105105   if (pet_keyline_select < 10)
106106   {
107      data = input_port_read(space->machine, keynames[pet_keyline_select]);
107      data = input_port_read(device->machine, keynames[pet_keyline_select]);
108108      /* Check for left-shift lock */
109      if ((pet_keyline_select == 8) && (input_port_read(space->machine, "SPECIAL") & 0x80))
109      if ((pet_keyline_select == 8) && (input_port_read(device->machine, "SPECIAL") & 0x80))
110110         data &= 0xfe;
111111   }
112112   return data;
113113}
114114
115115/* Keyboard handling for business keyboard */
116static READ8_HANDLER( petb_pia0_port_b_read )
116static READ8_DEVICE_HANDLER( petb_pia0_port_b_read )
117117{
118118   UINT8 data = 0xff;
119   pet_state *state = space->machine->driver_data;
119   pet_state *state = device->machine->driver_data;
120120   static const char *const keynames[] = { "ROW0", "ROW1", "ROW2", "ROW3", "ROW4",
121121                              "ROW5", "ROW6", "ROW7", "ROW8", "ROW9" };
122122
123123   if (pet_keyline_select < 10)
124124   {
125      data = input_port_read(space->machine, keynames[pet_keyline_select]);
125      data = input_port_read(device->machine, keynames[pet_keyline_select]);
126126      /* Check for left-shift lock */
127127      /* 2008-05 FP: For some reason, superpet read it in the opposite way!! */
128128      /* While waiting for confirmation from docs, we add a workaround here. */
129129      if (state->superpet)
130130      {
131         if ((pet_keyline_select == 6) && !(input_port_read(space->machine, "SPECIAL") & 0x80))
131         if ((pet_keyline_select == 6) && !(input_port_read(device->machine, "SPECIAL") & 0x80))
132132            data &= 0xfe;
133133      }
134134      else
135135      {
136         if ((pet_keyline_select == 6) && (input_port_read(space->machine, "SPECIAL") & 0x80))
136         if ((pet_keyline_select == 6) && (input_port_read(device->machine, "SPECIAL") & 0x80))
137137            data &= 0xfe;
138138      }
139139   }
r4376r4377
141141}
142142
143143/* NOT WORKING - Just placeholder */
144static READ8_HANDLER( pet_pia0_ca1_in )
144static READ8_DEVICE_HANDLER( pet_pia0_ca1_in )
145145{
146146   // cassette 1 read
147   return (cassette_input(devtag_get_device(space->machine, CASSETTE, "cassette1")) > +0.0) ? 1 : 0;
147   return (cassette_input(devtag_get_device(device->machine, CASSETTE, "cassette1")) > +0.0) ? 1 : 0;
148148}
149149
150150
151static WRITE8_HANDLER( pet_pia0_ca2_out )
151static WRITE8_DEVICE_HANDLER( pet_pia0_ca2_out )
152152{
153   cbm_ieee_eoi_w(space->machine, 0, data);
153   cbm_ieee_eoi_w(device->machine, 0, data);
154154}
155155
156static WRITE8_HANDLER( pet_pia0_cb2_out )
156static WRITE8_DEVICE_HANDLER( pet_pia0_cb2_out )
157157{
158158   if (!data)
159159   {
160      cassette_change_state(devtag_get_device(space->machine, CASSETTE, "cassette1"),CASSETTE_MOTOR_ENABLED,CASSETTE_MASK_MOTOR);
160      cassette_change_state(devtag_get_device(device->machine, CASSETTE, "cassette1"),CASSETTE_MOTOR_ENABLED,CASSETTE_MASK_MOTOR);
161161      timer_adjust_periodic(datasette1_timer, attotime_zero, 0, ATTOTIME_IN_HZ(48000));   // I put 48000 because I was given some .wav with this freq
162162   }
163163   else
164164   {
165      cassette_change_state(devtag_get_device(space->machine, CASSETTE, "cassette1"),CASSETTE_MOTOR_DISABLED ,CASSETTE_MASK_MOTOR);
165      cassette_change_state(devtag_get_device(device->machine, CASSETTE, "cassette1"),CASSETTE_MOTOR_DISABLED ,CASSETTE_MASK_MOTOR);
166166      timer_reset(datasette1_timer, attotime_never);
167167   }
168168}
169169
170170
171static void pet_irq (running_machine *machine, int level)
171static WRITE_LINE_DEVICE_HANDLER( pet_irq )
172172{
173   int level = state ? 1 : 0;
173174   static int old_level = 0;
174   pet_state *state = machine->driver_data;
175   running_machine *machine = device->machine;
176   pet_state *driver_state = machine->driver_data;
175177   if (level != old_level)
176178   {
177179      DBG_LOG (3, "mos6502", ("irq %s\n", level ? "start" : "end"));
178      if (state->superpet)
180      if (driver_state->superpet)
179181         cpu_set_input_line(machine->cpu[1], M6809_IRQ_LINE, level);
180182      cpu_set_input_line(machine->cpu[0], M6502_IRQ_LINE, level);
181183      old_level = level;
r4376r4377
190192  cb1 srq in
191193  cb2 dav out
192194 */
193static READ8_HANDLER ( pet_pia1_port_a_read )
195static READ8_DEVICE_HANDLER ( pet_pia1_port_a_read )
194196{
195   return cbm_ieee_data_r(space->machine);
197   return cbm_ieee_data_r(device->machine);
196198}
197199
198static WRITE8_HANDLER ( pet_pia1_port_b_write )
200static WRITE8_DEVICE_HANDLER ( pet_pia1_port_b_write )
199201{
200   cbm_ieee_data_w(space->machine, 0, data);
202   cbm_ieee_data_w(device->machine, 0, data);
201203}
202204
203static READ8_HANDLER ( pet_pia1_ca1_read )
205static READ8_DEVICE_HANDLER ( pet_pia1_ca1_read )
204206{
205   return cbm_ieee_atn_r(space->machine);
207   return cbm_ieee_atn_r(device->machine);
206208}
207209
208static WRITE8_HANDLER ( pet_pia1_ca2_write )
210static WRITE8_DEVICE_HANDLER ( pet_pia1_ca2_write )
209211{
210   cbm_ieee_ndac_w(space->machine, 0, data);
212   cbm_ieee_ndac_w(device->machine, 0, data);
211213}
212214
213static WRITE8_HANDLER ( pet_pia1_cb2_write )
215static WRITE8_DEVICE_HANDLER ( pet_pia1_cb2_write )
214216{
215   cbm_ieee_dav_w(space->machine, 0, data);
217   cbm_ieee_dav_w(device->machine, 0, data);
216218}
217219
218static READ8_HANDLER ( pet_pia1_cb1_read )
220static READ8_DEVICE_HANDLER ( pet_pia1_cb1_read )
219221{
220   return cbm_ieee_srq_r(space->machine);
222   return cbm_ieee_srq_r(device->machine);
221223}
222224
223static const pia6821_interface pet_pia0 =
225const pia6821_interface pet_pia0 =
224226{
225   pet_pia0_port_a_read,      /* in_a_func */
226   pet_pia0_port_b_read,      /* in_b_func */
227   pet_pia0_ca1_in,         /* in_ca1_func */
228   NULL,                  /* in_cb1_func */
229   NULL,                  /* in_ca2_func */
230   NULL,                  /* in_cb2_func */
231   pet_pia0_port_a_write,      /* out_a_func */
232   NULL,                  /* out_b_func */
233   pet_pia0_ca2_out,         /* out_ca2_func */
234   pet_pia0_cb2_out,         /* out_cb2_func */
235   NULL,                  /* irq_a_func */
236   pet_irq                  /* irq_b_func */
227   DEVCB_HANDLER(pet_pia0_port_a_read),      /* in_a_func */
228   DEVCB_HANDLER(pet_pia0_port_b_read),      /* in_b_func */
229   DEVCB_HANDLER(pet_pia0_ca1_in),         /* in_ca1_func */
230   DEVCB_NULL,                  /* in_cb1_func */
231   DEVCB_NULL,                  /* in_ca2_func */
232   DEVCB_NULL,                  /* in_cb2_func */
233   DEVCB_HANDLER(pet_pia0_port_a_write),      /* out_a_func */
234   DEVCB_NULL,                  /* out_b_func */
235   DEVCB_HANDLER(pet_pia0_ca2_out),         /* out_ca2_func */
236   DEVCB_HANDLER(pet_pia0_cb2_out),         /* out_cb2_func */
237   DEVCB_NULL,                  /* irq_a_func */
238   DEVCB_LINE(pet_irq)                  /* irq_b_func */
237239};
238240
239static const pia6821_interface petb_pia0 =
241const pia6821_interface petb_pia0 =
240242{
241   pet_pia0_port_a_read,      /* in_a_func */
242   petb_pia0_port_b_read,      /* in_b_func */
243   pet_pia0_ca1_in,         /* in_ca1_func */
244   NULL,                  /* in_cb1_func */
245   NULL,                  /* in_ca2_func */
246   NULL,                  /* in_cb2_func */
247   pet_pia0_port_a_write,      /* out_a_func */
248   NULL,                  /* out_b_func */
249   pet_pia0_ca2_out,         /* out_ca2_func */
250   pet_pia0_cb2_out,         /* out_cb2_func */
251   NULL,                  /* irq_a_func */
252   pet_irq                  /* irq_b_func */
243   DEVCB_HANDLER(pet_pia0_port_a_read),      /* in_a_func */
244   DEVCB_HANDLER(petb_pia0_port_b_read),      /* in_b_func */
245   DEVCB_HANDLER(pet_pia0_ca1_in),         /* in_ca1_func */
246   DEVCB_NULL,                  /* in_cb1_func */
247   DEVCB_NULL,                  /* in_ca2_func */
248   DEVCB_NULL,                  /* in_cb2_func */
249   DEVCB_HANDLER(pet_pia0_port_a_write),      /* out_a_func */
250   DEVCB_NULL,                  /* out_b_func */
251   DEVCB_HANDLER(pet_pia0_ca2_out),         /* out_ca2_func */
252   DEVCB_HANDLER(pet_pia0_cb2_out),         /* out_cb2_func */
253   DEVCB_NULL,                  /* irq_a_func */
254   DEVCB_LINE(pet_irq)                  /* irq_b_func */
253255};
254256
255static const pia6821_interface pet_pia1 =
257const pia6821_interface pet_pia1 =
256258{
257   pet_pia1_port_a_read,      /* in_a_func */
258   NULL,                  /* in_b_func */
259    pet_pia1_ca1_read,         /* in_ca1_func */
260    pet_pia1_cb1_read,         /* in_cb1_func */
261   NULL,                  /* in_ca2_func */
262   NULL,                  /* in_cb2_func */
263   NULL,                  /* out_a_func */
264    pet_pia1_port_b_write,      /* out_b_func */
265    pet_pia1_ca2_write,         /* out_ca2_func */
266    pet_pia1_cb2_write,         /* out_cb2_func */
259   DEVCB_HANDLER(pet_pia1_port_a_read),      /* in_a_func */
260   DEVCB_NULL,                  /* in_b_func */
261    DEVCB_HANDLER(pet_pia1_ca1_read),         /* in_ca1_func */
262    DEVCB_HANDLER(pet_pia1_cb1_read),         /* in_cb1_func */
263   DEVCB_NULL,                  /* in_ca2_func */
264   DEVCB_NULL,                  /* in_cb2_func */
265   DEVCB_NULL,                  /* out_a_func */
266    DEVCB_HANDLER(pet_pia1_port_b_write),      /* out_b_func */
267    DEVCB_HANDLER(pet_pia1_ca2_write),         /* out_ca2_func */
268    DEVCB_HANDLER(pet_pia1_cb2_write),         /* out_cb2_func */
269   DEVCB_NULL,
270   DEVCB_NULL
267271};
268272
269273static WRITE8_DEVICE_HANDLER( pet_address_line_11 )
r4376r4377
353357static WRITE8_HANDLER(cbm8096_io_w)
354358{
355359   const device_config *via_0 = devtag_get_device(space->machine, VIA6522, "via6522_0");
360   const device_config *pia_0 = devtag_get_device(space->machine, PIA6821, "pia_0");
361   const device_config *pia_1 = devtag_get_device(space->machine, PIA6821, "pia_1");
356362
357363   if (offset < 0x10) ;
358   else if (offset < 0x14) pia_0_w(space, offset & 3, data);
364   else if (offset < 0x14) pia_w(pia_0, offset & 3, data);
359365   else if (offset < 0x20) ;
360   else if (offset < 0x24) pia_1_w(space, offset & 3, data);
366   else if (offset < 0x24) pia_w(pia_1, offset & 3, data);
361367   else if (offset < 0x40) ;
362368   else if (offset < 0x50) via_w(via_0, offset & 0xf, data);
363369   else if (offset < 0x80) ;
r4376r4377
368374static READ8_HANDLER(cbm8096_io_r)
369375{
370376   const device_config *via_0 = devtag_get_device(space->machine, VIA6522, "via6522_0");
377   const device_config *pia_0 = devtag_get_device(space->machine, PIA6821, "pia_0");
378   const device_config *pia_1 = devtag_get_device(space->machine, PIA6821, "pia_1");
371379
372380   int data = 0xff;
373381   if (offset < 0x10) ;
374   else if (offset < 0x14) data = pia_0_r(space, offset & 3);
382   else if (offset < 0x14) data = pia_r(pia_0, offset & 3);
375383   else if (offset < 0x20) ;
376   else if (offset < 0x24) data = pia_1_r(space, offset & 3);
384   else if (offset < 0x24) data = pia_r(pia_1, offset & 3);
377385   else if (offset < 0x40) ;
378386   else if (offset < 0x50) data = via_r(via_0, offset & 0xf);
379387   else if (offset < 0x80) ;
r4376r4377
551559
552560static TIMER_CALLBACK(pet_interrupt)
553561{
562   const device_config *pia_0 = devtag_get_device(machine, PIA6821, "pia_0");
554563   static int level = 0;
555564
556   pia_0_cb1_w(cputag_get_address_space(machine,"maincpu",ADDRESS_SPACE_PROGRAM), 0, level);
565   pia_cb1_w(pia_0, 0, level);
557566   level = !level;
558567}
559568
r4376r4377
561570/* NOT WORKING - Just placeholder */
562571static TIMER_CALLBACK( pet_tape1_timer )
563572{
573   const device_config *pia_0 = devtag_get_device(machine, PIA6821, "pia_0");
564574//  cassette 1
565575   UINT8 data = (cassette_input(devtag_get_device(machine, CASSETTE, "cassette1")) > +0.0) ? 1 : 0;
566   pia_0_ca1_w(cputag_get_address_space(machine,"maincpu",ADDRESS_SPACE_PROGRAM), 0, data);
576   pia_ca1_w(pia_0, 0, data);
567577}
568578
569579/* NOT WORKING - Just placeholder */
r4376r4377
608618   datasette1_timer = timer_alloc(machine, pet_tape1_timer, NULL);
609619   datasette2_timer = timer_alloc(machine, pet_tape2_timer, NULL);
610620
611   pia_config(machine, 1, &pet_pia1);
612
613621   cbm_ieee_open();
614622}
615623
r4376r4377
620628   pet_memory = mess_ram;
621629   pet_common_driver_init(machine);
622630   state->pet_basic1 = 1;
623   pia_config(machine, 0, &pet_pia0);
624631   pet_vh_init(machine);
625632}
626633
r4376r4377
628635{
629636   pet_memory = mess_ram;
630637   pet_common_driver_init(machine);
631   pia_config(machine, 0, &pet_pia0);
632638   pet_vh_init(machine);
633639}
634640
635DRIVER_INIT( petb )
636{
637   pet_memory = mess_ram;
638   pet_common_driver_init(machine);
639   pia_config(machine, 0, &petb_pia0);
640   pet_vh_init(machine);
641}
642
643DRIVER_INIT( pet40 )
644{
645   pet_memory = mess_ram;
646   pet_common_driver_init(machine);
647   pia_config(machine, 0, &pet_pia0);
648   pet_vh_init(machine);
649}
650
651641DRIVER_INIT( pet80 )
652642{
653643   pet_state *state = machine->driver_data;
r4376r4377
655645
656646   pet_common_driver_init(machine);
657647   state->cbm8096 = 1;
658   pia_config(machine, 0, &petb_pia0);
659648   videoram = &pet_memory[0x8000];
660649   videoram_size = 0x800;
661650   pet80_vh_init(machine);
r4376r4377
668657   pet_memory = mess_ram;
669658   pet_common_driver_init(machine);
670659   state->superpet = 1;
671   pia_config(machine, 0, &petb_pia0);
672660
673661   superpet_memory = auto_malloc(0x10000);
674662
r4376r4377
681669MACHINE_RESET( pet )
682670{
683671   pet_state *state = machine->driver_data;
684   pia_reset();
685672
686673   if (state->superpet)
687674   {
src/mess/drivers/pet.c
r4376r4377
384384#include "cpu/m6809/m6809.h"
385385#include "cpu/m6502/m6502.h"
386386
387#include "machine/6821pia.h"
387#include "machine/6821new.h"
388388#include "machine/6522via.h"
389389#include "includes/pet.h"
390390#include "machine/cbmipt.h"
r4376r4377
405405static ADDRESS_MAP_START(pet_mem , ADDRESS_SPACE_PROGRAM, 8)
406406   AM_RANGE(0x8000, 0x83ff) AM_MIRROR(0x0c00) AM_RAM AM_BASE(&videoram) AM_SIZE(&videoram_size )
407407   AM_RANGE(0xa000, 0xe7ff) AM_ROM
408   AM_RANGE(0xe810, 0xe813) AM_READWRITE(pia_0_r, pia_0_w)
409   AM_RANGE(0xe820, 0xe823) AM_READWRITE(pia_1_r, pia_1_w)
408   AM_RANGE(0xe810, 0xe813) AM_DEVREADWRITE(PIA6821, "pia_0", pia_r, pia_w)
409   AM_RANGE(0xe820, 0xe823) AM_DEVREADWRITE(PIA6821, "pia_1", pia_r, pia_w)
410410   AM_RANGE(0xe840, 0xe84f) AM_DEVREADWRITE(VIA6522, "via6522_0", via_r, via_w)
411411/*  AM_RANGE(0xe900, 0xe91f) AM_READ(cbm_ieee_state)    // for debugging */
412412   AM_RANGE(0xf000, 0xffff) AM_ROM
r4376r4377
415415static ADDRESS_MAP_START( pet40_mem , ADDRESS_SPACE_PROGRAM, 8)
416416   AM_RANGE(0x8000, 0x83ff) AM_MIRROR(0x0c00) AM_RAM AM_BASE(&videoram) AM_SIZE(&videoram_size )
417417   AM_RANGE(0xa000, 0xe7ff) AM_ROM
418   AM_RANGE(0xe810, 0xe813) AM_READWRITE(pia_0_r, pia_0_w)
419   AM_RANGE(0xe820, 0xe823) AM_READWRITE(pia_1_r, pia_1_w)
418   AM_RANGE(0xe810, 0xe813) AM_DEVREADWRITE(PIA6821, "pia_0", pia_r, pia_w)
419   AM_RANGE(0xe820, 0xe823) AM_DEVREADWRITE(PIA6821, "pia_1", pia_r, pia_w)
420420   AM_RANGE(0xe840, 0xe84f) AM_DEVREADWRITE(VIA6522, "via6522_0", via_r, via_w)
421421   AM_RANGE(0xe880, 0xe880) AM_DEVWRITE(MC6845, "crtc", mc6845_address_w)
422422   AM_RANGE(0xe881, 0xe881) AM_DEVREADWRITE(MC6845, "crtc", mc6845_register_r, mc6845_register_w)
r4376r4377
432432#if 1
433433   AM_RANGE(0xe800, 0xefff) AM_RAMBANK(7)
434434#else
435   AM_RANGE(0xe810, 0xe813) AM_READWRITE(pia_0_r, pia_0_w)
436   AM_RANGE(0xe820, 0xe823) AM_READWRITE(pia_1_r, pia_1_w)
435   AM_RANGE(0xe810, 0xe813) AM_DEVREADWRITE(PIA6821, "pia_0", pia_r, pia_w)
436   AM_RANGE(0xe820, 0xe823) AM_DEVREADWRITE(PIA6821, "pia_1", pia_r, pia_w)
437437   AM_RANGE(0xe840, 0xe84f) AM_DEVREADWRITE(VIA6522, "via6522_0", via_r, via_w)
438438   AM_RANGE(0xe880, 0xe880) AM_DEVWRITE(MC6845, "crtc", mc6845_address_w)
439439   AM_RANGE(0xe881, 0xe881) AM_DEVREADWRITE(MC6845, "crtc", mc6845_register_r, mc6845_register_w)
r4376r4377
463463   AM_RANGE(0x0000, 0x7fff) AM_RAM AM_SHARE(1) AM_BASE(&pet_memory)
464464   AM_RANGE(0x8000, 0x87ff) AM_RAM AM_SHARE(2) AM_BASE(&videoram) AM_SIZE(&videoram_size)
465465   AM_RANGE(0xa000, 0xe7ff) AM_ROM
466   AM_RANGE(0xe810, 0xe813) AM_READWRITE(pia_0_r, pia_0_w)
467   AM_RANGE(0xe820, 0xe823) AM_READWRITE(pia_1_r, pia_1_w)
466   AM_RANGE(0xe810, 0xe813) AM_DEVREADWRITE(PIA6821, "pia_0", pia_r, pia_w)
467   AM_RANGE(0xe820, 0xe823) AM_DEVREADWRITE(PIA6821, "pia_1", pia_r, pia_w)
468468   AM_RANGE(0xe840, 0xe84f) AM_DEVREADWRITE(VIA6522, "via6522_0", via_r, via_w)
469469   AM_RANGE(0xe880, 0xe880) AM_DEVWRITE(MC6845, "crtc", mc6845_address_w)
470470   AM_RANGE(0xe881, 0xe881) AM_DEVREADWRITE(MC6845, "crtc", mc6845_register_r, mc6845_register_w)
r4376r4377
479479   AM_RANGE(0x8000, 0x87ff) AM_RAM AM_SHARE(2)   /* same memory as m6502 */
480480    AM_RANGE(0x9000, 0x9fff) AM_RAMBANK(1)   /* 64 kbyte ram turned in */
481481   AM_RANGE(0xa000, 0xe7ff) AM_ROM
482   AM_RANGE(0xe810, 0xe813) AM_READWRITE(pia_0_r, pia_0_w)
483   AM_RANGE(0xe820, 0xe823) AM_READWRITE(pia_1_r, pia_1_w)
482   AM_RANGE(0xe810, 0xe813) AM_DEVREADWRITE(PIA6821, "pia_0", pia_r, pia_w)
483   AM_RANGE(0xe820, 0xe823) AM_DEVREADWRITE(PIA6821, "pia_1", pia_r, pia_w)
484484   AM_RANGE(0xe840, 0xe84f) AM_DEVREADWRITE(VIA6522, "via6522_0", via_r, via_w)
485485   AM_RANGE(0xe880, 0xe880) AM_DEVWRITE(MC6845, "crtc", mc6845_address_w)
486486   AM_RANGE(0xe881, 0xe881) AM_DEVREADWRITE(MC6845, "crtc", mc6845_register_r, mc6845_register_w)
r4376r4377
676676
677677   /* via */
678678   MDRV_VIA6522_ADD( "via6522_0", 0, pet_via)
679
680   /* pias */
681   MDRV_PIA6821_ADD( "pia_0", pet_pia0)
682   MDRV_PIA6821_ADD( "pia_1", pet_pia1)
679683MACHINE_DRIVER_END
680684
681685
r4376r4377
686690MACHINE_DRIVER_END
687691
688692
693static MACHINE_DRIVER_START( petb )
694   MDRV_IMPORT_FROM( pet )
695   MDRV_PIA6821_MODIFY( "pia_0", petb_pia0 )
696MACHINE_DRIVER_END
697
698
699
689700static MACHINE_DRIVER_START( pet2001 )
690701   MDRV_IMPORT_FROM( pet_general )
691702   MDRV_QUICKLOAD_ADD("quickload", cbm_pet1, "p00,prg", CBM_QUICKLOAD_DELAY_SECONDS)
r4376r4377
732743   MDRV_VIDEO_START( pet_crtc )
733744   MDRV_VIDEO_UPDATE( pet_crtc )
734745
746   MDRV_PIA6821_MODIFY( "pia_0", petb_pia0 )
747
735748   MDRV_IMPORT_FROM(pet4_cartslot)
736749MACHINE_DRIVER_END
737750
r4376r4377
756769   MDRV_SCREEN_MODIFY("screen")
757770   MDRV_SCREEN_REFRESH_RATE(50)
758771   MDRV_GFXDECODE( superpet )
772
773   MDRV_PIA6821_MODIFY( "pia_0", petb_pia0 )
759774MACHINE_DRIVER_END
760775
761776
r4376r4377
11361151
11371152COMP(1977, pet2001,  0,        0,        pet2001,  pet,      pet2001,  pet2001,   "Commodore Business Machines Co.",  "PET 2001", GAME_NO_SOUND)
11381153COMP(1979, pet2001n, pet2001,  0,        pet,      pet,      pet,      pet2,      "Commodore Business Machines Co.",  "PET 2001-N", GAME_NO_SOUND)
1139COMP(1979, pet2001b, pet2001,  0,        pet,      petb,     petb,     pet2,      "Commodore Business Machines Co.",  "PET 2001-B", GAME_NO_SOUND)
1154COMP(1979, pet2001b, pet2001,  0,        petb,     petb,     pet,      pet2,      "Commodore Business Machines Co.",  "PET 2001-B", GAME_NO_SOUND)
11401155COMP(1979, cbm30,    pet2001,  0,        pet,      pet,      pet,      pet2,      "Commodore Business Machines Co.",  "CBM 30xx", GAME_NO_SOUND)
1141COMP(1979, cbm30b,   pet2001,  0,        pet,      petb,     petb,     pet2,      "Commodore Business Machines Co.",  "CBM 30xx (Business keyboard)", GAME_NO_SOUND)
1142COMP(1979, cbm30nor, pet2001,  0,        pet,      petb,     petb,     pet2,      "Commodore Business Machines Co.",  "CBM 30xx (Norway, Business keyboard)", GAME_NO_SOUND)
1156COMP(1979, cbm30b,   pet2001,  0,        petb,     petb,     pet,      pet2,      "Commodore Business Machines Co.",  "CBM 30xx (Business keyboard)", GAME_NO_SOUND)
1157COMP(1979, cbm30nor, pet2001,  0,        petb,     petb,     pet,      pet2,      "Commodore Business Machines Co.",  "CBM 30xx (Norway, Business keyboard)", GAME_NO_SOUND)
11431158
11441159/* So called, THIN-40 */
11451160COMP(1980, pet40on,  pet2001,  0,        pet,      pet,      pet,      pet2,      "Commodore Business Machines Co.",  "PET 40xx (Basic 4, no CRTC, Normal keyboard)", GAME_NO_SOUND)
1146COMP(1980, pet40ob,  pet2001,  0,        pet,      petb,     petb,     pet2,      "Commodore Business Machines Co.",  "PET 40xx (Basic 4, no CRTC, Business keyboard)", GAME_NO_SOUND)
1161COMP(1980, pet40ob,  pet2001,  0,        petb,     petb,     pet,      pet2,      "Commodore Business Machines Co.",  "PET 40xx (Basic 4, no CRTC, Business keyboard)", GAME_NO_SOUND)
11471162COMP(1980, cbm40o,   pet2001,  0,        pet,      pet,      pet,      pet2,      "Commodore Business Machines Co.",  "CBM 40xx (Basic 4, no CRTC, Normal keyboard)", GAME_NO_SOUND)
1148COMP(1980, cbm40ob,  pet2001,  0,        pet,      petb,     petb,     pet2,      "Commodore Business Machines Co.",  "CBM 40xx (Basic 4, no CRTC, Business keyboard)", GAME_NO_SOUND)
1163COMP(1980, cbm40ob,  pet2001,  0,        petb,     petb,     pet,      pet2,      "Commodore Business Machines Co.",  "CBM 40xx (Basic 4, no CRTC, Business keyboard)", GAME_NO_SOUND)
11491164
11501165COMP(1981, pet80,    0,        0,        pet80,    cbm8096,  pet80,    pet4,      "Commodore Business Machines Co.",  "PET 80xx (Basic 4, CRTC 60Hz, 80 columns)", GAME_NO_SOUND)
11511166COMP(1981, cbm80,    pet80,    0,        pet80pal, cbm8096,  pet80,    pet4,      "Commodore Business Machines Co.",  "CBM 80xx (Basic 4, CRTC 50Hz, 80 columns)", GAME_NO_SOUND)
r4376r4377
11551170
11561171/* So called, FAT-40 */
11571172COMP(1981, pet40b,   pet80,    0,        pet80,    cbm8096,  pet80,    pet4,      "Commodore Business Machines Co.",  "PET 40xx (Basic 4, CRTC 60Hz, 80 columns)", GAME_NO_SOUND)
1158COMP(1981, pet40n,   pet2001,  0,        pet40,    pet,      pet40,    pet4o,     "Commodore Business Machines Co.",  "PET 40xx (Basic 4, CRTC 60Hz, 40 columns)", GAME_NO_SOUND)
1173COMP(1981, pet40n,   pet2001,  0,        pet40,    pet,      pet,      pet4o,     "Commodore Business Machines Co.",  "PET 40xx (Basic 4, CRTC 60Hz, 40 columns)", GAME_NO_SOUND)
11591174COMP(1981, cbm40b,   pet80,    0,        pet80pal, cbm8096,  pet80,    pet4,      "Commodore Business Machines Co.",  "CBM 40xx (Basic 4, CRTC 50Hz, 80 columns)", GAME_NO_SOUND)
1160COMP(1981, cbm40n,   pet2001,  0,        pet40pal, pet,      pet40,    pet4o,     "Commodore Business Machines Co.",  "CBM 40xx (Basic 4, CRTC 50Hz, 40 columns)", GAME_NO_SOUND)
1175COMP(1981, cbm40n,   pet2001,  0,        pet40pal, pet,      pet,      pet4o,     "Commodore Business Machines Co.",  "CBM 40xx (Basic 4, CRTC 50Hz, 40 columns)", GAME_NO_SOUND)
11611176
11621177COMP(1981, superpet, 0,        0,        superpet, superpet, superpet, pet4,      "Commodore Business Machines Co.",  "SuperPET (CRTC 50Hz)", GAME_NO_SOUND | GAME_NOT_WORKING)
11631178COMP(1981, sp9000,   superpet, 0,        superpet, superpet, superpet, pet4,      "Commodore Business Machines Co.",  "CBM SP9000 / MicroMainFrame 9000 (CRTC 50Hz)", GAME_NO_SOUND | GAME_NOT_WORKING)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team