Previous 199869 Revisions Next

r17559 Wednesday 29th August, 2012 at 17:25:24 UTC by hap
fix unallocated buffer
[src/mame/drivers]taitogn.c

trunk/src/mame/drivers/taitogn.c
r17558r17559
422422
423423WRITE32_MEMBER(taitogn_state::rf5c296_io_w)
424424{
425
426425   if(offset < 2) {
427426      ide_controller32_pcmcia_w(machine().device(":card"), offset, data, mem_mask);
428427      return;
r17558r17559
438437
439438READ32_MEMBER(taitogn_state::rf5c296_io_r)
440439{
441
442440   if(offset < 2)
443441      return ide_controller32_pcmcia_r(machine().device(":card"), offset, mem_mask);
444442
r17558r17559
460458
461459READ32_MEMBER(taitogn_state::rf5c296_mem_r)
462460{
463
464461   if(offset < 0x80)
465462      return (m_cis[offset*2+1] << 16) | m_cis[offset*2];
466463
r17558r17559
475472
476473WRITE32_MEMBER(taitogn_state::rf5c296_mem_w)
477474{
478
479475   if(offset >= 0x140 && offset <= 0x144) {
480      dynamic_buffer key;
476      dynamic_buffer key(get_disk_handle(machine(), ":drive_0")->hunk_bytes());
481477
482478      int pos = (offset - 0x140)*2;
483479      UINT8 v, k;
r17558r17559
524520
525521READ32_MEMBER(taitogn_state::flash_subbios_r)
526522{
527
528523   return gen_flash_r(m_biosflash, offset, mem_mask);
529524}
530525
531526WRITE32_MEMBER(taitogn_state::flash_subbios_w)
532527{
533
534528   gen_flash_w(m_biosflash, offset, data, mem_mask);
535529}
536530
537531READ32_MEMBER(taitogn_state::flash_mn102_r)
538532{
539
540533   return gen_flash_r(m_pgmflash, offset, mem_mask);
541534}
542535
543536WRITE32_MEMBER(taitogn_state::flash_mn102_w)
544537{
545
546538   gen_flash_w(m_pgmflash, offset, data, mem_mask);
547539}
548540
549541READ32_MEMBER(taitogn_state::flash_s1_r)
550542{
551
552543   return gen_flash_r(m_sndflash[0], offset, mem_mask);
553544}
554545
555546WRITE32_MEMBER(taitogn_state::flash_s1_w)
556547{
557
558548   gen_flash_w(m_sndflash[0], offset, data, mem_mask);
559549}
560550
561551READ32_MEMBER(taitogn_state::flash_s2_r)
562552{
563
564553   return gen_flash_r(m_sndflash[1], offset, mem_mask);
565554}
566555
567556WRITE32_MEMBER(taitogn_state::flash_s2_w)
568557{
569
570558   gen_flash_w(m_sndflash[1], offset, data, mem_mask);
571559}
572560
573561READ32_MEMBER(taitogn_state::flash_s3_r)
574562{
575
576563   return gen_flash_r(m_sndflash[2], offset, mem_mask);
577564}
578565
579566WRITE32_MEMBER(taitogn_state::flash_s3_w)
580567{
581
582568   gen_flash_w(m_sndflash[2], offset, data, mem_mask);
583569}
584570
r17558r17559
605591
606592READ32_MEMBER(taitogn_state::control_r)
607593{
608
609594   //      fprintf(stderr, "gn_r %08x @ %08x (%s)\n", 0x1fb00000+4*offset, mem_mask, machine().describe_context());
610595   return m_control;
611596}
612597
613598WRITE32_MEMBER(taitogn_state::control_w)
614599{
615
616600   // 20 = watchdog
617601   // 04 = select bank
618602
r17558r17559
645629
646630WRITE32_MEMBER(taitogn_state::control2_w)
647631{
648
649632   COMBINE_DATA(&m_control2);
650633}
651634
652635READ32_MEMBER(taitogn_state::control3_r)
653636{
654
655637   return m_control3;
656638}
657639
658640WRITE32_MEMBER(taitogn_state::control3_w)
659641{
660
661642   COMBINE_DATA(&m_control3);
662643}
663644
r17558r17559
681662
682663READ32_MEMBER(taitogn_state::hack1_r)
683664{
684
685665   m_v = m_v ^ 8;
686666   // Probably something to do with sound
687667   return m_v;
r17558r17559
696676
697677READ32_MEMBER(taitogn_state::znsecsel_r)
698678{
699
700679   return m_n_znsecsel;
701680}
702681
r17558r17559
771750
772751WRITE32_MEMBER(taitogn_state::znsecsel_w)
773752{
774
775753   COMBINE_DATA( &m_n_znsecsel );
776754
777755   if( ( m_n_znsecsel & 0x80 ) == 0 )
r17558r17559
843821
844822WRITE32_MEMBER(taitogn_state::coin_w)
845823{
846
847824   /* 0x01=counter
848825       0x02=coin lock 1
849826       0x08=??
r17558r17559
855832
856833READ32_MEMBER(taitogn_state::coin_r)
857834{
858
859835   return m_coin_info;
860836}
861837
862838/* mahjong panel handler (for Usagi & Mahjong Oh) */
863839READ32_MEMBER(taitogn_state::gnet_mahjong_panel_r)
864840{
865
866841   m_mux_data = m_coin_info;
867842   m_mux_data &= 0xcc;
868843
r17558r17559
882857
883858DRIVER_INIT_MEMBER(taitogn_state,coh3002t)
884859{
885
886860   m_biosflash = machine().device<intel_te28f160_device>("biosflash");
887861   m_pgmflash = machine().device<intel_e28f400_device>("pgmflash");
888862   m_sndflash[0] = machine().device<intel_te28f160_device>("sndflash0");

Previous 199869 Revisions Next


© 1997-2024 The MAME Team