Previous 199869 Revisions Next

r32193 Friday 19th September, 2014 at 06:12:05 UTC by Fabio Priuli
(MESS) a couple more. nw.
[src/emu/bus/generic]slot.h
[src/mess/drivers]aim65.c atom.c c128.c
[src/mess/includes]atom.h c128.h

trunk/src/emu/bus/generic/slot.h
r32192r32193
6868
6969
7070
71typedef device_delegate<void (int layer, int bank, int *code, int *color, int *flags)> generic_load_delegate;
72
73
7471// ======================> generic_slot_device
7572
7673class generic_slot_device : public device_t,
trunk/src/mess/drivers/atom.c
r32192r32193
125125***************************************************************************/
126126
127127/*-------------------------------------------------
128    image_fread_memory - read image to memory
129-------------------------------------------------*/
130
131void atom_state::image_fread_memory(device_image_interface &image, UINT16 addr, UINT32 count)
132{
133   void *ptr = m_maincpu->space(AS_PROGRAM).get_write_ptr(addr);
134
135   image.fread( ptr, count);
136}
137
138/*-------------------------------------------------
139128    QUICKLOAD_LOAD_MEMBER( atom_state, atom_atm )
140129-------------------------------------------------*/
141130
r32192r32193
156145   */
157146
158147   UINT8 header[0x16] = { 0 };
148   void *ptr;
159149
160150   image.fread(header, 0x16);
161151
r32192r32193
172162      logerror("ATM size: %04x\n", size);
173163   }
174164
175   image_fread_memory(image, start_address, size);
165   ptr = m_maincpu->space(AS_PROGRAM).get_write_ptr(start_address);
166   image.fread(ptr, size);
176167
177168   m_maincpu->set_pc(run_address);
178169
r32192r32193
184175***************************************************************************/
185176
186177/*-------------------------------------------------
187    bankswitch - EPROM bankswitch
188-------------------------------------------------*/
189
190void atom_state::bankswitch()
191{
192   address_space &program = m_maincpu->space(AS_PROGRAM);
193
194   UINT8 *eprom = m_extrom->base() + (m_eprom << 12);
195
196   program.install_rom(0xa000, 0xafff, eprom);
197}
198
199/*-------------------------------------------------
200178     eprom_r - EPROM slot select read
201179-------------------------------------------------*/
202180
203READ8_MEMBER( atom_state::eprom_r )
181READ8_MEMBER( atomeb_state::eprom_r )
204182{
205183   return m_eprom;
206184}
r32192r32193
209187     eprom_w - EPROM slot select write
210188-------------------------------------------------*/
211189
212WRITE8_MEMBER( atom_state::eprom_w )
190WRITE8_MEMBER( atomeb_state::eprom_w )
213191{
214192   /*
215193
r32192r32193
226204
227205   */
228206
229   /* block A */
230   m_eprom = data & 0x0f;
207   /* block A and E */
208   m_eprom = data;
209}
231210
232   /* TODO block E */
211/*-------------------------------------------------
212 ext_r - read external roms at 0xa000
213 -------------------------------------------------*/
233214
234   bankswitch();
215READ8_MEMBER( atomeb_state::ext_r )
216{
217   if (m_ext[m_eprom & 0x0f]->cart_mounted())
218      return m_ext[m_eprom & 0x0f]->read_rom(space, offset);
219   else
220      return 0xff;
235221}
236222
223/*-------------------------------------------------
224 dor_r - read DOS roms at 0xe000
225 -------------------------------------------------*/
226
227READ8_MEMBER( atomeb_state::dos_r )
228{
229   if (m_e0->cart_mounted() && !BIT(m_eprom, 7))
230      return m_e0->read_rom(space, offset);
231   else if (m_e1->cart_mounted() && BIT(m_eprom, 7))
232      return m_e1->read_rom(space, offset);
233   else
234      return 0xff;
235}
236
237
237238/***************************************************************************
238239    MEMORY MAPS
239240***************************************************************************/
r32192r32193
249250   AM_RANGE(0x0a05, 0x7fff) AM_RAM
250251   AM_RANGE(0x8000, 0x97ff) AM_RAM AM_SHARE("video_ram")
251252   AM_RANGE(0x9800, 0x9fff) AM_RAM
252   AM_RANGE(0xa000, 0xafff) AM_ROM AM_REGION(EXTROM_TAG, 0)
253//  AM_RANGE(0xa000, 0xafff)      // mapped by the cartslot
253254   AM_RANGE(0xb000, 0xb003) AM_MIRROR(0x3fc) AM_DEVREADWRITE(INS8255_TAG, i8255_device, read, write)
254255//  AM_RANGE(0xb400, 0xb403) AM_DEVREADWRITE(MC6854_TAG, mc6854_device, read, write)
255256//  AM_RANGE(0xb404, 0xb404) AM_READ_PORT("ECONET")
r32192r32193
261262    ADDRESS_MAP( atomeb_mem )
262263-------------------------------------------------*/
263264
264static ADDRESS_MAP_START( atomeb_mem, AS_PROGRAM, 8, atom_state )
265static ADDRESS_MAP_START( atomeb_mem, AS_PROGRAM, 8, atomeb_state )
265266   AM_IMPORT_FROM(atom_mem)
267   AM_RANGE(0xa000, 0xafff) AM_READ(ext_r)
266268   AM_RANGE(0xbfff, 0xbfff) AM_READWRITE(eprom_r, eprom_w)
269   AM_RANGE(0xe000, 0xefff) AM_READ(dos_r)
267270ADDRESS_MAP_END
268271
269272/*-------------------------------------------------
r32192r32193
276279
277280   AM_RANGE(0x7000, 0x7003) AM_MIRROR(0x3fc) AM_DEVREADWRITE(INS8255_TAG, i8255_device, read, write)
278281   AM_RANGE(0x7800, 0x780f) AM_MIRROR(0x3f0) AM_DEVREADWRITE(R6522_TAG, via6522_device, read, write)
279   AM_RANGE(0x8000, 0xbfff) AM_ROM AM_REGION(EXTROM_TAG, 0)
280   AM_RANGE(0xF000, 0xffff) AM_ROM AM_REGION(SY6502_TAG, 0)
282   AM_RANGE(0x8000, 0xbfff) AM_ROM AM_REGION("basic", 0)
283   AM_RANGE(0xf000, 0xffff) AM_ROM AM_REGION(SY6502_TAG, 0)
281284ADDRESS_MAP_END
282285
283286/***************************************************************************
r32192r32193
648651   m_baseram[0x09] = machine().rand() & 0x0ff;
649652   m_baseram[0x0a] = machine().rand() & 0x0ff;
650653   m_baseram[0x0b] = machine().rand() & 0x0ff;
654
655   if (m_cart && m_cart->cart_mounted())
656      m_maincpu->space(AS_PROGRAM).install_read_handler(0xa000, 0xafff, read8_delegate(FUNC(generic_slot_device::read_rom),(generic_slot_device*)m_cart));
651657}
652658
653659/*-------------------------------------------------
r32192r32193
657663void atomeb_state::machine_start()
658664{
659665   atom_state::machine_start();
660
661   bankswitch();
662666}
663667
664668/***************************************************************************
665669    MACHINE DRIVERS
666670***************************************************************************/
667671
668struct atom_cart_range
672int atom_state::load_cart(device_image_interface &image, generic_slot_device *slot)
669673{
670   const char *tag;
671   int offset;
672   const char *region;
673};
674   UINT32 size = slot->common_get_size("rom");
674675
675static const struct atom_cart_range atom_cart_table[] =
676{
677   { ":cart", 0x0000, "a000" },
678   { ":a0",   0x0000, "a000" },
679   { ":a1",   0x1000, "a000" },
680   { ":a2",   0x2000, "a000" },
681   { ":a3",   0x3000, "a000" },
682   { ":a4",   0x4000, "a000" },
683   { ":a5",   0x5000, "a000" },
684   { ":a6",   0x6000, "a000" },
685   { ":a7",   0x7000, "a000" },
686   { ":a8",   0x8000, "a000" },
687   { ":a9",   0x9000, "a000" },
688   { ":aa",   0xa000, "a000" },
689   { ":ab",   0xb000, "a000" },
690   { ":ac",   0xc000, "a000" },
691   { ":ad",   0xd000, "a000" },
692   { ":ae",   0xe000, "a000" },
693   { ":af",   0xf000, "a000" },
694   { ":e0",   0x0000, "e000" },
695   { ":e1",   0x1000, "e000" },
696   { 0 }
697};
698
699DEVICE_IMAGE_LOAD_MEMBER( atom_state, atom_cart )
700{
701   UINT32 size;
702   int mirror, i;
703   const struct atom_cart_range *atom_cart = &atom_cart_table[0], *this_cart;
704
705   /* First, determine where this cart has to be loaded */
706   while (atom_cart->tag)
676   if (size > 0x1000)
707677   {
708      if (strcmp(atom_cart->tag, image.device().tag()) == 0)
709         break;
710
711      atom_cart++;
712   }
713
714   this_cart = atom_cart;
715
716   if( !this_cart->tag )
717   {
718      astring errmsg;
719      errmsg.printf("Tag '%s' could not be found", image.device().tag());
720      image.seterror(IMAGE_ERROR_UNSPECIFIED, errmsg.cstr());
678      image.seterror(IMAGE_ERROR_UNSPECIFIED, "Unsupported cartridge size");
721679      return IMAGE_INIT_FAIL;
722680   }
723681
724   dynamic_buffer temp_copy;
725   if (image.software_entry() == NULL)
726   {
727      size = image.length();
682   slot->rom_alloc(size, 1);
683   slot->common_load_rom(slot->get_rom_base(), size, "rom");         
728684
729      if (size > 0x1000)
730      {
731         image.seterror(IMAGE_ERROR_UNSPECIFIED, "Unsupported cartridge size");
732         return IMAGE_INIT_FAIL;
733      }
734
735      temp_copy.resize(size);
736      if (image.fread(temp_copy, size) != size)
737      {
738         image.seterror(IMAGE_ERROR_UNSPECIFIED, "Unable to fully read from file");
739         return IMAGE_INIT_FAIL;
740      }
741   }
742   else
743   {
744      size = image.get_software_region_length( "rom");
745      temp_copy.resize(size);
746      memcpy(temp_copy, image.get_software_region("rom"), size);
747   }
748
749   mirror = 0x1000 / size;
750
751   /* With the following, we mirror the cart in the whole memory region */
752   for (i = 0; i < mirror; i++)
753      memcpy(memregion(this_cart->region)->base() + this_cart->offset + i * size, temp_copy, size);
754
755685   return IMAGE_INIT_PASS;
756686}
757687
r32192r32193
760690    MACHINE_DRIVER( atom )
761691-------------------------------------------------*/
762692
763#define MCFG_ATOM_CARTSLOT_ADD(_tag) \
764   MCFG_CARTSLOT_ADD(_tag) \
765   MCFG_CARTSLOT_EXTENSION_LIST("bin,rom") \
766   MCFG_CARTSLOT_INTERFACE("atom_cart") \
767   MCFG_CARTSLOT_LOAD(atom_state, atom_cart)
768
769
770693static MACHINE_CONFIG_START( atom, atom_state )
771694   /* basic machine hardware */
772695   MCFG_CPU_ADD(SY6502_TAG, M6502, X2/4)
r32192r32193
815738   MCFG_QUICKLOAD_ADD("quickload", atom_state, atom_atm, "atm", 0)
816739
817740   /* cartridge */
818   MCFG_ATOM_CARTSLOT_ADD("cart")
741   MCFG_GENERIC_CARTSLOT_ADD("cartslot", GENERIC_ROM8_WIDTH, generic_linear_slot, "atom_cart")
742   MCFG_GENERIC_EXTENSIONS("bin,rom")
743   MCFG_GENERIC_LOAD(atom_state, cart_load)
819744
820745   /* internal ram */
821746   MCFG_RAM_ADD(RAM_TAG)
r32192r32193
830755    MACHINE_DRIVER( atomeb )
831756-------------------------------------------------*/
832757
758#define MCFG_ATOM_ROM_ADD(_tag, _load) \
759   MCFG_GENERIC_SOCKET_ADD(_tag, GENERIC_ROM8_WIDTH, generic_linear_slot, "atom_cart") \
760   MCFG_GENERIC_EXTENSIONS("bin,rom") \
761   MCFG_GENERIC_LOAD(atomeb_state, _load)
762
833763static MACHINE_CONFIG_DERIVED_CLASS( atomeb, atom, atomeb_state )
834764   MCFG_CPU_MODIFY(SY6502_TAG)
835765   MCFG_CPU_PROGRAM_MAP(atomeb_mem)
836766
837767   /* cartridges */
838   MCFG_DEVICE_REMOVE("cart")
839   MCFG_ATOM_CARTSLOT_ADD("a0")
840   MCFG_ATOM_CARTSLOT_ADD("a1")
841   MCFG_ATOM_CARTSLOT_ADD("a2")
842   MCFG_ATOM_CARTSLOT_ADD("a3")
843   MCFG_ATOM_CARTSLOT_ADD("a4")
844   MCFG_ATOM_CARTSLOT_ADD("a5")
845   MCFG_ATOM_CARTSLOT_ADD("a6")
846   MCFG_ATOM_CARTSLOT_ADD("a7")
847   MCFG_ATOM_CARTSLOT_ADD("a8")
848   MCFG_ATOM_CARTSLOT_ADD("a9")
849   MCFG_ATOM_CARTSLOT_ADD("aa")
850   MCFG_ATOM_CARTSLOT_ADD("ab")
851   MCFG_ATOM_CARTSLOT_ADD("ac")
852   MCFG_ATOM_CARTSLOT_ADD("ad")
853   MCFG_ATOM_CARTSLOT_ADD("ae")
854   MCFG_ATOM_CARTSLOT_ADD("af")
768   MCFG_DEVICE_REMOVE("cartslot")
855769
856   MCFG_ATOM_CARTSLOT_ADD("e0")
857   MCFG_ATOM_CARTSLOT_ADD("e1")
770   MCFG_ATOM_ROM_ADD("a0", a0_load)
771   MCFG_ATOM_ROM_ADD("a1", a1_load)
772   MCFG_ATOM_ROM_ADD("a2", a2_load)
773   MCFG_ATOM_ROM_ADD("a3", a3_load)
774   MCFG_ATOM_ROM_ADD("a4", a4_load)
775   MCFG_ATOM_ROM_ADD("a5", a5_load)
776   MCFG_ATOM_ROM_ADD("a6", a6_load)
777   MCFG_ATOM_ROM_ADD("a7", a7_load)
778   MCFG_ATOM_ROM_ADD("a8", a8_load)
779   MCFG_ATOM_ROM_ADD("a9", a9_load)
780//   MCFG_ATOM_ROM_ADD("aa", aa_load)
781//   MCFG_ATOM_ROM_ADD("ab", ab_load)
782//   MCFG_ATOM_ROM_ADD("ac", ac_load)
783//   MCFG_ATOM_ROM_ADD("ad", ad_load)
784//   MCFG_ATOM_ROM_ADD("ae", ae_load)
785//   MCFG_ATOM_ROM_ADD("af", af_load)
786
787   MCFG_ATOM_ROM_ADD("e0", e0_load)
788   MCFG_ATOM_ROM_ADD("e1", e1_load)
858789MACHINE_CONFIG_END
859790
860791/*-------------------------------------------------
r32192r32193
922853   ROM_CONTINUE(            0x3000, 0x1000 )
923854   ROM_LOAD( "afloat.ic21", 0x1000, 0x1000, CRC(81d86af7) SHA1(ebcde5b36cb3a3344567cbba4c7b9fde015f4802) )
924855   ROM_LOAD( "dosrom.u15",  0x2000, 0x1000, CRC(c431a9b7) SHA1(71ea0a4b8d9c3caf9718fc7cc279f4306a23b39c) )
925
926   ROM_REGION( 0x1000, "a000", ROMREGION_ERASEFF )
927856ROM_END
928857
929858/*-------------------------------------------------
r32192r32193
936865   ROM_CONTINUE(            0x3000, 0x1000 )
937866   ROM_LOAD( "afloat.ic21", 0x1000, 0x1000, CRC(81d86af7) SHA1(ebcde5b36cb3a3344567cbba4c7b9fde015f4802) )
938867   ROM_LOAD( "dosrom.u15",  0x2000, 0x1000, CRC(c431a9b7) SHA1(71ea0a4b8d9c3caf9718fc7cc279f4306a23b39c) )
939
940   ROM_REGION( 0x10000, EXTROM_TAG, ROMREGION_ERASEFF )
941
942   ROM_REGION( 0x2000, DOSROM_TAG, ROMREGION_ERASEFF )
943868ROM_END
944869
945870/*-------------------------------------------------
r32192r32193
947872-------------------------------------------------*/
948873
949874ROM_START( atombb )
950   ROM_REGION( 0x4000, "a000", 0)
951   ROM_LOAD( "bbcbasic.rom", 0x0000, 0x4000, CRC(79434781) SHA1(4a7393f3a45ea309f744441c16723e2ef447a281) )
952875   ROM_REGION( 0x1000, SY6502_TAG, 0 )
953876   ROM_LOAD( "mos.rom",0x0000, 0x1000, CRC(20158bd8) SHA1(5ee4c0d2b65be72646e17d69b76fb00a0e5298df) )
877   ROM_REGION( 0x4000, "basic", 0)
878   ROM_LOAD( "bbcbasic.rom", 0x0000, 0x4000, CRC(79434781) SHA1(4a7393f3a45ea309f744441c16723e2ef447a281) )
954879ROM_END
955880
881
882DRIVER_INIT_MEMBER(atomeb_state, atomeb)
883{
884   // these have to be set here, so that we can pass m_ext[*] to device_image_load!
885   char str[4];   
886   for (int i = 0; i < 16; i++)
887   {
888      sprintf(str,"a%x", i);
889      m_ext[i] = machine().device<generic_slot_device>(str);
890   }         
891}
892
893
956894/***************************************************************************
957895    SYSTEM DRIVERS
958896***************************************************************************/
959897
960898/*    YEAR  NAME      PARENT    COMPAT  MACHINE   INPUT     INIT      COMPANY   FULLNAME */
961899COMP( 1979, atom,     0,        0,      atom,     atom, driver_device,     0,        "Acorn",  "Atom" , 0)
962COMP( 1979, atomeb,   atom,     0,      atomeb,   atom, driver_device,     0,        "Acorn",  "Atom with Eprom Box" , 0)
900COMP( 1979, atomeb,   atom,     0,      atomeb,   atom, atomeb_state, atomeb,        "Acorn",  "Atom with Eprom Box" , 0)
963901COMP( 1979, atombb,   atom,     0,      atombb,   atom, driver_device,     0,        "Acorn",  "Atom with BBC Basic" , 0)
964902//COMP( 1983, prophet2, atom,     0,        atom,     atom, driver_device,     0,        "Busicomputers",  "Prophet 2" , 0)
trunk/src/mess/drivers/aim65.c
r32192r32193
146146
147147int aim65_state::load_cart(device_image_interface &image, generic_slot_device *slot, const char *slot_tag)
148148{
149   UINT8 *cart;
150   UINT32 size;
151
152   if (image.software_entry() == NULL)
153      size = image.length();
154   else
155      size = image.get_software_region_length("rom");
149   UINT32 size = slot->common_get_size("rom");
156150   
157151   if (size > 0x1000)
158152   {
r32192r32193
160154      return IMAGE_INIT_FAIL;
161155   }
162156
163   slot->rom_alloc(size, 1);
164   cart = slot->get_rom_base();
165
166   if (image.software_entry() == NULL)
167      image.fread(cart, size);
168   else
157   if (image.software_entry() != NULL && image.get_software_region(slot_tag) == NULL)
169158   {
170      if (image.get_software_region(slot_tag) == NULL)
171      {
172         astring errmsg;
173         errmsg.printf("Attempted to load file with wrong extension\nSocket '%s' only accepts files with '.%s' extension",
174                    slot_tag, slot_tag);
175         image.seterror(IMAGE_ERROR_UNSPECIFIED, errmsg.cstr());
176         return IMAGE_INIT_FAIL;
177      }
178      memcpy(cart, image.get_software_region(slot_tag), size);
159      astring errmsg;
160      errmsg.printf("Attempted to load file with wrong extension\nSocket '%s' only accepts files with '.%s' extension",
161                 slot_tag, slot_tag);
162      image.seterror(IMAGE_ERROR_UNSPECIFIED, errmsg.cstr());
163      return IMAGE_INIT_FAIL;
179164   }
180165
166   slot->rom_alloc(size, 1);
167   slot->common_load_rom(slot->get_rom_base(), size, slot_tag);
168
181169   return IMAGE_INIT_PASS;
182170}
183171
trunk/src/mess/drivers/c128.c
r32192r32193
190190   {
191191      data = m_vic->read(space, offset & 0x3f);
192192   }
193   if (!BIT(plaout, PLA_OUT_FROM1))
193   if (!BIT(plaout, PLA_OUT_FROM1) && m_from->cart_mounted())
194194   {
195      data = m_from->base()[offset & 0x7fff];
195      data = m_from->read_rom(space, offset & 0x7fff);
196196   }
197197   if (!BIT(plaout, PLA_OUT_IOCS) && BIT(offset, 10))
198198   {
r32192r32193
15491549   MCFG_SOFTWARE_LIST_FILTER("from_list", "NTSC")
15501550
15511551   // function ROM
1552   MCFG_CARTSLOT_ADD("from")
1553   MCFG_CARTSLOT_EXTENSION_LIST("bin,rom")
1554   MCFG_CARTSLOT_INTERFACE("c128_rom")
1552   MCFG_GENERIC_SOCKET_ADD("from", GENERIC_ROM8_WIDTH, generic_plain_slot, "c128_rom")
1553   MCFG_GENERIC_EXTENSIONS("bin,rom")
15551554
15561555   // internal ram
15571556   MCFG_RAM_ADD(RAM_TAG)
r32192r32193
17241723   MCFG_SOFTWARE_LIST_FILTER("from_list", "PAL")
17251724
17261725   // function ROM
1727   MCFG_CARTSLOT_ADD("from")
1728   MCFG_CARTSLOT_EXTENSION_LIST("bin,rom")
1729   MCFG_CARTSLOT_INTERFACE("c128_rom")
1726   MCFG_GENERIC_SOCKET_ADD("from", GENERIC_ROM8_WIDTH, generic_plain_slot, "c128_rom")
1727   MCFG_GENERIC_EXTENSIONS("bin,rom")
17301728
17311729   // internal ram
17321730   MCFG_RAM_ADD(RAM_TAG)
r32192r32193
17861784   ROMX_LOAD( "318019-04.u34", 0x8000, 0x4000, CRC(6e2c91a7) SHA1(c4fb4a714e48a7bf6c28659de0302183a0e0d6c0), ROM_BIOS(4) )
17871785   ROMX_LOAD( "quicksilver128.u35", 0xc000, 0x4000, CRC(c2e74338) SHA1(916cdcc62eb631073aa7f096815dcf33b3229ca8), ROM_BIOS(4) )
17881786
1789   ROM_REGION( 0x8000, "from", 0 )
1790   ROM_CART_LOAD( "from", 0x0000, 0x8000, ROM_NOMIRROR )
1791
17921787   ROM_REGION( 0x2000, "charom", 0 )
17931788   ROM_LOAD( "390059-01.u18", 0x0000, 0x2000, CRC(6aaaafe6) SHA1(29ed066d513f2d5c09ff26d9166ba23c2afb2b3f) )
17941789
r32192r32193
18211816   ROMX_LOAD( "318019-04.u34", 0x8000, 0x4000, CRC(6e2c91a7) SHA1(c4fb4a714e48a7bf6c28659de0302183a0e0d6c0), ROM_BIOS(2) )
18221817   ROMX_LOAD( "315078-02.u35", 0xc000, 0x4000, CRC(b275bb2e) SHA1(78ac5dcdd840b092ba1ee6d19b33af079613291f), ROM_BIOS(2) )
18231818
1824   ROM_REGION( 0x8000, "from", 0 )
1825   ROM_CART_LOAD( "from", 0x0000, 0x8000, ROM_NOMIRROR )
1826
18271819   ROM_REGION( 0x2000, "charom", 0 )
18281820   ROM_LOAD( "315079-01.u18", 0x00000, 0x2000, CRC(fe5a2db1) SHA1(638f8aff51c2ac4f99a55b12c4f8c985ef4bebd3) )
18291821
r32192r32193
18441836   ROM_LOAD( "318019-02.u34", 0x8000, 0x4000, CRC(d551fce0) SHA1(4d223883e866645328f86a904b221464682edc4f) )
18451837   ROM_LOAD( "325189-01.u35", 0xc000, 0x4000, CRC(9526fac4) SHA1(a01dd871241c801db51e8ebc30fedfafd8cc506b) ) // "C128 Ker Sw/Fi"
18461838
1847   ROM_REGION( 0x8000, "from", 0 )
1848   ROM_CART_LOAD( "from", 0x0000, 0x8000, ROM_NOMIRROR )
1849
18501839   ROM_REGION( 0x2000, "charom", 0 )
18511840   ROM_LOAD( "325181-01.bin", 0x0000, 0x2000, CRC(7a70d9b8) SHA1(aca3f7321ee7e6152f1f0afad646ae41964de4fb) ) // "C128 Char Sw/Fi"
18521841
r32192r32193
18731862   ROM_LOAD( "252343-04.u32", 0x0000, 0x4000, CRC(cc6bdb69) SHA1(36286b2e8bea79f7767639fd85e12c5447c7041b) ) // "252343-04 // US // U32"
18741863   ROM_CONTINUE(              0xc000, 0x4000 )
18751864
1876   ROM_REGION( 0x8000, "from", 0 )
1877   ROM_CART_LOAD( "from", 0x0000, 0x8000, ROM_NOMIRROR )
1878
18791865   ROM_REGION( 0x2000, "charom", 0 )
18801866   ROM_LOAD( "390059-01.u18", 0x0000, 0x2000, CRC(6aaaafe6) SHA1(29ed066d513f2d5c09ff26d9166ba23c2afb2b3f) ) // "MOS // (C)1985 CBM // 390059-01 // M468613 8547H"
18811867
r32192r32193
18951881   ROM_LOAD( "318023-02.u32", 0x0000, 0x4000, CRC(eedc120a) SHA1(f98c5a986b532c78bb68df9ec6dbcf876913b99f) )
18961882   ROM_CONTINUE(              0xc000, 0x4000 )
18971883
1898   ROM_REGION( 0x8000, "from", 0 )
1899   ROM_CART_LOAD( "from", 0x0000, 0x8000, ROM_NOMIRROR )
1900
19011884   ROM_REGION( 0x2000, "charom", 0 )
19021885   ROM_LOAD( "390059-01.u18", 0x0000, 0x2000, CRC(6aaaafe6) SHA1(29ed066d513f2d5c09ff26d9166ba23c2afb2b3f) )
19031886
r32192r32193
19191902   ROM_LOAD( "318077-01.u32", 0x0000, 0x4000, CRC(eb6e2c8f) SHA1(6b3d891fedabb5335f388a5d2a71378472ea60f4) )
19201903   ROM_CONTINUE(              0xc000, 0x4000 )
19211904
1922   ROM_REGION( 0x8000, "from", 0 )
1923   ROM_CART_LOAD( "from", 0x0000, 0x8000, ROM_NOMIRROR )
1924
19251905   ROM_REGION( 0x2000, "charom", 0 )
19261906   ROM_LOAD( "315079-01.u18", 0x0000, 0x2000, CRC(fe5a2db1) SHA1(638f8aff51c2ac4f99a55b12c4f8c985ef4bebd3) )
19271907
r32192r32193
19411921   ROM_LOAD( "318034-01.u32", 0x0000, 0x4000, CRC(cb4e1719) SHA1(9b0a0cef56d00035c611e07170f051ee5e63aa3a) )
19421922   ROM_CONTINUE(              0xc000, 0x4000 )
19431923
1944   ROM_REGION( 0x8000, "from", 0 )
1945   ROM_CART_LOAD( "from", 0x0000, 0x8000, ROM_NOMIRROR )
1946
19471924   ROM_REGION( 0x2000, "charom", 0 )
19481925   ROM_LOAD( "325181-01.u18", 0x0000, 0x2000, CRC(7a70d9b8) SHA1(aca3f7321ee7e6152f1f0afad646ae41964de4fb) )
19491926
trunk/src/mess/includes/c128.h
r32192r32193
1111#include "bus/vic20/user.h"
1212#include "bus/pet/cass.h"
1313#include "bus/vcs_ctrl/ctrl.h"
14#include "bus/generic/slot.h"
15#include "bus/generic/carts.h"
1416#include "imagedev/snapquik.h"
1517#include "cpu/m6502/m8502.h"
1618#include "machine/mos6526.h"
r32192r32193
5860      m_user(*this, PET_USER_PORT_TAG),
5961      m_ram(*this, RAM_TAG),
6062      m_cassette(*this, PET_DATASSETTE_PORT_TAG),
63      m_from(*this, "from"),
6164      m_rom(*this, M8502_TAG),
62      m_from(*this, "from"),
6365      m_charom(*this, "charom"),
6466      m_color_ram(*this, "color_ram"),
6567      m_row0(*this, "ROW0"),
r32192r32193
116118   required_device<pet_user_port_device> m_user;
117119   required_device<ram_device> m_ram;
118120   required_device<pet_datassette_port_device> m_cassette;
121   required_device<generic_slot_device> m_from;
119122   required_memory_region m_rom;
120   required_memory_region m_from;
121123   required_memory_region m_charom;
122124   optional_shared_ptr<UINT8> m_color_ram;
123125   required_ioport m_row0;
trunk/src/mess/includes/atom.h
r32192r32193
66
77#include "emu.h"
88#include "cpu/m6502/m6502.h"
9#include "imagedev/cartslot.h"
109#include "imagedev/cassette.h"
1110#include "imagedev/flopdrv.h"
1211#include "machine/ram.h"
r32192r32193
2019#include "machine/i8271.h"
2120#include "sound/speaker.h"
2221#include "video/mc6847.h"
22#include "bus/generic/slot.h"
23#include "bus/generic/carts.h"
2324
2425#define SY6502_TAG      "ic22"
2526#define INS8255_TAG     "ic25"
r32192r32193
3031#define SCREEN_TAG      "screen"
3132#define CENTRONICS_TAG  "centronics"
3233#define BASERAM_TAG     "baseram"
33#define EXTROM_TAG      "a000"
34#define DOSROM_TAG      "e000"
3534
3635
3736#define X1  XTAL_3_579545MHz    // MC6847 Clock
r32192r32193
4746         m_cassette(*this, "cassette"),
4847         m_centronics(*this, CENTRONICS_TAG),
4948         m_speaker(*this, "speaker"),
50         m_extrom(*this, EXTROM_TAG),
49         m_cart(*this, "cartslot"),
5150         m_y0(*this, "Y0"),
5251         m_y1(*this, "Y1"),
5352         m_y2(*this, "Y2"),
r32192r32193
6867   required_device<cassette_image_device> m_cassette;
6968   required_device<centronics_device> m_centronics;
7069   required_device<speaker_sound_device> m_speaker;
71   required_memory_region m_extrom;
70   optional_device<generic_slot_device> m_cart;
7271   required_ioport m_y0;
7372   required_ioport m_y1;
7473   required_ioport m_y2;
r32192r32193
8786
8887   void bankswitch();
8988
90   DECLARE_READ8_MEMBER( eprom_r );
91   DECLARE_WRITE8_MEMBER( eprom_w );
9289   DECLARE_WRITE8_MEMBER( ppi_pa_w );
9390   DECLARE_READ8_MEMBER( ppi_pb_r );
9491   DECLARE_READ8_MEMBER( ppi_pc_r );
r32192r32193
9794   DECLARE_INPUT_CHANGED_MEMBER( trigger_reset );
9895   DECLARE_WRITE_LINE_MEMBER( atom_8271_interrupt_callback );
9996
100   /* eprom state */
101   int m_eprom;
102
10397   /* video state */
10498   required_shared_ptr<UINT8> m_video_ram;
10599
r32192r32193
114108   /* devices */
115109   int m_previous_i8271_int_state;
116110   TIMER_DEVICE_CALLBACK_MEMBER(cassette_output_tick);
117
118   DECLARE_DEVICE_IMAGE_LOAD_MEMBER( atom_cart );
111   
112   int load_cart(device_image_interface &image, generic_slot_device *slot);
113   DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load) { return load_cart(image, m_cart); }   
119114   DECLARE_QUICKLOAD_LOAD_MEMBER(atom_atm);
120   void image_fread_memory(device_image_interface &image, UINT16 addr, UINT32 count);
121115};
122116
123117class atomeb_state : public atom_state
124118{
125119public:
126120   atomeb_state(const machine_config &mconfig, device_type type, const char *tag)
127      : atom_state(mconfig, type, tag)
128   { }
121      : atom_state(mconfig, type, tag),
122      m_e0(*this, "e0"),
123      m_e1(*this, "e1")
124   {
125   }
129126
130127   virtual void machine_start();
128
129   DECLARE_READ8_MEMBER(eprom_r);
130   DECLARE_WRITE8_MEMBER(eprom_w);
131   DECLARE_READ8_MEMBER(ext_r);
132   DECLARE_READ8_MEMBER(dos_r);
133
134   DECLARE_DRIVER_INIT(atomeb);
135   
136   /* eprom state */
137   int m_eprom;
138   
139   generic_slot_device *m_ext[16];
140   required_device<generic_slot_device> m_e0;
141   required_device<generic_slot_device> m_e1;
142
143   DECLARE_DEVICE_IMAGE_LOAD_MEMBER(a0_load) { return load_cart(image, m_ext[0x0]); }
144   DECLARE_DEVICE_IMAGE_LOAD_MEMBER(a1_load) { return load_cart(image, m_ext[0x1]); }
145   DECLARE_DEVICE_IMAGE_LOAD_MEMBER(a2_load) { return load_cart(image, m_ext[0x2]); }
146   DECLARE_DEVICE_IMAGE_LOAD_MEMBER(a3_load) { return load_cart(image, m_ext[0x3]); }
147   DECLARE_DEVICE_IMAGE_LOAD_MEMBER(a4_load) { return load_cart(image, m_ext[0x4]); }
148   DECLARE_DEVICE_IMAGE_LOAD_MEMBER(a5_load) { return load_cart(image, m_ext[0x5]); }
149   DECLARE_DEVICE_IMAGE_LOAD_MEMBER(a6_load) { return load_cart(image, m_ext[0x6]); }
150   DECLARE_DEVICE_IMAGE_LOAD_MEMBER(a7_load) { return load_cart(image, m_ext[0x7]); }
151   DECLARE_DEVICE_IMAGE_LOAD_MEMBER(a8_load) { return load_cart(image, m_ext[0x8]); }
152   DECLARE_DEVICE_IMAGE_LOAD_MEMBER(a9_load) { return load_cart(image, m_ext[0x9]); }
153   DECLARE_DEVICE_IMAGE_LOAD_MEMBER(aa_load) { return load_cart(image, m_ext[0xa]); }
154   DECLARE_DEVICE_IMAGE_LOAD_MEMBER(ab_load) { return load_cart(image, m_ext[0xb]); }
155   DECLARE_DEVICE_IMAGE_LOAD_MEMBER(ac_load) { return load_cart(image, m_ext[0xc]); }
156   DECLARE_DEVICE_IMAGE_LOAD_MEMBER(ad_load) { return load_cart(image, m_ext[0xd]); }
157   DECLARE_DEVICE_IMAGE_LOAD_MEMBER(ae_load) { return load_cart(image, m_ext[0xe]); }
158   DECLARE_DEVICE_IMAGE_LOAD_MEMBER(af_load) { return load_cart(image, m_ext[0xf]); }
159   DECLARE_DEVICE_IMAGE_LOAD_MEMBER(e0_load) { return load_cart(image, m_e0); }
160   DECLARE_DEVICE_IMAGE_LOAD_MEMBER(e1_load) { return load_cart(image, m_e1); }
131161};
132162
133163#endif

Previous 199869 Revisions Next


© 1997-2024 The MAME Team