Previous 15994 Revisions Next

r14370 Tuesday 7th February, 2012 at 07:28:39 UTC by Miodrag Milanović
Cleanup (nw)
[hash]famicom_flop.xml
[src/emu/video]pc_vga.c
[src/lib]lib.mak
[src/mess/drivers]at.c c64.c vic10.c x1.c
[src/mess/includes]c64.h vic10.h
[src/mess/machine]3c503.c c64exp.c c64exp.h cbmipt.c cntr_covox.c cntr_covox.h docg3.h isa.c isa.h isa_aha1542.c isa_aha1542.h isa_ibm_mfc.c isa_ibm_mfc.h lynx.c pc_lpt.c pc_lpt.h svi318.c vic10exp.c vic10exp.h
[src/mess/machine/ti99]evpc.c hsgpl.c

hash/famicom_flop.xml
r14369r14370
22<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd">
33<softwarelist name="famicom_flop" description="Nintendo Famicom Disk images">
44
5<!--
6    Some disks are marked as bad dumps due to spurious data being present on the dump,
7    e.g. because the disk was used on a system and data have been saved. In the case
5<!--
6    Some disks are marked as bad dumps due to spurious data being present on the dump,
7    e.g. because the disk was used on a system and data have been saved. In the case
88    of prototypes it's unlikely we will ever have access to a pristine disk, but still it is worth marking them.
99    Overall, anyway, all dumps are in .fds format which might be eventually replaced by a more
1010    accurate format!
1111-->
1212
13<!--
13<!--
1414    Undumped disks:
1515    * Tanigawa Kouji no Shougi Shinan II - Tsumeshougi Ji no Itte ~ 谷川浩司の将棋指南II 詰め将棋・次の一手 (19880810, Pony Canyon, PNF-SH2)
1616
r14369r14370
1919    * Konamic Ice Hockey ~ コナミック アイスホッケー 書き換え版 (19880909, Konami, KDS-HOC)
2020-->
2121
22<!--
22<!--
2323    WARNING: These disks do not contain the 0x10 header some emulator expects!!!
2424    To use them in such emulators, you have to open the image with an hex editor and add
2525    at the beginning of the file the following string (in hex):
src/emu/video/pc_vga.c
r14369r14370
12681268         vga.gc.read_mode = (data & 8) >> 3;
12691269         vga.gc.write_mode = data & 3;
12701270         //if(data & 0x10 && vga.gc.alpha_dis)
1271         //   popmessage("Host O/E enabled, contact MAMEdev");
1271         //  popmessage("Host O/E enabled, contact MAMEdev");
12721272         break;
12731273      case 0x06:
12741274         vga.gc.memory_map_sel = (data & 0xc) >> 2;
12751275         vga.gc.chain_oe = (data & 2) >> 1;
12761276         vga.gc.alpha_dis = (data & 1);
12771277         //if(data & 2 && vga.gc.alpha_dis)
1278         //   popmessage("Chain O/E enabled, contact MAMEdev");
1278         //  popmessage("Chain O/E enabled, contact MAMEdev");
12791279         break;
12801280      case 0x07:
12811281         vga.gc.color_dont_care = data & 0xf;
src/lib/lib.mak
r14369r14370
307307# $(OBJ)/libflac++.a: $(LIBFLACPPOBJS)
308308
309309# $(LIBOBJ)/libflacpp/%.o: $(LIBSRC)/libflac/libflac++/%.cpp | $(OSPREBUILD)
310#    @echo Compiling $<...
310#   @echo Compiling $<...
311311#   $(CC) $(CDEFS) $(FLACOPTS) $(CPPONLYFLAGS) -I$(LIBSRC)/libflac/include -c $< -o $@
src/mess/machine/cbmipt.c
r14369r14370
11411141SLOT_INTERFACE_START( vic10_expansion_cards )
11421142   SLOT_INTERFACE("standard", VIC10_STD)
11431143SLOT_INTERFACE_END
1144   
1144
11451145SLOT_INTERFACE_START( c64_expansion_cards )
11461146   SLOT_INTERFACE("standard", C64_STD)
11471147   SLOT_INTERFACE("xl80", C64_XL80)
src/mess/machine/3c503.c
r14369r14370
3838   set_isa_device();
3939   m_isa->install_device(0x0300, 0x030f, 0, 0, read8_delegate(FUNC(el2_3c503_device::el2_3c503_loport_r), this), write8_delegate(FUNC(el2_3c503_device::el2_3c503_loport_w), this));
4040   m_isa->install_device(0x0700, 0x070f, 0, 0, read8_delegate(FUNC(el2_3c503_device::el2_3c503_hiport_r), this), write8_delegate(FUNC(el2_3c503_device::el2_3c503_hiport_w), this));
41   
41
4242   // TODO: This is wrong, fix if anything actually uses it
4343   //  DMA can change in runtime
4444   int chan = 0, idcfr = m_regs.idcfr & 0x0f;
src/mess/machine/svi318.c
r14369r14370
782782
783783   switch( offset )
784784   {
785   case 0x12:     
785   case 0x12:
786786      data = 0xfe | centronics->busy_r();
787787      break;
788788
src/mess/machine/docg3.h
r14369r14370
2323public:
2424   // construction/destruction
2525   diskonchip_g3_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
26   
26
2727   void set_size(int _size) { m_size = _size; }
2828protected:
2929    // device-level overrides
r14369r14370
7676   void sec_2_write8(UINT32 offset, UINT8 data);
7777
7878   int m_size;
79   
79
8080   UINT32 m_planes;
8181   UINT32 m_blocks;
8282   UINT32 m_pages;
r14369r14370
9494   UINT32 m_plane;
9595   UINT32 m_transfersize;
9696   UINT8  m_test;
97   UINT32 m_address_count;   
97   UINT32 m_address_count;
9898};
9999
100100// device type definition
101extern const device_type DISKONCHIP_G3;   
101extern const device_type DISKONCHIP_G3;
102102
103103#endif /* __DOCG3_H__ */
src/mess/machine/pc_lpt.c
r14369r14370
2929   devcb_resolved_write_line out_irq_func;
3030
3131   UINT8 data;
32   
32
3333   int ack;
3434
3535   /* control latch */
r14369r14370
100100   device->save_item(NAME(lpt->autofd));
101101   device->save_item(NAME(lpt->init));
102102   device->save_item(NAME(lpt->select));
103   device->save_item(NAME(lpt->irq_enabled));   
103   device->save_item(NAME(lpt->irq_enabled));
104104}
105105
106106static DEVICE_RESET( pc_lpt )
r14369r14370
211211{
212212   pc_lpt_state *lpt = get_safe_token(device);
213213
214//   logerror("pc_lpt_control_w: 0x%02x\n", data);
214//  logerror("pc_lpt_control_w: 0x%02x\n", data);
215215
216216   /* save to latch */
217217   lpt->strobe = BIT(data, 0);
r14369r14370
260260   isa8_lpt_device   *lpt  = downcast<isa8_lpt_device *>(device->owner());
261261   if (lpt->is_primary())
262262      lpt->m_isa->irq7_w(state);
263   else
263   else
264264      lpt->m_isa->irq5_w(state);
265265}
266266static const pc_lpt_interface pc_lpt_config =
src/mess/machine/pc_lpt.h
r14369r14370
6666      // optional information overrides
6767      virtual machine_config_constructor device_mconfig_additions() const;
6868      virtual ioport_constructor device_input_ports() const;
69     
69
7070      bool is_primary() { return m_is_primary; }
7171protected:
7272        // device-level overrides
src/mess/machine/cntr_covox.c
r14369r14370
109109{
110110   if (m_strobe)  dac_w(m_dac_left, 0, data);
111111   if (m_auto_fd) dac_w(m_dac_right, 0, data);
112}
No newline at end of file
112}
src/mess/machine/cntr_covox.h
r14369r14370
2121
2222   // optional information overrides
2323   virtual machine_config_constructor device_mconfig_additions() const;
24   
24
2525   virtual void write(UINT8 data);
2626protected:
2727    // device-level overrides
r14369r14370
4444
4545   // optional information overrides
4646   virtual machine_config_constructor device_mconfig_additions() const;
47   
47
4848   virtual void write(UINT8 data);
4949protected:
5050    // device-level overrides
src/mess/machine/ti99/hsgpl.c
r14369r14370
632632/*
633633static DEVICE_NVRAM( hsgpl )
634634{
635   // Called between START and RESET
636   hsgpl_state *card = get_safe_token(device);
637   astring hsname(device->machine().system().name, PATH_SEPARATOR, "hsgpl.nv");
638   file_error filerr;
635    // Called between START and RESET
636    hsgpl_state *card = get_safe_token(device);
637    astring hsname(device->machine().system().name, PATH_SEPARATOR, "hsgpl.nv");
638    file_error filerr;
639639
640   if (read_or_write==0)
641   {
642      logerror("hsgpl: device nvram load %s\n", hsname.cstr());
640    if (read_or_write==0)
641    {
642        logerror("hsgpl: device nvram load %s\n", hsname.cstr());
643643
644      emu_file nvfile(device->machine().options().nvram_directory(), OPEN_FLAG_READ);
645      filerr = nvfile.open(hsname.cstr());
646      if (filerr != FILERR_NONE)
647      {
648         logerror("hsgpl: Could not restore NVRAM\n");
649         return;
650      }
644        emu_file nvfile(device->machine().options().nvram_directory(), OPEN_FLAG_READ);
645        filerr = nvfile.open(hsname.cstr());
646        if (filerr != FILERR_NONE)
647        {
648            logerror("hsgpl: Could not restore NVRAM\n");
649            return;
650        }
651651
652      if (nvfile.read(card->flashrom, FLROMSIZE) != FLROMSIZE)
653      {
654         logerror("hsgpl: Error loading NVRAM; unexpected EOF\n");
655         return;
656      }
652        if (nvfile.read(card->flashrom, FLROMSIZE) != FLROMSIZE)
653        {
654            logerror("hsgpl: Error loading NVRAM; unexpected EOF\n");
655            return;
656        }
657657
658      if (card->flashrom[0] != NVVERSION)
659      {
660         logerror("hsgpl: Wrong NVRAM image version: %d\n", card->flashrom[0]);
661         return;
662      }
663   }
664   else
665   {
666      logerror("hsgpl: device nvram save %s\n", hsname.cstr());
667      // Check dirty flags
668      if (at29c040a_is_dirty(card->dsr) ||
669         at29c040a_is_dirty(card->rom6) ||
670         at29c040a_is_dirty(card->groma) ||
671         at29c040a_is_dirty(card->gromb))
672      {
673         card->flashrom[0] = NVVERSION;
658        if (card->flashrom[0] != NVVERSION)
659        {
660            logerror("hsgpl: Wrong NVRAM image version: %d\n", card->flashrom[0]);
661            return;
662        }
663    }
664    else
665    {
666        logerror("hsgpl: device nvram save %s\n", hsname.cstr());
667        // Check dirty flags
668        if (at29c040a_is_dirty(card->dsr) ||
669            at29c040a_is_dirty(card->rom6) ||
670            at29c040a_is_dirty(card->groma) ||
671            at29c040a_is_dirty(card->gromb))
672        {
673            card->flashrom[0] = NVVERSION;
674674
675         emu_file nvfile(device->machine().options().nvram_directory(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS);
676         filerr = nvfile.open(hsname.cstr());
677         if (filerr != FILERR_NONE)
678         {
679            logerror("hsgpl: Could not save NVRAM\n");
680         }
681         else
682         {
683            if (nvfile.write(card->flashrom, FLROMSIZE) != FLROMSIZE)
684            {
685               logerror("hsgpl: Error while saving contents of NVRAM.\n");
686            }
687         }
688         return;
689      }
690      else
691      {
692         logerror("hsgpl: No changes on card, leaving nvram file unchanged.\n");
693      }
694   }
675            emu_file nvfile(device->machine().options().nvram_directory(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS);
676            filerr = nvfile.open(hsname.cstr());
677            if (filerr != FILERR_NONE)
678            {
679                logerror("hsgpl: Could not save NVRAM\n");
680            }
681            else
682            {
683                if (nvfile.write(card->flashrom, FLROMSIZE) != FLROMSIZE)
684                {
685                    logerror("hsgpl: Error while saving contents of NVRAM.\n");
686                }
687            }
688            return;
689        }
690        else
691        {
692            logerror("hsgpl: No changes on card, leaving nvram file unchanged.\n");
693        }
694    }
695695}
696696*/
697697/*
src/mess/machine/ti99/evpc.c
r14369r14370
370370/*
371371static DEVICE_NVRAM( ti99_evpc )
372372{
373   // Called between START and RESET
374   ti99_evpc_state *card = get_safe_token(device);
375   astring hsname(device->machine().system().name, PATH_SEPARATOR, "evpc.nv");
376   file_error filerr;
373    // Called between START and RESET
374    ti99_evpc_state *card = get_safe_token(device);
375    astring hsname(device->machine().system().name, PATH_SEPARATOR, "evpc.nv");
376    file_error filerr;
377377
378   if (read_or_write==0)
379   {
380      logerror("evpc: device nvram load %s\n", hsname.cstr());
378    if (read_or_write==0)
379    {
380        logerror("evpc: device nvram load %s\n", hsname.cstr());
381381
382      emu_file nvfile(device->machine().options().nvram_directory(), OPEN_FLAG_READ);
383      filerr = nvfile.open(hsname.cstr());
384      if (filerr == FILERR_NONE)
385      {
386         if (nvfile.read(card->novram, 256) != 256)
387            logerror("evpc: NOVRAM load error\n");
388      }
389   }
390   else
391   {
392      logerror("evpc: device nvram save %s\n", hsname.cstr());
393      emu_file nvfile(device->machine().options().nvram_directory(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS);
394      filerr = nvfile.open(hsname.cstr());
382        emu_file nvfile(device->machine().options().nvram_directory(), OPEN_FLAG_READ);
383        filerr = nvfile.open(hsname.cstr());
384        if (filerr == FILERR_NONE)
385        {
386            if (nvfile.read(card->novram, 256) != 256)
387                logerror("evpc: NOVRAM load error\n");
388        }
389    }
390    else
391    {
392        logerror("evpc: device nvram save %s\n", hsname.cstr());
393        emu_file nvfile(device->machine().options().nvram_directory(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS);
394        filerr = nvfile.open(hsname.cstr());
395395
396      if (filerr == FILERR_NONE)
397      {
398         if (nvfile.write(card->novram, 256) != 256)
399            logerror("evpc: NOVRAM save error\n");
400      }
401   }
396        if (filerr == FILERR_NONE)
397        {
398            if (nvfile.write(card->novram, 256) != 256)
399                logerror("evpc: NOVRAM save error\n");
400        }
401    }
402402}
403403*/
404404MACHINE_CONFIG_FRAGMENT( ti99_evpc )
src/mess/machine/lynx.c
r14369r14370
771771         state->m_blitter.sprite_collide = !(state->m_blitter.spr_coll & 0x20);
772772         state->m_blitter.spritenr = state->m_blitter.spr_coll & 0x0f;
773773         state->m_blitter.fred = 0;
774         
774
775775         /* Draw Sprite */
776776         lynx_blit_lines(state);
777         
777
778778         if (state->m_blitter.sprite_collide && !(state->m_blitter.no_collide))
779779         {
780780            switch (state->m_blitter.mode)
r14369r14370
788788                  break;
789789            }
790790         }
791         
791
792792         if (state->m_suzy.data[SPRGO] & 0x04) // Everon enabled
793793         {
794794            coldep = lynx_read_ram(state, state->m_blitter.colpos);
r14369r14370
12231223         break;
12241224      case MATH_D:
12251225      /* Documentation states that writing to the MATH_D will set MATH_C to zero but not update the sign flag.
1226      Implementing the sign detection as described in the documentation causes Stun Runners to not work.
1227      Either the sign error in the docs is not as described or writing to the lower byte does update the sign flag.
1228      Here I assume the sign flag gets updated. */
1226        Implementing the sign detection as described in the documentation causes Stun Runners to not work.
1227        Either the sign error in the docs is not as described or writing to the lower byte does update the sign flag.
1228        Here I assume the sign flag gets updated. */
12291229         if (data)
12301230            state->m_sign_CD = 1;
12311231         break;
r14369r14370
16441644         state->m_mikey.data[0x81] |= 0x10;
16451645         cputag_set_input_line(machine, "maincpu", M65SC02_IRQ_LINE, ASSERT_LINE);
16461646      }
1647   }   
1647   }
16481648
16491649   if (state->m_uart.serctl & 0x80)
16501650   {
src/mess/machine/isa.c
r14369r14370
331331   if (machine().region("isa")) {
332332      dest = machine().region("isa")->base() + start - 0xc0000;
333333   }
334   memcpy(dest,src, end - start + 1);   
334   memcpy(dest,src, end - start + 1);
335335   /*address_space *space = m_maincpu->memory().space(AS_PROGRAM);
336   space->install_read_bank(start, end, mask, mirror, tag);
337   space->unmap_write(start, end, mask, mirror);
338   memory_set_bankptr(machine(), tag, machine().region(dev->subtag(tempstring, region))->base());*/
336    space->install_read_bank(start, end, mask, mirror, tag);
337    space->unmap_write(start, end, mask, mirror);
338    memory_set_bankptr(machine(), tag, machine().region(dev->subtag(tempstring, region))->base());*/
339339}
340340
341341void isa8_device::unmap_rom(offs_t start, offs_t end, offs_t mask, offs_t mirror)
r14369r14370
359359
360360UINT8 isa8_device::dack_r(int line)
361361{
362   if (m_dma_device[line])
363      return m_dma_device[line]->dack_r(line);   
362   if (m_dma_device[line])
363      return m_dma_device[line]->dack_r(line);
364364   return 0xff;
365365}
366366
r14369r14370
373373void isa8_device::eop_w(int state)
374374{
375375   for (int i=0;i<8;i++) {
376      if (m_dma_eop[i]==TRUE && m_dma_device[i])
376      if (m_dma_eop[i]==TRUE && m_dma_device[i])
377377         m_dma_device[i]->eop_w(state);
378378   }
379379}
src/mess/machine/isa.h
r14369r14370
175175   UINT8 dack_r(int line);
176176   void dack_w(int line,UINT8 data);
177177   void eop_w(int state);
178   
178
179179   void set_dma_channel(UINT8 channel, device_isa8_card_interface *dev, bool do_eop);
180180protected:
181181   // device-level overrides
src/mess/machine/isa_aha1542.c
r14369r14370
77 *
88 **********************************************************************/
99
10/*
10/*
1111 PCB layout
1212 ----------
1313           Floppy            SCSI
14       +-----------+ +------------------+  +-
14       +-----------+ +------------------+  +-
1515 +-----+-----------+-+------------------+--+
1616 |                                         |
1717 | DIPSW DS1                               |\
r14369r14370
2828 |||||||||  |||||||||||||||||||||||||      |
2929
3030
31 DIPSW   sw1 - sw8
32 U3   Intel chip labelled "AHA-1542CF/552800-01 D/9346", probably FDC (82077)
33 U5   Z84C0010VEC
34 U8   EEPROM(?) labelled 545120A
35 U13   CXK5864CM-10LL (64kbit SRAM)
36 U15   M27C256B labelled "ADAPTEC INC/553801-00 C/MCODE 563D/(C) 1993"
37 U16   M27C256B labelled "ADAPTEC INC/553601-00 C/BIOS C38D/(C) 1993"
38 U17   AIC-7970Q
39 Y1   XTAL SRX4054 93-38
40 Y2   XTAL SRX4053 93-40
41 TRM   Dallas DS2107AS (SCSI termination)
42 DS1   LED
31 DIPSW  sw1 - sw8
32 U3 Intel chip labelled "AHA-1542CF/552800-01 D/9346", probably FDC (82077)
33 U5 Z84C0010VEC
34 U8 EEPROM(?) labelled 545120A
35 U13    CXK5864CM-10LL (64kbit SRAM)
36 U15    M27C256B labelled "ADAPTEC INC/553801-00 C/MCODE 563D/(C) 1993"
37 U16    M27C256B labelled "ADAPTEC INC/553601-00 C/BIOS C38D/(C) 1993"
38 U17    AIC-7970Q
39 Y1 XTAL SRX4054 93-38
40 Y2 XTAL SRX4053 93-40
41 TRM    Dallas DS2107AS (SCSI termination)
42 DS1    LED
4343
4444*/
4545
4646/*
4747 * The PCB has a couple of DIP switches:
4848 *
49 *    sw1   on   enable termination
50 *       off   software-controlled termination
49 *  sw1 on  enable termination
50 *      off software-controlled termination
5151 *
52 *    sw2   sw3   sw4   I/O Port
53 *    off   off   off   0x330 - 0x333 (default)
54 *    on   off   off   0x334 - 0x337
55 *    off   on   off   0x230 - 0x233
56 *    on   on   off   0x234 - 0x237
57 *    off   off   on   0x130 - 0x133
58 *    on   off   on   0x134 - 0x137
59 *    off   on   on   reserved
60 *    on   on   on   reserved
52 *  sw2 sw3 sw4 I/O Port
53 *  off off off 0x330 - 0x333 (default)
54 *  on  off off 0x334 - 0x337
55 *  off on  off 0x230 - 0x233
56 *  on  on  off 0x234 - 0x237
57 *  off off on  0x130 - 0x133
58 *  on  off on  0x134 - 0x137
59 *  off on  on  reserved
60 *  on  on  on  reserved
6161 *
62 *    sw5   on   disable floppy interface
63 *       off   enable floppy interface
62 *  sw5 on  disable floppy interface
63 *      off enable floppy interface
6464 *
65 *    sw6   sw7   sw8   BIOS base address
66 *   off   off   off   0xdc000 (default)
67 *   on   off   off   0xd8000
68 *   off   on   off   0xd4000
69 *   on   on   off   0xd0000
70 *   off   off   on   0xcc000
71 *   on   off   on   0xc8000
72 *   off   on   on   reserved
73 *   on   on   on   BIOS disabled
65 *  sw6 sw7 sw8 BIOS base address
66 *  off off off 0xdc000 (default)
67 *  on  off off 0xd8000
68 *  off on  off 0xd4000
69 *  on  on  off 0xd0000
70 *  off off on  0xcc000
71 *  on  off on  0xc8000
72 *  off on  on  reserved
73 *  on  on  on  BIOS disabled
7474 *
7575 * source: http://download.adaptec.com/pdfs/installation_guides/1540cfig.pdf
7676 */
r14369r14370
152152//-------------------------------------------------
153153//  ROM( aha1542 )
154154//-------------------------------------------------
155
155
156156ROM_START( aha1542 )
157157    ROM_REGION( 0x8000, "aha1542", 0 )
158158   ROM_LOAD( "553601-00.u16", 0x0000, 0x8000, CRC(AB22FC02) SHA1(f9f783e0272fc14ba3de32316997f1f6cadc67d0) ) /* Adaptec 1540CF/1542CF BIOS v2.01 */
r14369r14370
190190{
191191}
192192
193void aha1542_device::device_config_complete()
193void aha1542_device::device_config_complete()
194194{
195195   m_shortname = "aha1542";
196196}
197     
197
198198void aha1542_device::device_start()
199199{
200200   set_isa_device();
201201   m_isa->install_rom(this, 0xdc000, 0xdffff, 0, 0, "aha1542", "aha1542");
202   m_isa->install_device(0x330, 0x333, 0, 0, read8_delegate(FUNC( aha1542_device::aha1542_r ), this),
202   m_isa->install_device(0x330, 0x333, 0, 0, read8_delegate(FUNC( aha1542_device::aha1542_r ), this),
203203   write8_delegate(FUNC( aha1542_device::aha1542_w ), this) );
204204}
205205
src/mess/machine/isa_aha1542.h
r14369r14370
4141
4242   DECLARE_READ8_MEMBER( aha1542_r );
4343   DECLARE_WRITE8_MEMBER( aha1542_w );
44   
44
4545protected:
4646   // device-level overrides
4747   virtual void device_start();
r14369r14370
4949   virtual void device_config_complete();
5050
5151   // device_isa16_card_interface
52   
52
5353private:
5454   // internal state
5555};
src/mess/machine/c64exp.c
r14369r14370
9696   }
9797
9898   // set brief and instance name
99   update_names();   
99   update_names();
100100}
101101
102102
r14369r14370
134134         {
135135            fread(m_cart->c64_roml_pointer(), 0x2000);
136136            m_cart->c64_exrom_w(0);
137         
137
138138            if (size == 0x4000)
139139            {
140140               fread(m_cart->c64_romh_pointer(), 0x2000);
r14369r14370
151151         else if (!mame_stricmp(filetype(), "e0"))
152152         {
153153            fread(m_cart->c64_romh_pointer(), size);
154           
154
155155            m_cart->c64_game_w(0);
156156         }
157157      }
r14369r14370
167167            size = get_software_region_length("romh");
168168            if (size) memcpy(m_cart->c64_romh_pointer(), get_software_region("romh"), size);
169169            break;
170         
170
171171         case 0x4000:
172172            memcpy(m_cart->c64_roml_pointer(), get_software_region("roml"), 0x2000);
173173            memcpy(m_cart->c64_romh_pointer(), get_software_region("roml") + 0x2000, 0x2000);
174174            break;
175         
175
176176         default:
177177            return IMAGE_INIT_FAIL;
178178         }
src/mess/machine/c64exp.h
r14369r14370
172172
173173protected:
174174   c64_expansion_slot_device *m_slot;
175   
175
176176   int m_game;
177177   int m_exrom;
178178};
src/mess/machine/isa_ibm_mfc.c
r14369r14370
4343   PC_IRQ_TIMERA,
4444   PC_IRQ_TIMERB,
4545   PC_IRQ_RXRDY,
46   PC_IRQ_TXRDY,   
46   PC_IRQ_TXRDY,
4747};
4848
4949enum
r14369r14370
7373      m_pc_irq_state |= 1 << src;
7474   else
7575      m_pc_irq_state &= ~(1 << src);
76     
76
7777   update_pc_interrupts();
7878}
7979
r14369r14370
8585      // IRQs unmasked?
8686      if (m_tcr & TCR_TMSK)
8787      {
88         m_isa->irq3_w(m_pc_irq_state ? ASSERT_LINE : CLEAR_LINE);         
88         m_isa->irq3_w(m_pc_irq_state ? ASSERT_LINE : CLEAR_LINE);
8989      }
9090   }
9191}
r14369r14370
9696      m_z80_irq_state |= 1 << src;
9797   else
9898      m_z80_irq_state &= ~(1 << src);
99     
99
100100   update_z80_interrupts();
101101}
102102
r14369r14370
234234
235235   set_z80_interrupt(Z80_IRQ_TXRDY, BIT(data, 3));
236236   set_z80_interrupt(Z80_IRQ_RXRDY, BIT(data, 0));
237   
237
238238   m_z80_ppi_c = data;
239239}
240240
r14369r14370
378378         val = m_d71055c_0->read(space, offset);
379379         break;
380380      }
381     
381
382382      case 0xc:
383383      case 0xd:
384384      case 0xe:
385385      case 0xf:
386386      {
387         val = (m_pc_irq_state ? 0x80 : 0) | (m_pc_irq_state & 3);   
387         val = (m_pc_irq_state ? 0x80 : 0) | (m_pc_irq_state & 3);
388388         break;
389389      }
390390
r14369r14370
393393         fatalerror("Unhandled IBM MFC read from %d\n", offset);
394394      }
395395   }
396   
396
397397   return val;
398398}
399399
r14369r14370
535535   m_tcr = 0;
536536   m_pc_irq_state = 0;
537537   m_z80_irq_state = 0;
538}
No newline at end of file
538}
src/mess/machine/isa_ibm_mfc.h
r14369r14370
4343
4444      DECLARE_WRITE8_MEMBER( ppi1_o_a );
4545      DECLARE_READ8_MEMBER( ppi1_i_b );
46         
46
4747      DECLARE_WRITE8_MEMBER( ppi1_o_c );
48     
48
4949      DECLARE_READ8_MEMBER( ibm_mfc_r );
5050      DECLARE_WRITE8_MEMBER( ibm_mfc_w );
51     
51
5252      DECLARE_READ_LINE_MEMBER( d70151_dsr_r );
53                                                                                                 
53
5454      DECLARE_WRITE_LINE_MEMBER( d8253_clk0_out );
5555      DECLARE_WRITE_LINE_MEMBER( d8253_clk1_out );
56      DECLARE_WRITE_LINE_MEMBER( d8253_clk2_out );     
57     
56      DECLARE_WRITE_LINE_MEMBER( d8253_clk2_out );
57
5858      void                     set_z80_interrupt(int src, int state);
5959
6060protected:
src/mess/machine/vic10exp.c
r14369r14370
131131         if (!mame_stricmp(filetype(), "80"))
132132         {
133133            fread(m_cart->vic10_lorom_pointer(), 0x2000);
134           
134
135135            if (size == 0x4000)
136136            {
137137               fread(m_cart->vic10_uprom_pointer(), 0x2000);
r14369r14370
146146 
147147         size = get_software_region_length("uprom");
148148         if (size) memcpy(m_cart->vic10_uprom_pointer(), get_software_region("uprom"), size);
149         
149
150150         size = get_software_region_length("exram");
151151         if (size) m_cart->vic10_exram_pointer();
152152      }
src/mess/machine/vic10exp.h
r14369r14370
156156   virtual UINT8* vic10_exram_pointer() { return NULL; }
157157   virtual UINT8 vic10_exram_r(address_space &space, offs_t offset) { return 0; };
158158   virtual void vic10_exram_w(address_space &space, offs_t offset, UINT8 data) { };
159   
159
160160   // ROM
161161   virtual UINT8* vic10_lorom_pointer() { return NULL; }
162162   virtual UINT8 vic10_lorom_r(address_space &space, offs_t offset) { return 0; };
src/mess/includes/c64.h
r14369r14370
7373
7474   virtual void machine_start();
7575   virtual UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
76   
76
7777   void check_interrupts();
7878   void bankswitch(offs_t offset, offs_t va, int rw, int aec, int ba, int cas, int *casram, int *basic, int *kernal, int *charom, int *grw, int *io, int *roml, int *romh);
7979   UINT8 read_memory(address_space &space, offs_t offset, int casram, int basic, int kernal, int charom, int io, int roml, int romh);
80   
80
8181   DECLARE_READ8_MEMBER( read );
8282   DECLARE_WRITE8_MEMBER( write );
8383
r14369r14370
100100   DECLARE_WRITE_LINE_MEMBER( iec_srq_w );
101101   DECLARE_WRITE_LINE_MEMBER( exp_irq_w );
102102   DECLARE_WRITE_LINE_MEMBER( exp_nmi_w );
103   
103
104104   // memory state
105105   int m_loram;
106106   int m_hiram;
r14369r14370
108108   UINT8 *m_basic;
109109   UINT8 *m_kernal;
110110   UINT8 *m_charom;
111   
111
112112   // video state
113113   UINT8 *m_color_ram;
114114   int m_va14;
115115   int m_va15;
116   
116
117117   // interrupt state
118118   int m_cia1_irq;
119119   int m_cia2_irq;
src/mess/includes/vic10.h
r14369r14370
5050 
5151   virtual void machine_start();
5252   virtual UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
53   
53
5454   void check_interrupts();
55   
55
5656   DECLARE_READ8_MEMBER( vic_lightpen_x_cb );
5757   DECLARE_READ8_MEMBER( vic_lightpen_y_cb );
5858   DECLARE_READ8_MEMBER( vic_lightpen_button_cb );
r14369r14370
6767   DECLARE_READ8_MEMBER( cpu_r );
6868   DECLARE_WRITE8_MEMBER( cpu_w );
6969   DECLARE_WRITE_LINE_MEMBER( exp_irq_w );
70   
70
7171   // video state
7272   UINT8 *m_color_ram;
73   
73
7474   // interrupt state
7575   int m_cia_irq;
7676   int m_vic_irq;
src/mess/drivers/x1.c
r14369r14370
16401640
16411641WRITE8_MEMBER( x1_state::x1_io_w )
16421642{
1643   if(m_io_bank_mode == 1)                     { x1_ex_gfxram_w(space, offset, data); }
1643   if(m_io_bank_mode == 1)                    { x1_ex_gfxram_w(space, offset, data); }
16441644   // TODO: user could install ym2151 on plain X1 too
16451645   //0x700, 0x701
16461646//  else if(offset >= 0x0704 && offset <= 0x0707)   { z80ctc_w(m_ctc, offset-0x0704,data); }
src/mess/drivers/at.c
r14369r14370
395395   MCFG_SPEAKER_STANDARD_MONO("mono")
396396   MCFG_SOUND_ADD(SPEAKER_TAG, SPEAKER_SOUND, 0)
397397   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
398   
398
399399   /* video hardware */
400400   MCFG_PALETTE_LENGTH( 256 )
401401MACHINE_CONFIG_END
src/mess/drivers/c64.c
r14369r14370
11/*
22
3   TODO:
4   
5   - 64C PLA dump
6   - cartridge loading
3    TODO:
74
5    - 64C PLA dump
6    - cartridge loading
7
88*/
99
1010#include "includes/c64.h"
r14369r14370
3535void c64_state::check_interrupts()
3636{
3737   int restore = BIT(input_port_read(machine(), "SPECIAL"), 7);
38   
38
3939   m_maincpu->set_input_line(INPUT_LINE_IRQ0, m_cia1_irq | m_vic_irq | m_exp_irq);
4040   m_maincpu->set_input_line(INPUT_LINE_NMI, m_cia2_irq | restore | m_exp_nmi);
41   
41
4242   mos6526_flag_w(m_cia1, m_cass_rd & m_iec_srq);
4343}
4444
r14369r14370
5959
6060   UINT16 input = VA12 << 15 | VA13 << 14 | game << 13 | exrom << 12 | rw << 11 | aec << 10 | ba << 9 | A12 << 8 | A13 << 7 | A14 << 6 | A15 << 5 | m_va14 << 4 | m_charen << 3 | m_hiram << 2 | m_loram << 1 | cas;
6161   UINT8 data = m_pla->read(input);
62   
62
6363   *casram = BIT(data, 0);
6464   *basic = BIT(data, 1);
6565   *kernal = BIT(data, 2);
r14369r14370
7878UINT8 c64_state::read_memory(address_space &space, offs_t offset, int casram, int basic, int kernal, int charom, int io, int roml, int romh)
7979{
8080   UINT8 data = 0;
81   
81
8282   if (!casram)
8383   {
8484      data = m_ram->pointer()[offset];
r14369r14370
119119               cia_set_port_mask_value(m_cia1, 1, input_port_read(machine(), "CTRLSEL") & 0x80 ? c64_keyline[9] : c64_keyline[8] );
120120            else
121121               cia_set_port_mask_value(m_cia1, 0, input_port_read(machine(), "CTRLSEL") & 0x80 ? c64_keyline[8] : c64_keyline[9] );
122               
122
123123            data = mos6526_r(m_cia1, offset & 0x0f);
124124            break;
125           
125
126126         case 1: // CIA2
127127            data = mos6526_r(m_cia2, offset & 0x0f);
128128            break;
129           
129
130130         case 2: // I/O1
131131            data = m_exp->io1_r(space, offset);
132132            break;
133           
133
134134         case 3: // I/O2
135135            data = m_exp->io2_r(space, offset);
136136            break;
r14369r14370
146146   {
147147      data = m_exp->romh_r(space, offset);
148148   }
149   
149
150150   return data;
151151}
152152
r14369r14370
158158READ8_MEMBER( c64_state::read )
159159{
160160   int casram, basic, kernal, charom, grw, io, roml, romh;
161   
161
162162   bankswitch(offset, 0, 1, 0, 1, 0, &casram, &basic, &kernal, &charom, &grw, &io, &roml, &romh);
163   
163
164164   return read_memory(space, offset, casram, basic, kernal, charom, io, roml, romh);
165165}
166166
r14369r14370
172172WRITE8_MEMBER( c64_state::write )
173173{
174174   int casram, basic, kernal, charom, grw, io, roml, romh;
175   
175
176176   bankswitch(offset, 0, 0, 0, 1, 0, &casram, &basic, &kernal, &charom, &grw, &io, &roml, &romh);
177177
178178   if (!casram)
r14369r14370
201201         case 0: // CIA1
202202            mos6526_w(m_cia1, offset & 0x0f, data);
203203            break;
204           
204
205205         case 1: // CIA2
206206            mos6526_w(m_cia2, offset & 0x0f, data);
207207            break;
208           
208
209209         case 2: // I/O1
210210            m_exp->io1_w(space, offset, data);
211211            break;
212           
212
213213         case 3: // I/O2
214214            m_exp->io2_w(space, offset, data);
215215            break;
r14369r14370
354354static INTERRUPT_GEN( c64_frame_interrupt )
355355{
356356   c64_state *state = device->machine().driver_data<c64_state>();
357   
357
358358   state->check_interrupts();
359359   cbm_common_interrupt(device);
360360}
r14369r14370
377377READ8_MEMBER( c64_state::vic_dma_read )
378378{
379379   int casram, basic, kernal, charom, grw, io, roml, romh;
380   
380
381381   offset = (!m_va15 << 15) | (!m_va14 << 14) | offset;
382   
382
383383   bankswitch(0, offset, 1, 1, 0, 0, &casram, &basic, &kernal, &charom, &grw, &io, &roml, &romh);
384   
384
385385   return read_memory(space, offset, casram, basic, kernal, charom, io, roml, romh);
386386}
387387
r14369r14370
393393WRITE_LINE_MEMBER( c64_state::vic_irq_w )
394394{
395395   m_vic_irq = state;
396   
396
397397   check_interrupts();
398398}
399399
r14369r14370
402402   return input_port_read(machine(), "CYCLES") & 0x07;
403403}
404404
405static const vic2_interface vic_ntsc_intf =
405static const vic2_interface vic_ntsc_intf =
406406{
407407   SCREEN_TAG,
408408   M6510_TAG,
r14369r14370
416416   DEVCB_DRIVER_MEMBER(c64_state, vic_rdy_cb)
417417};
418418
419static const vic2_interface vic_pal_intf =
419static const vic2_interface vic_pal_intf =
420420{
421421   SCREEN_TAG,
422422   M6510_TAG,
r14369r14370
439439{
440440   running_machine &machine = device->machine();
441441   c64_state *state = device->machine().driver_data<c64_state>();
442   
442
443443   int pot1 = 0xff, pot2 = 0xff, pot3 = 0xff, pot4 = 0xff, temp;
444444   UINT8 cia0porta = mos6526_pa_r(state->m_cia1, 0);
445445   int controller1 = input_port_read(machine, "CTRLSEL") & 0x07;
r14369r14370
564564WRITE_LINE_MEMBER( c64_state::cia1_irq_w )
565565{
566566   m_cia1_irq = state;
567   
567
568568   check_interrupts();
569569}
570570
571571READ8_MEMBER( c64_state::cia1_pa_r )
572572{
573573   /*
574     
575      bit      description
576     
577      PA0      COL0, JOY B0
578      PA1      COL1, JOY B1
579      PA2      COL2, JOY B2
580      PA3      COL3, JOY B3
581      PA4      COL4, BTNB
582      PA5      COL5
583      PA6      COL6
584      PA7      COL7
585     
586   */
587574
575        bit     description
576
577        PA0     COL0, JOY B0
578        PA1     COL1, JOY B1
579        PA2     COL2, JOY B2
580        PA3     COL3, JOY B3
581        PA4     COL4, BTNB
582        PA5     COL5
583        PA6     COL6
584        PA7     COL7
585
586    */
587
588588   UINT8 cia0portb = mos6526_pb_r(m_cia1, 0);
589589
590590   return cbm_common_cia0_port_a_r(m_cia1, cia0portb);
r14369r14370
593593READ8_MEMBER( c64_state::cia1_pb_r )
594594{
595595   /*
596     
597      bit      description
598     
599      PB0      JOY A0
600      PB1      JOY A1
601      PB2      JOY A2
602      PB3      JOY A3
603      PB4      BTNA/_LP
604      PB5
605      PB6
606      PB7
607     
608   */
609596
597        bit     description
598
599        PB0     JOY A0
600        PB1     JOY A1
601        PB2     JOY A2
602        PB3     JOY A3
603        PB4     BTNA/_LP
604        PB5
605        PB6
606        PB7
607
608    */
609
610610   UINT8 cia0porta = mos6526_pa_r(m_cia1, 0);
611611
612612   return cbm_common_cia0_port_b_r(m_cia1, cia0porta);
r14369r14370
615615WRITE8_MEMBER( c64_state::cia1_pb_w )
616616{
617617   /*
618     
619      bit      description
620     
621      PB0      ROW0
622      PB1      ROW1
623      PB2      ROW2
624      PB3      ROW3
625      PB4      ROW4
626      PB5      ROW5
627      PB6      ROW6
628      PB7      ROW7
629     
630   */
631   
618
619        bit     description
620
621        PB0     ROW0
622        PB1     ROW1
623        PB2     ROW2
624        PB3     ROW3
625        PB4     ROW4
626        PB5     ROW5
627        PB6     ROW6
628        PB7     ROW7
629
630    */
631
632632   vic2_lightpen_write(m_vic, BIT(data, 4));
633633}
634634
r14369r14370
653653WRITE_LINE_MEMBER( c64_state::cia2_irq_w )
654654{
655655   m_cia2_irq = state;
656   
656
657657   check_interrupts();
658658}
659659
660660READ8_MEMBER( c64_state::cia2_pa_r )
661661{
662662   /*
663     
664      bit      description
665     
666      PA0
667      PA1
668      PA2      USER PORT
669      PA3
670      PA4
671      PA5
672      PA6      CLK
673      PA7      DATA
674     
675   */
676   
663
664        bit     description
665
666        PA0
667        PA1
668        PA2     USER PORT
669        PA3
670        PA4
671        PA5
672        PA6     CLK
673        PA7     DATA
674
675    */
676
677677   UINT8 data = 0;
678   
678
679679   // user port
680680   data |= m_user->pa2_r() << 2;
681   
681
682682   // IEC bus
683683   data |= m_iec->clk_r() << 6;
684684   data |= m_iec->data_r() << 7;
685   
685
686686   return data;
687687}
688688
689689WRITE8_MEMBER( c64_state::cia2_pa_w )
690690{
691691   /*
692     
693      bit      description
694     
695      PA0      _VA14
696      PA1      _VA15
697      PA2      USER PORT
698      PA3      ATN OUT
699      PA4      CLK OUT
700      PA5      DATA OUT
701      PA6
702      PA7
703     
704   */
705   
692
693        bit     description
694
695        PA0     _VA14
696        PA1     _VA15
697        PA2     USER PORT
698        PA3     ATN OUT
699        PA4     CLK OUT
700        PA5     DATA OUT
701        PA6
702        PA7
703
704    */
705
706706   // VIC banking
707707   m_va14 = BIT(data, 0);
708708   m_va15 = BIT(data, 1);
709   
709
710710   // user port
711711   m_user->pa2_w(BIT(data, 2));
712   
712
713713   // IEC bus
714714   m_iec->atn_w(!BIT(data, 3));
715715   m_iec->clk_w(!BIT(data, 4));
r14369r14370
737737READ8_MEMBER( c64_state::cpu_r )
738738{
739739   /*
740     
741      bit      description
742     
743      P0      1
744      P1      1
745      P2      1
746      P3
747      P4      CASS SENS
748      P5     
749     
750   */
751   
740
741        bit     description
742
743        P0      1
744        P1      1
745        P2      1
746        P3
747        P4      CASS SENS
748        P5
749
750    */
751
752752   UINT8 data = 0x07;
753   
753
754754   data |= ((m_cassette->get_state() & CASSETTE_MASK_UISTATE) == CASSETTE_STOPPED) << 4;
755   
755
756756   return data;
757757}
758758
759759WRITE8_MEMBER( c64_state::cpu_w )
760760{
761761   /*
762     
763      bit      description
764     
765      P0      LORAM
766      P1      HIRAM
767      P2      CHAREN
768      P3      CASS WRT
769      P4
770      P5      CASS MOTOR
771     
772   */
773762
763        bit     description
764
765        P0      LORAM
766        P1      HIRAM
767        P2      CHAREN
768        P3      CASS WRT
769        P4
770        P5      CASS MOTOR
771
772    */
773
774774   // HACK apply pull-up resistors
775775   data |= (offset ^ 0x07) & 0x07;
776   
776
777777   m_loram = BIT(data, 0);
778778   m_hiram = BIT(data, 1);
779779   m_charen = BIT(data, 2);
780   
780
781781   // cassette write
782782   m_cassette->output(BIT(data, 3) ? -(0x5a9e >> 1) : +(0x5a9e >> 1));
783   
783
784784   // cassette motor
785785   if (!BIT(data, 5))
786786   {
r14369r14370
810810READ8_MEMBER( sx64_state::cpu_r )
811811{
812812   /*
813     
814      bit      description
815     
816      P0      1
817      P1      1
818      P2      1
819      P3      1
820      P4      1
821      P5      1
822     
823   */
824813
814        bit     description
815
816        P0      1
817        P1      1
818        P2      1
819        P3      1
820        P4      1
821        P5      1
822
823    */
824
825825   return 0x3f;
826826}
827827
828828WRITE8_MEMBER( sx64_state::cpu_w )
829829{
830830   /*
831     
832      bit      description
833     
834      P0      LORAM
835      P1      HIRAM
836      P2      CHAREN
837      P3     
838      P4
839      P5     
840     
841   */
842831
832        bit     description
833
834        P0      LORAM
835        P1      HIRAM
836        P2      CHAREN
837        P3
838        P4
839        P5
840
841    */
842
843843   // HACK apply pull-up resistors
844844   data |= (offset ^ 0x07) & 0x07;
845   
845
846846   m_loram = BIT(data, 0);
847847   m_hiram = BIT(data, 1);
848848   m_charen = BIT(data, 2);
r14369r14370
864864READ8_MEMBER( c64gs_state::cpu_r )
865865{
866866   /*
867     
868      bit      description
869     
870      P0      1
871      P1      1
872      P2      1
873      P3      1
874      P4      1
875      P5      1
876     
877   */
878867
868        bit     description
869
870        P0      1
871        P1      1
872        P2      1
873        P3      1
874        P4      1
875        P5      1
876
877    */
878
879879   return 0x3f;
880880}
881881
882882WRITE8_MEMBER( c64gs_state::cpu_w )
883883{
884884   /*
885     
886      bit      description
887     
888      P0      LORAM
889      P1      HIRAM
890      P2      CHAREN
891      P3     
892      P4
893      P5     
894     
895   */
896885
886        bit     description
887
888        P0      LORAM
889        P1      HIRAM
890        P2      CHAREN
891        P3
892        P4
893        P5
894
895    */
896
897897   // HACK apply pull-up resistors
898898   data |= (offset ^ 0x07) & 0x07;
899   
899
900900   m_loram = BIT(data, 0);
901901   m_hiram = BIT(data, 1);
902902   m_charen = BIT(data, 2);
r14369r14370
920920   c64_state *state = timer.machine().driver_data<c64_state>();
921921
922922   state->m_cass_rd = state->m_cassette->input() > +0.0;
923   
923
924924   state->check_interrupts();
925925}
926926
r14369r14370
932932WRITE_LINE_MEMBER( c64_state::iec_srq_w )
933933{
934934   m_iec_srq = state;
935   
935
936936   check_interrupts();
937937}
938938
r14369r14370
953953WRITE_LINE_MEMBER( c64_state::exp_irq_w )
954954{
955955   m_exp_irq = state;
956   
956
957957   check_interrupts();
958958}
959959
960960WRITE_LINE_MEMBER( c64_state::exp_nmi_w )
961961{
962962   m_exp_nmi = state;
963   
963
964964   check_interrupts();
965965}
966966
r14369r14370
10031003   m_basic = machine().region("basic")->base();
10041004   m_kernal = machine().region("kernal")->base();
10051005   m_charom = machine().region("charom")->base();
1006   
1006
10071007   // allocate memory
10081008   m_color_ram = auto_alloc_array(machine(), UINT8, 0x400);
1009   
1009
10101010   // state saving
10111011   save_item(NAME(m_loram));
10121012   save_item(NAME(m_hiram));
r14369r14370
10311031void c64c_state::machine_start()
10321032{
10331033   c64_state::machine_start();
1034   
1034
10351035   // find memory regions
10361036   m_basic = machine().region(M6510_TAG)->base();
10371037   m_kernal = machine().region(M6510_TAG)->base() + 0x2000;
r14369r14370
15401540
15411541   ROM_REGION( 0x1000, "charom", 0 )
15421542   ROM_LOAD( "901225-01.u5", 0x0000, 0x1000, CRC(ec4272ee) SHA1(adc7c31e18c7c7413d54802ef2f4193da14711aa) )
1543   
1543
15441544   ROM_REGION( 0xf5, PLA_TAG, 0 )
15451545   ROM_LOAD( "906114-01.u17", 0x00, 0xf5, CRC(54c89351) SHA1(efb315f560b6f72444b8f0b2ca4b0ccbcd144a1b) )
15461546ROM_END
r14369r14370
15591559
15601560   ROM_REGION( 0x1000, "charom", 0 )
15611561   ROM_LOAD( "906143-02.u5", 0x0000, 0x1000, CRC(1604f6c1) SHA1(0fad19dbcdb12461c99657b2979dbb5c2e47b527) )
1562   
1562
15631563   ROM_REGION( 0xf5, PLA_TAG, 0 )
15641564   ROM_LOAD( "906114-01.u17", 0x00, 0xf5, CRC(54c89351) SHA1(efb315f560b6f72444b8f0b2ca4b0ccbcd144a1b) )
15651565ROM_END
r14369r14370
15881588   ROMX_LOAD( "charswe.u5", 0x0000, 0x1000, CRC(bee9b3fd) SHA1(446ae58f7110d74d434301491209299f66798d8a), ROM_BIOS(1) )
15891589   ROM_SYSTEM_BIOS( 1, "alt", "Swedish Characters (Alt)" )
15901590   ROMX_LOAD( "charswe2.u5", 0x0000, 0x1000, CRC(377a382b) SHA1(20df25e0ba1c88f31689c1521397c96968967fac), ROM_BIOS(2) )
1591   
1591
15921592   ROM_REGION( 0xf5, PLA_TAG, 0 )
15931593   ROM_LOAD( "906114-01.u17", 0x00, 0xf5, CRC(54c89351) SHA1(efb315f560b6f72444b8f0b2ca4b0ccbcd144a1b) )
15941594ROM_END
r14369r14370
16071607
16081608   ROM_REGION( 0x1000, "charom", 0 )
16091609   ROM_LOAD( "901225-01.u5", 0x0000, 0x1000, CRC(ec4272ee) SHA1(adc7c31e18c7c7413d54802ef2f4193da14711aa) )
1610   
1610
16111611   ROM_REGION( 0xf5, PLA_TAG, 0 )
16121612   ROM_LOAD( "906114-01.u17", 0x00, 0xf5, CRC(54c89351) SHA1(efb315f560b6f72444b8f0b2ca4b0ccbcd144a1b) )
16131613ROM_END
r14369r14370
16611661
16621662   ROM_REGION( 0x2000, "kernal", 0 )
16631663   ROM_LOAD( "kernelsx.ud3", 0x0000, 0x2000, CRC(7858d3d7) SHA1(097cda60469492a8916c2677b7cce4e12a944bc0) )
1664   
1664
16651665   ROM_REGION( 0x1000, "charom", 0 )
16661666   ROM_LOAD( "charswe.ud1", 0x0000, 0x1000, CRC(bee9b3fd) SHA1(446ae58f7110d74d434301491209299f66798d8a) )
16671667
r14369r14370
16751675//-------------------------------------------------
16761676
16771677// ROM_LOAD( "dx64kern.bin", 0x0000, 0x2000, CRC(58065128) ) TODO where is this illusive ROM?
1678#define rom_dx64    rom_sx64n
1678#define rom_dx64   rom_sx64n
16791679
16801680
16811681//-------------------------------------------------
r14369r14370
17451745//  SYSTEM DRIVERS
17461746//**************************************************************************
17471747
1748//    YEAR  NAME    PARENT  COMPAT  MACHINE    INPUT      INIT    COMPANY                        FULLNAME                               FLAGS
1749COMP( 1982,   c64n,   0,     0,      ntsc,      c64,      0,      "Commodore Business Machines", "Commodore 64 (NTSC)",                    0 )
1750COMP( 1982,   c64j,   c64n,     0,      ntsc,      c64,      0,      "Commodore Business Machines", "Commodore 64 (Japan)",                   0 )
1751COMP( 1982,   c64p,   c64n,     0,      pal,      c64,      0,      "Commodore Business Machines", "Commodore 64 (PAL)",                    0 )
1752COMP( 1982,   c64sw,   c64n,   0,      pal,      c64sw,      0,      "Commodore Business Machines", "Commodore 64 / VIC-64S (Sweden/Finland)",    0 )
1753COMP( 1983, pet64,   c64n,     0,       pet64,      c64,        0,        "Commodore Business Machines", "PET 64 / CBM 4064 (NTSC)",                0 )
1754COMP( 1983, edu64,  c64n,     0,       pet64,      c64,        0,        "Commodore Business Machines", "Educator 64 (NTSC)",                   0 )
1755COMP( 1984, sx64n,   c64n,   0,      ntsc_sx,   c64,      0,      "Commodore Business Machines", "SX-64 / Executive 64 (NTSC)",             0 )
1756COMP( 1984, sx64p,   c64n,   0,      pal_sx,      c64,      0,      "Commodore Business Machines", "SX-64 / Executive 64 (PAL)",             0 )
1748//    YEAR  NAME    PARENT  COMPAT  MACHINE     INPUT       INIT    COMPANY                        FULLNAME                                     FLAGS
1749COMP( 1982,   c64n,   0,     0,      ntsc,      c64,      0,      "Commodore Business Machines", "Commodore 64 (NTSC)",                  0 )
1750COMP( 1982,   c64j,   c64n,   0,      ntsc,      c64,      0,      "Commodore Business Machines", "Commodore 64 (Japan)",                  0 )
1751COMP( 1982,   c64p,   c64n,   0,      pal,      c64,      0,      "Commodore Business Machines", "Commodore 64 (PAL)",                  0 )
1752COMP( 1982,   c64sw,   c64n,   0,      pal,      c64sw,      0,      "Commodore Business Machines", "Commodore 64 / VIC-64S (Sweden/Finland)",   0 )
1753COMP( 1983, pet64,   c64n,   0,     pet64,     c64,       0,     "Commodore Business Machines", "PET 64 / CBM 4064 (NTSC)",               0 )
1754COMP( 1983, edu64,  c64n,   0,     pet64,     c64,       0,     "Commodore Business Machines", "Educator 64 (NTSC)",                  0 )
1755COMP( 1984, sx64n,   c64n,   0,      ntsc_sx,   c64,      0,      "Commodore Business Machines", "SX-64 / Executive 64 (NTSC)",            0 )
1756COMP( 1984, sx64p,   c64n,   0,      pal_sx,      c64,      0,      "Commodore Business Machines", "SX-64 / Executive 64 (PAL)",            0 )
17571757COMP( 1984, vip64,   c64n,   0,      pal_sx,      c64sw,      0,      "Commodore Business Machines", "VIP-64 (Sweden/Finland)",               0 )
1758COMP( 1984, dx64,   c64n,   0,      ntsc_dx,   c64,      0,      "Commodore Business Machines", "DX-64 (NTSC)",                         0 )
1758COMP( 1984, dx64,   c64n,   0,      ntsc_dx,   c64,      0,      "Commodore Business Machines", "DX-64 (NTSC)",                        0 )
17591759//COMP(1983, clipper,  c64,  0, c64pal,  clipper, c64pal,  "PDC", "Clipper", GAME_NOT_WORKING) // C64 in a briefcase with 3" floppy, electroluminescent flat screen, thermal printer
17601760//COMP(1983, tesa6240, c64,  0, c64pal,  c64,     c64pal,  "Tesa", "6240", GAME_NOT_WORKING) // modified SX64 with label printer
1761COMP( 1986, c64cn,   c64n,   0,       ntsc_c,      c64,      0,      "Commodore Business Machines", "Commodore 64C (NTSC)",                   0 )
1762COMP( 1986, c64cp,   c64n,   0,       pal_c,      c64,      0,      "Commodore Business Machines", "Commodore 64C (PAL)",                   0 )
1763COMP( 1986, c64csw,   c64n,   0,       pal_c,      c64sw,      0,      "Commodore Business Machines", "Commodore 64C (Sweden/Finland)",          0 )
1764COMP( 1986, c64g,   c64n,   0,      pal_c,      c64,      0,      "Commodore Business Machines", "Commodore 64G (PAL)",                   0 )
1765CONS( 1990, c64gs,   c64n,   0,      pal_gs,      c64gs,      0,      "Commodore Business Machines", "Commodore 64 Games System (PAL)",          0 )
1761COMP( 1986, c64cn,   c64n,   0,     ntsc_c,      c64,      0,      "Commodore Business Machines", "Commodore 64C (NTSC)",                  0 )
1762COMP( 1986, c64cp,   c64n,   0,     pal_c,      c64,      0,      "Commodore Business Machines", "Commodore 64C (PAL)",                  0 )
1763COMP( 1986, c64csw,   c64n,   0,     pal_c,      c64sw,      0,      "Commodore Business Machines", "Commodore 64C (Sweden/Finland)",         0 )
1764COMP( 1986, c64g,   c64n,   0,      pal_c,      c64,      0,      "Commodore Business Machines", "Commodore 64G (PAL)",                  0 )
1765CONS( 1990, c64gs,   c64n,   0,      pal_gs,      c64gs,      0,      "Commodore Business Machines", "Commodore 64 Games System (PAL)",         0 )
src/mess/drivers/vic10.c
r14369r14370
11/*
22 
3   TODO:
3    TODO:
44 
5   - memory mapping with PLA
6   - PLA dump
5    - memory mapping with PLA
6    - PLA dump
77 
88*/
99 
r14369r14370
128128READ8_MEMBER( vic10_state::vic_dma_read )
129129{
130130   address_space *program = m_maincpu->memory().space(AS_PROGRAM);
131   
131
132132   if (offset < 0x3000)
133133      return program->read_byte(offset);
134134 
r14369r14370
143143WRITE_LINE_MEMBER( vic10_state::vic_irq_w )
144144{
145145   m_vic_irq = state;
146   
146
147147   check_interrupts();
148148}
149149 
r14369r14370
152152   return input_port_read(machine(), "CYCLES") & 0x07;
153153}
154154 
155static const vic2_interface vic_intf =
155static const vic2_interface vic_intf =
156156{
157157   SCREEN_TAG,
158158   M6510_TAG,
r14369r14370
175175{
176176   running_machine &machine = device->machine();
177177   vic10_state *state = device->machine().driver_data<vic10_state>();
178   
178
179179   int pot1 = 0xff, pot2 = 0xff, pot3 = 0xff, pot4 = 0xff, temp;
180180   UINT8 cia0porta = mos6526_pa_r(state->m_cia, 0);
181181   int controller1 = input_port_read(machine, "CTRLSEL") & 0x07;
r14369r14370
300300WRITE_LINE_MEMBER( vic10_state::cia_irq_w )
301301{
302302   m_cia_irq = state;
303   
303
304304   check_interrupts();
305305}
306306 
307307READ8_MEMBER( vic10_state::cia_pa_r )
308308{
309309   /*
310       
311      bit      description
312       
313      PA0      COL0, JOY B0
314      PA1      COL1, JOY B1
315      PA2      COL2, JOY B2
316      PA3      COL3, JOY B3
317      PA4      COL4, BTNB
318      PA5      COL5
319      PA6      COL6
320      PA7      COL7
321       
322   */
323310 
311        bit     description
312 
313        PA0     COL0, JOY B0
314        PA1     COL1, JOY B1
315        PA2     COL2, JOY B2
316        PA3     COL3, JOY B3
317        PA4     COL4, BTNB
318        PA5     COL5
319        PA6     COL6
320        PA7     COL7
321 
322    */
323 
324324   UINT8 cia0portb = mos6526_pb_r(m_cia, 0);
325325 
326326   return cbm_common_cia0_port_a_r(m_cia, cia0portb);
r14369r14370
329329READ8_MEMBER( vic10_state::cia_pb_r )
330330{
331331   /*
332       
333      bit      description
334       
335      PB0      JOY A0
336      PB1      JOY A1
337      PB2      JOY A2
338      PB3      JOY A3
339      PB4      BTNA/_LP
340      PB5
341      PB6
342      PB7
343       
344   */
345332 
333        bit     description
334 
335        PB0     JOY A0
336        PB1     JOY A1
337        PB2     JOY A2
338        PB3     JOY A3
339        PB4     BTNA/_LP
340        PB5
341        PB6
342        PB7
343 
344    */
345 
346346   UINT8 cia0porta = mos6526_pa_r(m_cia, 0);
347347 
348348   return cbm_common_cia0_port_b_r(m_cia, cia0porta);
r14369r14370
351351WRITE8_MEMBER( vic10_state::cia_pb_w )
352352{
353353   /*
354       
355      bit      description
356       
357      PB0      ROW0
358      PB1      ROW1
359      PB2      ROW2
360      PB3      ROW3
361      PB4      ROW4
362      PB5      ROW5
363      PB6      ROW6
364      PB7      ROW7
365       
366   */
367   
354 
355        bit     description
356 
357        PB0     ROW0
358        PB1     ROW1
359        PB2     ROW2
360        PB3     ROW3
361        PB4     ROW4
362        PB5     ROW5
363        PB6     ROW6
364        PB7     ROW7
365 
366    */
367 
368368   vic2_lightpen_write(m_vic, BIT(data, 4));
369369}
370370 
r14369r14370
389389READ8_MEMBER( vic10_state::cpu_r )
390390{
391391   /*
392       
393      bit      description
394       
395      P0      EXPANSION PORT
396      P1      1
397      P2      1
398      P3
399      P4      CASS SENS
400      P5       
401       
402   */
403   
392 
393        bit     description
394 
395        P0      EXPANSION PORT
396        P1      1
397        P2      1
398        P3
399        P4      CASS SENS
400        P5
401 
402    */
403 
404404   UINT8 data = 0x06;
405   
405
406406   data |= m_exp->p0_r();
407   
407
408408   data |= ((m_cassette->get_state() & CASSETTE_MASK_UISTATE) == CASSETTE_STOPPED) << 4;
409   
409
410410   return data;
411411}
412412 
413413WRITE8_MEMBER( vic10_state::cpu_w )
414414{
415415   /*
416       
417      bit      description
418       
419      P0      EXPANSION PORT
420      P1       
421      P2       
422      P3      CASS WRT
423      P4
424      P5      CASS MOTOR
425       
426   */
427   
416 
417        bit     description
418 
419        P0      EXPANSION PORT
420        P1
421        P2
422        P3      CASS WRT
423        P4
424        P5      CASS MOTOR
425 
426    */
427 
428428   if (BIT(offset, 0))
429429   {
430430      m_exp->p0_w(BIT(data, 0));
r14369r14370
432432 
433433   // cassette write
434434   m_cassette->output(BIT(data, 3) ? -(0x5a9e >> 1) : +(0x5a9e >> 1));
435   
435
436436   // cassette motor
437437   if (!BIT(data, 5))
438438   {
r14369r14370
474474WRITE_LINE_MEMBER( vic10_state::exp_irq_w )
475475{
476476   m_exp_irq = state;
477   
477
478478   check_interrupts();
479479}
480480 

Previous 15994 Revisions Next


© 1998-2018 The MESS Team