Previous 199869 Revisions Next

r20548 Sunday 27th January, 2013 at 19:18:13 UTC by Curt Coder
(MESS) Tagmap lookup cleanup. (nw)
[src/mess/drivers]c128.c c64.c pcw16.c portfoli.c sage2.c
[src/mess/includes]c128.h

trunk/src/mess/drivers/c64.c
r20547r20548
644644
645645   // keyboard
646646   UINT8 cia1_pa = m_cia1->pa_r();
647   UINT8 row[8] = { m_row0->read(), m_row1->read() & m_lock->read(), m_row2->read(), m_row3->read(),
648                m_row4->read(), m_row5->read(), m_row6->read(), m_row7->read() };
649647
650   if (!BIT(cia1_pa, 7)) data &= row[7];
651   if (!BIT(cia1_pa, 6)) data &= row[6];
652   if (!BIT(cia1_pa, 5)) data &= row[5];
653   if (!BIT(cia1_pa, 4)) data &= row[4];
654   if (!BIT(cia1_pa, 3)) data &= row[3];
655   if (!BIT(cia1_pa, 2)) data &= row[2];
656   if (!BIT(cia1_pa, 1)) data &= row[1];
657   if (!BIT(cia1_pa, 0)) data &= row[0];
648   if (!BIT(cia1_pa, 7)) data &= m_row7->read();
649   if (!BIT(cia1_pa, 6)) data &= m_row6->read();
650   if (!BIT(cia1_pa, 5)) data &= m_row5->read();
651   if (!BIT(cia1_pa, 4)) data &= m_row4->read();
652   if (!BIT(cia1_pa, 3)) data &= m_row3->read();
653   if (!BIT(cia1_pa, 2)) data &= m_row2->read();
654   if (!BIT(cia1_pa, 1)) data &= m_row1->read() & m_lock->read();
655   if (!BIT(cia1_pa, 0)) data &= m_row0->read();
658656
659657   return data;
660658}
trunk/src/mess/drivers/portfoli.c
r20547r20548
6262
6363    TODO:
6464
65   - expansion port slot interface
6566    - clock is running too fast
66    - access violation after OFF command
6767    - create chargen ROM from tech manual
6868    - memory error interrupt vector
6969    - i/o port 8051
trunk/src/mess/drivers/sage2.c
r20547r20548
4545{
4646   UINT8 data = 0xff;
4747
48   if (m_reset || (offset >= 0xfe0000))
48   if (m_reset || (offset >= 0xfe0000 && offset < 0xff4000))
4949   {
5050      data = m_rom[offset & 0x1fff];
5151   }
r20547r20548
248248   // drive select
249249   m_floppy = NULL;
250250
251   if (BIT(data, 3)) m_floppy = m_floppy0->get_device();
252   if (BIT(data, 4)) m_floppy = m_floppy1->get_device();
251   if (!BIT(data, 3)) m_floppy = m_floppy0->get_device();
252   if (!BIT(data, 4)) m_floppy = m_floppy1->get_device();
253253
254254   m_fdc->set_floppy(m_floppy);
255255
trunk/src/mess/drivers/c128.c
r20547r20548
33    TODO:
44
55    - connect CAPS LOCK to charom A12 on international variants
6    - remove frame interrupt handler
76    - expansion DMA
87
98*/
r20547r20548
161160   if (!rom1)
162161   {
163162      // CR: data = m_rom1[(ms3 << 14) | ((BIT(ta, 14) && BIT(offset, 13)) << 13) | (ta & 0x1000) | (offset & 0xfff)];
164      data = m_rom1[((BIT(ta, 14) && BIT(offset, 13)) << 13) | (ta & 0x1000) | (offset & 0xfff)];
163      data = m_rom->base()[((BIT(ta, 14) && BIT(offset, 13)) << 13) | (ta & 0x1000) | (offset & 0xfff)];
165164   }
166165   if (!rom2)
167166   {
168      data = m_rom2[offset & 0x3fff];
167      data = m_rom->base()[0x4000 | (offset & 0x3fff)];
169168   }
170169   if (!rom3)
171170   {
172171      // CR: data = m_rom3[(BIT(offset, 15) << 14) | (offset & 0x3fff)];
173      data = m_rom3[offset & 0x3fff];
172      data = m_rom->base()[0x8000 | (offset & 0x3fff)];
174173   }
175174   if (!rom4)
176175   {
177      data = m_rom4[(ta & 0x1000) | (offset & 0x2fff)];
176      data = m_rom->base()[0xc000 | (ta & 0x1000) | (offset & 0x2fff)];
178177   }
179178   if (!charom)
180179   {
181      data = m_charom[(ms3 << 12) | (ta & 0xf00) | sa];
180      data = m_charom->base()[(ms3 << 12) | (ta & 0xf00) | sa];
182181   }
183182   if (!colorram && aec)
184183   {
r20547r20548
190189   }
191190   if (!from1)
192191   {
193      data = m_from[offset & 0x7fff];
192      data = m_from->base()[offset & 0x7fff];
194193   }
195194   if (!iocs && BIT(offset, 10))
196195   {
r20547r20548
10661065
10671066   // keyboard
10681067   UINT8 cia1_pa = m_cia1->pa_r();
1069   UINT8 row[8] = { m_row0->read(), m_row1->read() & m_lock->read(), m_row2->read(), m_row3->read(),
1070                m_row4->read(), m_row5->read(), m_row6->read(), m_row7->read() };
10711068
1072   if (!BIT(cia1_pa, 7)) data &= row[7];
1073   if (!BIT(cia1_pa, 6)) data &= row[6];
1074   if (!BIT(cia1_pa, 5)) data &= row[5];
1075   if (!BIT(cia1_pa, 4)) data &= row[4];
1076   if (!BIT(cia1_pa, 3)) data &= row[3];
1077   if (!BIT(cia1_pa, 2)) data &= row[2];
1078   if (!BIT(cia1_pa, 1)) data &= row[1];
1079   if (!BIT(cia1_pa, 0)) data &= row[0];
1069   if (!BIT(cia1_pa, 7)) data &= m_row7->read();
1070   if (!BIT(cia1_pa, 6)) data &= m_row6->read();
1071   if (!BIT(cia1_pa, 5)) data &= m_row5->read();
1072   if (!BIT(cia1_pa, 4)) data &= m_row4->read();
1073   if (!BIT(cia1_pa, 3)) data &= m_row3->read();
1074   if (!BIT(cia1_pa, 2)) data &= m_row2->read();
1075   if (!BIT(cia1_pa, 1)) data &= m_row1->read() & m_lock->read();
1076   if (!BIT(cia1_pa, 0)) data &= m_row0->read();
10801077
10811078   if (!BIT(m_vic_k, 0)) data &= m_k0->read();
10821079   if (!BIT(m_vic_k, 1)) data &= m_k1->read();
r20547r20548
14331430
14341431void c128_state::machine_start()
14351432{
1436   cbm_common_init();
1437
1438   // find memory regions
1439   m_rom1 = memregion(M8502_TAG)->base();
1440   m_rom2 = m_rom1 + 0x4000;
1441   m_rom3 = m_rom1 + 0x8000;
1442   m_rom4 = m_rom1 + 0xc000;
1443   m_from = memregion("from")->base();
1444   m_charom = memregion("charom")->base();
1445
14461433   // allocate memory
14471434   m_color_ram.allocate(0x800);
14481435
trunk/src/mess/drivers/pcw16.c
r20547r20548
766766{
767767//  logerror("system status r: \n");
768768
769   return m_system_status | (ioport("EXTRA")->read() & 0x04);
769   return m_system_status | (m_io_extra->read() & 0x04);
770770}
771771
772772READ8_MEMBER(pcw16_state::pcw16_timer_interrupt_counter_r)
trunk/src/mess/includes/c128.h
r20547r20548
5757         m_user(*this, C64_USER_PORT_TAG),
5858         m_ram(*this, RAM_TAG),
5959         m_cassette(*this, PET_DATASSETTE_PORT_TAG),
60         m_rom(*this, M8502_TAG),
61         m_from(*this, "from"),
62         m_charom(*this, "charom"),
63         m_color_ram(*this, "color_ram"),
6064         m_row0(*this, "ROW0"),
6165         m_row1(*this, "ROW1"),
6266         m_row2(*this, "ROW2"),
r20547r20548
7882         m_charen(1),
7983         m_game(1),
8084         m_exrom(1),
81         m_rom1(NULL),
82         m_rom2(NULL),
83         m_rom3(NULL),
84         m_rom4(NULL),
85         m_from(NULL),
86         m_charom(NULL),
87         m_color_ram(*this, "color_ram"),
8885         m_va14(1),
8986         m_va15(1),
9087         m_clrbank(0),
r20547r20548
118115   required_device<c64_user_port_device> m_user;
119116   required_device<ram_device> m_ram;
120117   required_device<pet_datassette_port_device> m_cassette;
118   required_memory_region m_rom;
119   required_memory_region m_from;
120   required_memory_region m_charom;
121   optional_shared_ptr<UINT8> m_color_ram;
121122   required_ioport m_row0;
122123   required_ioport m_row1;
123124   required_ioport m_row2;
r20547r20548
203204   int m_game;
204205   int m_exrom;
205206   int m_reset;
206   const UINT8 *m_rom1;
207   const UINT8 *m_rom2;
208   const UINT8 *m_rom3;
209   const UINT8 *m_rom4;
210   const UINT8 *m_from;
211   const UINT8 *m_charom;
212207
213208   // video state
214   optional_shared_ptr<UINT8> m_color_ram;
215209   int m_va14;
216210   int m_va15;
217211   int m_clrbank;

Previous 199869 Revisions Next


© 1997-2024 The MAME Team