Previous 199869 Revisions Next

r18042 Thursday 20th September, 2012 at 13:17:59 UTC by Miodrag Milanović
pcw16: Commented old code not used, mahlemiut please delete if not needed as reminder for some additional changes (no whatsnew)
[src/mess/drivers]pcw16.c
[src/mess/includes]pcw16.h

trunk/src/mess/includes/pcw16.h
r18041r18042
4949   int m_colour_palette[16];
5050   int m_video_control;
5151   DECLARE_WRITE8_MEMBER(pcw16_palette_w);
52   DECLARE_READ8_MEMBER(pcw16_no_mem_r);
5352   DECLARE_READ8_MEMBER(pcw16_bankhw_r);
5453   DECLARE_WRITE8_MEMBER(pcw16_bankhw_w);
5554   DECLARE_WRITE8_MEMBER(pcw16_video_control_w);
trunk/src/mess/drivers/pcw16.c
r18041r18042
165165   m_colour_palette[offset & 0x0f] = data & 31;
166166}
167167
168
168/*
169169static const char *const pcw16_write_handler_dram[4] =
170170{
171171   "bank5",
r18041r18042
181181   "bank3",
182182   "bank4"
183183};
184/*******************************************/
185184
186185
187/* PCW16 Flash interface */
188/* PCW16 can have two 1mb flash chips */
189186
190/* read flash0 */
187// PCW16 Flash interface
188// PCW16 can have two 1mb flash chips
189
190// read flash0
191191static int pcw16_flash0_bank_handler_r(running_machine &machine, int bank, int offset)
192192{
193193   pcw16_state *state = machine.driver_data<pcw16_state>();
r18041r18042
196196   return flash->read(flash_offset);
197197}
198198
199/* read flash1 */
199// read flash1
200200static int pcw16_flash1_bank_handler_r(running_machine &machine, int bank, int offset)
201201{
202202   pcw16_state *state = machine.driver_data<pcw16_state>();
r18041r18042
206206   return flash->read(flash_offset);
207207}
208208
209/* flash 0 */
209// flash 0
210210static  READ8_HANDLER(pcw16_flash0_bank_handler0_r)
211211{
212212   return pcw16_flash0_bank_handler_r(space.machine(),0, offset);
r18041r18042
227227   return pcw16_flash0_bank_handler_r(space.machine(),3, offset);
228228}
229229
230/* flash 1 */
230// flash 1
231231static  READ8_HANDLER(pcw16_flash1_bank_handler0_r)
232232{
233233   return pcw16_flash1_bank_handler_r(space.machine(),0, offset);
r18041r18042
264264   { FUNC(pcw16_flash1_bank_handler3_r) }
265265};
266266
267/* write flash0 */
267// write flash0
268268static void pcw16_flash0_bank_handler_w(running_machine &machine, int bank, int offset, int data)
269269{
270270   pcw16_state *state = machine.driver_data<pcw16_state>();
r18041r18042
275275   flash->write(flash_offset, data);
276276}
277277
278/* read flash1 */
278// read flash1
279279static void pcw16_flash1_bank_handler_w(running_machine &machine, int bank, int offset, int data)
280280{
281281   pcw16_state *state = machine.driver_data<pcw16_state>();
r18041r18042
286286   flash->write(flash_offset,data);
287287}
288288
289/* flash 0 */
289// flash 0
290290static WRITE8_HANDLER(pcw16_flash0_bank_handler0_w)
291291{
292292   pcw16_flash0_bank_handler_w(space.machine(),0, offset, data);
r18041r18042
309309}
310310
311311
312/* flash 1 */
312// flash 1
313313static WRITE8_HANDLER(pcw16_flash1_bank_handler0_w)
314314{
315315   pcw16_flash1_bank_handler_w(space.machine(),0, offset, data);
r18041r18042
349349
350350enum PCW16_RAM_TYPE
351351{
352   /* rom which is really first block of flash0 */
352   // rom which is really first block of flash0
353353   PCW16_MEM_ROM,
354   /* flash 0 */
354   // flash 0
355355   PCW16_MEM_FLASH_1,
356   /* flash 1 i.e. unexpanded pcw16 */
356   // flash 1 i.e. unexpanded pcw16
357357   PCW16_MEM_FLASH_2,
358   /* dram */
358   // dram
359359   PCW16_MEM_DRAM,
360   /* no mem. i.e. unexpanded pcw16 */
360   // no mem. i.e. unexpanded pcw16
361361   PCW16_MEM_NONE
362362};
363363
r18041r18042
366366   return 0x0ff;
367367}
368368
369/*
369
370370static void pcw16_set_bank_handlers(running_machine &machine, int bank, PCW16_RAM_TYPE type)
371371{
372372    address_space &space = machine.device("maincpu")->memory().space(AS_PROGRAM);
r18041r18042
486486        pcw16_set_bank_handlers(machine, bank, PCW16_MEM_DRAM);
487487    }
488488}
489*/
490489
491/* update memory h/w */
490
491// update memory h/w
492492static void pcw16_update_memory(running_machine &machine)
493493{
494//  pcw16_update_bank(machine, 0);
495//  pcw16_update_bank(machine, 1);
496//  pcw16_update_bank(machine, 2);
497//  pcw16_update_bank(machine, 3);
494  pcw16_update_bank(machine, 0);
495  pcw16_update_bank(machine, 1);
496  pcw16_update_bank(machine, 2);
497  pcw16_update_bank(machine, 3);
498498
499499}
500
500*/
501501UINT8 pcw16_state::read_bank_data(UINT8 type, UINT16 offset)
502502{
503503   if(type & 0x80) // DRAM
r18041r18042
623623
624624   m_banks[offset] = data;
625625
626   pcw16_update_memory(machine());
626   //pcw16_update_memory(machine());
627627}
628628
629629WRITE8_MEMBER(pcw16_state::pcw16_video_control_w)

Previous 199869 Revisions Next


© 1997-2024 The MAME Team