Previous 199869 Revisions Next

r19031 Monday 19th November, 2012 at 08:40:08 UTC by Miodrag Milanović
Cleanups and version bump (nw)
[hash]cd32.xml neocd.xml
[src]version.c
[src/emu/cpu/avr8]avr8.c avr8.h
[src/emu/cpu/i386]i386.c
[src/emu/cpu/m6502]m4510.c m6502make.c m6510.c om6502.lst om65c02.lst om65ce02.lst
[src/emu/cpu/z8000]z8000ops.c
[src/emu/machine]scsicd.c
[src/emu/sound]tms5110r.c tms5220.c
[src/emu/video]pc_vga.c
[src/mame]mame.lst
[src/mame/audio]8080bw.c
[src/mame/drivers]aerofgt.c btime.c cntsteer.c cps1.c ddenlovr.c dec8.c firebeat.c funworld.c goldstar.c naomi.c s6a.c scramble.c supercrd.c vastar.c zn.c
[src/mame/machine]pgmcrypt.c scramble.c zndip.c znsec.c
[src/mame/video]f1gp.c galaxold.c konicdev.c vastar.c vsystem_spr2.c
[src/mess/drivers]a7800.c adam.c alphasma.c altos5.c apc.c apple3.c bw2.c ng_aes.c pc100.c pc9801.c
[src/mess/machine]adam_ddp.c adam_fdc.c adam_ide.c adam_kb.c adam_prn.c adam_spi.c adamlink.c
[src/mess/video]isa_cga.c isa_cga.h

trunk/hash/cd32.xml
r19030r19031
44
55   <!--- Preliminary List -->
66
7 
8    <!-- playable but there's a scrolling glitch every few frames -->
7
8   <!-- playable but there's a scrolling glitch every few frames -->
99  <software name="morph" supported="partial">
1010      <description>Morph</description>
1111      <year>1993</year>
r19030r19031
137137      </diskarea>
138138    </part>
139139  </software>
140 
141 
142140
141
142
143143</softwarelist>
trunk/hash/neocd.xml
r19030r19031
11611161  </software>
11621162
11631163  -->
1164 
1164
11651165</softwarelist>
trunk/src/mame/mame.lst
r19030r19031
50425042ggxxsla         // 2005.09 Guilty Gear XX Slash (Rev A)
50435043radirgy         // 2005.10 Radirgy
50445044undefeat      // 2005.10 Under Defeat
5045radirgya         // 2005.12 Radirgy (Rev A)
5045radirgya      // 2005.12 Radirgy (Rev A)
50465046            // 2005.?? Dragon Treasure 3 (Rev A)
50475047            // 2005.?? ExZeus
50485048            // 2005.?? Mushiking The King Of Beetles II ENG
trunk/src/mame/audio/8080bw.c
r19030r19031
11071107   UINT8 rising_bits = data & ~m_port_2_last_extra;
11081108
11091109   if (rising_bits & 0x01) m_samples->start(0, 6);      /* Lands on top of building, wife kicks man */
1110   //if (rising_bits & 0x02) m_samples->start(3, 7);      /* deposit money, start intermission, end game */
1111   //if (rising_bits & 0x04) m_samples->start(4, 7);      /* deposit money, start intermission, Slides down rope */
1112   //if (rising_bits & 0x08) m_samples->start(5, 7);      /* start intermission, end game */
1110   //if (rising_bits & 0x02) m_samples->start(3, 7);       /* deposit money, start intermission, end game */
1111   //if (rising_bits & 0x04) m_samples->start(4, 7);       /* deposit money, start intermission, Slides down rope */
1112   //if (rising_bits & 0x08) m_samples->start(5, 7);       /* start intermission, end game */
11131113   if (rising_bits & 0x10) m_samples->start(3, 1);        /* Dog barking */
11141114
11151115   m_color_map = data & 0x40;
trunk/src/mame/machine/pgmcrypt.c
r19030r19031
161161   for(i=0; i<rom_size/2; i++) {
162162      UINT16 x = src[i];
163163
164      IGS27_CRYPT1_ALT
164      IGS27_CRYPT1_ALT
165165      IGS27_CRYPT2_ALT2
166      IGS27_CRYPT3_ALT2
167      IGS27_CRYPT4
168      IGS27_CRYPT5
169      IGS27_CRYPT6
170      IGS27_CRYPT7
171      IGS27_CRYPT8_ALT
166      IGS27_CRYPT3_ALT2
167      IGS27_CRYPT4
168      IGS27_CRYPT5
169      IGS27_CRYPT6
170      IGS27_CRYPT7
171      IGS27_CRYPT8_ALT
172172
173173      x ^= kovsh_tab[i & 0xff] << 8;
174174
r19030r19031
209209
210210       IGS27_CRYPT1_ALT
211211      IGS27_CRYPT2_ALT3
212       IGS27_CRYPT3_ALT2
213       IGS27_CRYPT4
212       IGS27_CRYPT3_ALT2
213       IGS27_CRYPT4
214214      IGS27_CRYPT5_ALT
215       IGS27_CRYPT6
215       IGS27_CRYPT6
216216      IGS27_CRYPT7_ALT
217       IGS27_CRYPT8
217       IGS27_CRYPT8
218218
219219       x ^= photoy2k_tab[i & 0xff] << 8;
220220
r19030r19031
252252   for(i=0; i<rom_size/2; i++) {
253253      UINT16 x = src[i];
254254
255      IGS27_CRYPT1
256      IGS27_CRYPT3_ALT2
257      IGS27_CRYPT4
258      IGS27_CRYPT5
259      IGS27_CRYPT6_ALT
260      IGS27_CRYPT7
261      IGS27_CRYPT8
255      IGS27_CRYPT1
256      IGS27_CRYPT3_ALT2
257      IGS27_CRYPT4
258      IGS27_CRYPT5
259      IGS27_CRYPT6_ALT
260      IGS27_CRYPT7
261      IGS27_CRYPT8
262262
263263      x = x ^ pstar[(i & 255)] << 8;
264264      src[i] = x ;
r19030r19031
294294   for(i=0; i<rom_size/2; i++) {
295295       UINT16 x = src[i];
296296
297      IGS27_CRYPT1_ALT
298      IGS27_CRYPT2
299      IGS27_CRYPT3
297      IGS27_CRYPT1_ALT
298      IGS27_CRYPT2
299      IGS27_CRYPT3
300300      IGS27_CRYPT4_ALT
301      IGS27_CRYPT5
302      IGS27_CRYPT6
303      IGS27_CRYPT7
304      IGS27_CRYPT8
301      IGS27_CRYPT5
302      IGS27_CRYPT6
303      IGS27_CRYPT7
304      IGS27_CRYPT8
305305
306306      x ^= dfront_tab[(i>> 1) & 0xff] << 8;
307307
r19030r19031
343343      // NO CRYPT2
344344      // NO CRYPT3
345345      IGS27_CRYPT4_ALT
346      IGS27_CRYPT5
347      IGS27_CRYPT6
348      IGS27_CRYPT7_ALT
349      IGS27_CRYPT8_ALT
346      IGS27_CRYPT5
347      IGS27_CRYPT6
348      IGS27_CRYPT7_ALT
349      IGS27_CRYPT8_ALT
350350
351351      x ^= ddp2_tab[(i>> 1) & 0xff] << 8;
352352
r19030r19031
384384   for(i=0; i<rom_size/2; i++) {
385385       UINT16 x = src[i];
386386
387      IGS27_CRYPT1
388      IGS27_CRYPT2_ALT
389      IGS27_CRYPT3_ALT2
390      IGS27_CRYPT4
391      IGS27_CRYPT5
392      IGS27_CRYPT6_ALT
393      IGS27_CRYPT7
394      IGS27_CRYPT8_ALT
387      IGS27_CRYPT1
388      IGS27_CRYPT2_ALT
389      IGS27_CRYPT3_ALT2
390      IGS27_CRYPT4
391      IGS27_CRYPT5
392      IGS27_CRYPT6_ALT
393      IGS27_CRYPT7
394      IGS27_CRYPT8_ALT
395395
396396      x ^= mm_tab[(i>> 1) & 0xff] << 8;
397397
r19030r19031
428428   for(i=0; i<rom_size/2; i++) {
429429       UINT16 x = src[i];
430430
431       IGS27_CRYPT1_ALT
431       IGS27_CRYPT1_ALT
432432      // NO CRYPT2
433       IGS27_CRYPT3
433       IGS27_CRYPT3
434434      IGS27_CRYPT4_ALT
435435      IGS27_CRYPT5_ALT
436436      IGS27_CRYPT6_ALT
437      IGS27_CRYPT7_ALT
437      IGS27_CRYPT7_ALT
438438      IGS27_CRYPT8_ALT
439439
440440       x ^= kov2_tab[(i >> 1) & 0xff] << 8;
r19030r19031
472472   for(i=0; i<rom_size/2; i++) {
473473       UINT16 x = src[i];
474474
475       IGS27_CRYPT1_ALT
476       IGS27_CRYPT2_ALT
477       IGS27_CRYPT3
478       IGS27_CRYPT4
479       IGS27_CRYPT5
480       IGS27_CRYPT6
481       IGS27_CRYPT7
482       IGS27_CRYPT8_ALT
475       IGS27_CRYPT1_ALT
476       IGS27_CRYPT2_ALT
477       IGS27_CRYPT3
478       IGS27_CRYPT4
479       IGS27_CRYPT5
480       IGS27_CRYPT6
481       IGS27_CRYPT7
482       IGS27_CRYPT8_ALT
483483
484484       x ^= kov2p_tab[(i >> 1) & 0xff] << 8;
485485
r19030r19031
516516   for(i=0; i<rom_size/2; i++) {
517517      UINT16 x = src[i];
518518
519       IGS27_CRYPT1_ALT
520       IGS27_CRYPT2_ALT
521       IGS27_CRYPT3_ALT2
522       IGS27_CRYPT4
523       IGS27_CRYPT5
524       IGS27_CRYPT6_ALT
525       IGS27_CRYPT7
526       IGS27_CRYPT8
519       IGS27_CRYPT1_ALT
520       IGS27_CRYPT2_ALT
521       IGS27_CRYPT3_ALT2
522       IGS27_CRYPT4
523       IGS27_CRYPT5
524       IGS27_CRYPT6_ALT
525       IGS27_CRYPT7
526       IGS27_CRYPT8
527527
528528       x ^= puzzli2_tab[i & 0xff] << 8;
529529       src[i] = x;
r19030r19031
560560   for(i=0; i<rom_size/2; i++) {
561561      UINT16 x = src[i];
562562
563      IGS27_CRYPT1_ALT
564      IGS27_CRYPT2
565      IGS27_CRYPT3
566      IGS27_CRYPT4_ALT
567      IGS27_CRYPT5
568      IGS27_CRYPT6_ALT
569      IGS27_CRYPT7
570      IGS27_CRYPT8_ALT
563      IGS27_CRYPT1_ALT
564      IGS27_CRYPT2
565      IGS27_CRYPT3
566      IGS27_CRYPT4_ALT
567      IGS27_CRYPT5
568      IGS27_CRYPT6_ALT
569      IGS27_CRYPT7
570      IGS27_CRYPT8_ALT
571571
572572      x ^= theglad_tab[(i >> 1) & 0xff] << 8;
573573
r19030r19031
605605   for(i=0; i<rom_size/2; i++) {
606606      unsigned short x = src[i];
607607
608      IGS27_CRYPT1
609      IGS27_CRYPT2_ALT
610      IGS27_CRYPT3_ALT2
611      IGS27_CRYPT4
612      IGS27_CRYPT5_ALT
613      IGS27_CRYPT6
614      IGS27_CRYPT7
615      IGS27_CRYPT8_ALT
608      IGS27_CRYPT1
609      IGS27_CRYPT2_ALT
610      IGS27_CRYPT3_ALT2
611      IGS27_CRYPT4
612      IGS27_CRYPT5_ALT
613      IGS27_CRYPT6
614      IGS27_CRYPT7
615      IGS27_CRYPT8_ALT
616616
617617      x ^= oldsplus_tab[i & 0xff] << 8;
618618
r19030r19031
650650   for(i=0; i<rom_size/2; i++) {
651651      unsigned short x = src[i];
652652
653      IGS27_CRYPT1_ALT
654      IGS27_CRYPT2_ALT2
655      IGS27_CRYPT3_ALT2
656      IGS27_CRYPT4_ALT
657      IGS27_CRYPT5
658      IGS27_CRYPT6_ALT
659      IGS27_CRYPT7
660      IGS27_CRYPT8_ALT
653      IGS27_CRYPT1_ALT
654      IGS27_CRYPT2_ALT2
655      IGS27_CRYPT3_ALT2
656      IGS27_CRYPT4_ALT
657      IGS27_CRYPT5
658      IGS27_CRYPT6_ALT
659      IGS27_CRYPT7
660      IGS27_CRYPT8_ALT
661661
662662      x ^= kovshp_tab[i & 0xff] << 8;
663663
r19030r19031
695695   for(i=0; i<rom_size/2; i++) {
696696      UINT16 x = src[i];
697697
698      IGS27_CRYPT1
699      IGS27_CRYPT2
700      IGS27_CRYPT3
701      IGS27_CRYPT4
702      IGS27_CRYPT5
703      IGS27_CRYPT6
704      IGS27_CRYPT7
705      IGS27_CRYPT8_ALT
698      IGS27_CRYPT1
699      IGS27_CRYPT2
700      IGS27_CRYPT3
701      IGS27_CRYPT4
702      IGS27_CRYPT5
703      IGS27_CRYPT6
704      IGS27_CRYPT7
705      IGS27_CRYPT8_ALT
706706
707707      x ^= killbldp_tab[(i >> 1) & 0xff] << 8;
708708
r19030r19031
721721   for(i=0; i<rom_size/2; i++) {
722722      UINT16 x = src[i];
723723
724      IGS27_CRYPT1_ALT
725      IGS27_CRYPT2_ALT
726      IGS27_CRYPT3
727      IGS27_CRYPT4_ALT
728      IGS27_CRYPT5_ALT
729      IGS27_CRYPT6
730      IGS27_CRYPT7
731      IGS27_CRYPT8_ALT
724      IGS27_CRYPT1_ALT
725      IGS27_CRYPT2_ALT
726      IGS27_CRYPT3
727      IGS27_CRYPT4_ALT
728      IGS27_CRYPT5_ALT
729      IGS27_CRYPT6
730      IGS27_CRYPT7
731      IGS27_CRYPT8_ALT
732732
733733      src[i] = x;
734734   }
r19030r19031
765765
766766      // preliminary!
767767      IGS27_CRYPT1_ALT; // ok?
768      IGS27_CRYPT2_ALT3
768      IGS27_CRYPT2_ALT3
769769      IGS27_CRYPT3
770770      IGS27_CRYPT4 // ok?
771771      IGS27_CRYPT5_ALT  //
772772      IGS27_CRYPT6_ALT // ok?
773773      IGS27_CRYPT7
774      IGS27_CRYPT8_ALT
774      IGS27_CRYPT8_ALT
775775
776776      x ^= svgpcb_tab[(i >> 1) & 0xff] << 8;
777777
r19030r19031
811811      UINT16 x = src[i];
812812
813813      IGS27_CRYPT1
814      IGS27_CRYPT2_ALT3
815      IGS27_CRYPT3_ALT
816      IGS27_CRYPT4_ALT
814      IGS27_CRYPT2_ALT3
815      IGS27_CRYPT3_ALT
816      IGS27_CRYPT4_ALT
817817      IGS27_CRYPT5
818818      IGS27_CRYPT6_ALT
819819      IGS27_CRYPT7
r19030r19031
859859      IGS27_CRYPT1
860860      IGS27_CRYPT2_ALT
861861      IGS27_CRYPT3_ALT3
862      IGS27_CRYPT4_ALT
862      IGS27_CRYPT4_ALT
863863      IGS27_CRYPT5
864864      IGS27_CRYPT6
865865      IGS27_CRYPT7
866      IGS27_CRYPT8_ALT
866      IGS27_CRYPT8_ALT
867867
868868
869869      x ^= ket_tab[i & 0xff] << 8;
r19030r19031
903903      UINT16 x = src[i];
904904
905905      IGS27_CRYPT1
906      IGS27_CRYPT2_ALT3
907      IGS27_CRYPT3_ALT2
908      IGS27_CRYPT4_ALT
909      IGS27_CRYPT5_ALT
906      IGS27_CRYPT2_ALT3
907      IGS27_CRYPT3_ALT2
908      IGS27_CRYPT4_ALT
909      IGS27_CRYPT5_ALT
910910      IGS27_CRYPT6_ALT
911911      IGS27_CRYPT7
912      IGS27_CRYPT8_ALT
912      IGS27_CRYPT8_ALT
913913
914914      x ^= espgal_tab[i & 0xff] << 8;
915915
r19030r19031
953953      IGS27_CRYPT2
954954      IGS27_CRYPT3
955955      IGS27_CRYPT4
956      IGS27_CRYPT5_ALT
956      IGS27_CRYPT5_ALT
957957      IGS27_CRYPT6
958958      IGS27_CRYPT7
959      IGS27_CRYPT8_ALT
959      IGS27_CRYPT8_ALT
960960
961961      x ^= happy6in1_tab[(i >> 1) & 0xff] << 8;
962962
r19030r19031
997997   {
998998      UINT16 x = src[i];
999999
1000      IGS27_CRYPT1_ALT2
1001      IGS27_CRYPT2_ALT
1002      IGS27_CRYPT3_ALT2
1003      IGS27_CRYPT4
1004      IGS27_CRYPT5
1005      IGS27_CRYPT6_ALT
1006      IGS27_CRYPT7
1007      IGS27_CRYPT8
1000      IGS27_CRYPT1_ALT2
1001      IGS27_CRYPT2_ALT
1002      IGS27_CRYPT3_ALT2
1003      IGS27_CRYPT4
1004      IGS27_CRYPT5
1005      IGS27_CRYPT6_ALT
1006      IGS27_CRYPT7
1007      IGS27_CRYPT8
10081008
10091009      x ^= sdwx_tab[(i >> 1) & 0xff] << 8;
10101010
r19030r19031
10451045      IGS27_CRYPT1
10461046   //  IGS27_CRYPT2
10471047   //  IGS27_CRYPT3
1048      IGS27_CRYPT4_ALT
1048      IGS27_CRYPT4_ALT
10491049   //  IGS27_CRYPT5
10501050      IGS27_CRYPT6
1051      IGS27_CRYPT7_ALT
1051      IGS27_CRYPT7_ALT
10521052      IGS27_CRYPT8
10531053
10541054      x ^= hauntedh_tab[(i>> 1) & 0xff] << 8;
r19030r19031
13991399      IGS27_CRYPT1
14001400   //  IGS27_CRYPT2
14011401   //  IGS27_CRYPT3
1402      IGS27_CRYPT4_ALT
1402      IGS27_CRYPT4_ALT
14031403   //  IGS27_CRYPT5
14041404      IGS27_CRYPT6_ALT
14051405      IGS27_CRYPT7
1406      IGS27_CRYPT8_ALT
1406      IGS27_CRYPT8_ALT
14071407
14081408      x ^= lhzb4_tab[(i>> 1) & 0xff] << 8;
14091409
r19030r19031
14431443      UINT16 x = src[i];
14441444
14451445      // might not be 100% correct...
1446      IGS27_CRYPT1
1446      IGS27_CRYPT1
14471447      // IGS27_CRYPT2
1448      IGS27_CRYPT3_ALT2
1449      IGS27_CRYPT4
1448      IGS27_CRYPT3_ALT2
1449      IGS27_CRYPT4
14501450      // IGS27_CRYPT5
1451      IGS27_CRYPT6_ALT
1452      IGS27_CRYPT7
1453      IGS27_CRYPT8
1451      IGS27_CRYPT6_ALT
1452      IGS27_CRYPT7
1453      IGS27_CRYPT8
14541454
14551455      x ^= fearless_tab[(i>> 1) & 0xff] << 8;
14561456
trunk/src/mame/machine/zndip.c
r19030r19031
3030      {
3131         data_out(0, PSX_SIO_IN_DATA | PSX_SIO_IN_DSR);
3232      }
33   
33
3434      m_select = select;
3535   }
3636}
r19030r19031
4141   {
4242      int dip = m_data_handler();
4343      int bit = ( ( dip >> m_bit ) & 1 );
44//      verboselog( machine, 2, "read dip %02x -> %02x\n", n_data, bit * PSX_SIO_IN_DATA );
44//      verboselog( machine, 2, "read dip %02x -> %02x\n", n_data, bit * PSX_SIO_IN_DATA );
4545      data_out( bit * PSX_SIO_IN_DATA, PSX_SIO_IN_DATA );
4646      m_bit++;
4747      m_bit &= 7;
trunk/src/mame/machine/scramble.c
r19030r19031
637637      m_harem_decrypt_mode = ((m_harem_decrypt_mode >> 1) | ((m_harem_decrypt_bit & 1) << 3)) & 0x0f;
638638      m_harem_decrypt_count++;
639639
640//      logerror("%s: decrypt mode = %02x, count = %x\n", machine().describe_context(), m_harem_decrypt_mode, m_harem_decrypt_count);
640//      logerror("%s: decrypt mode = %02x, count = %x\n", machine().describe_context(), m_harem_decrypt_mode, m_harem_decrypt_count);
641641   }
642642
643643   m_harem_decrypt_clk = data;
r19030r19031
654654            logerror("%s: warning, unknown decrypt mode = %02x\n", machine().describe_context(), m_harem_decrypt_mode);
655655            bank = 0;
656656      }
657         
657
658658      membank("rombank")->set_base         (m_harem_decrypted_data      + 0x2000 * bank);
659659      membank("rombank")->set_base_decrypted   (m_harem_decrypted_opcodes   + 0x2000 * bank);
660660
661//      logerror("%s: decrypt mode = %02x (bank %x) active\n", machine().describe_context(), m_harem_decrypt_mode, bank);
661//      logerror("%s: decrypt mode = %02x (bank %x) active\n", machine().describe_context(), m_harem_decrypt_mode, bank);
662662
663663      m_harem_decrypt_mode = 0;
664664      m_harem_decrypt_count = 0;
r19030r19031
670670   m_harem_decrypt_mode = 0;
671671   m_harem_decrypt_count = 0;
672672
673//   logerror("%s: decrypt mode reset\n", machine().describe_context());
673//  logerror("%s: decrypt mode reset\n", machine().describe_context());
674674}
675675
676676DRIVER_INIT_MEMBER(scramble_state,harem)
trunk/src/mame/machine/znsec.c
r19030r19031
172172      {
173173         data_out(0, PSX_SIO_IN_DATA);
174174      }
175   
175
176176      m_select = select;
177177   }
178178}
trunk/src/mame/video/konicdev.c
r19030r19031
1032110321
1032210322      x  = (x + 320) * 256;
1032310323      y  = (y + 208) * 256;
10324//      xx = (xx);
10324//      xx = (xx);
1032510325      xy = (-xy);
1032610326      yx = (-yx);
10327//      yy = (yy);
10327//      yy = (yy);
1032810328
1032910329      if ((k001604->reg[0x6c / 4] & (0x08 >> layer)) != 0)
1033010330      {
trunk/src/mame/video/f1gp.c
r19030r19031
8282UINT32 f1gp_state::f1gp_old_tile_callback( UINT32 code )
8383{
8484   return m_spr1cgram[code % (m_spr1cgram.bytes()/2)];
85}
85}
8686
8787UINT32 f1gp_state::f1gp_ol2_tile_callback( UINT32 code )
8888{
trunk/src/mame/video/vastar.c
r19030r19031
130130   UINT8 *spriteram_3 = state->m_spriteram3;
131131   int offs;
132132
133//   for (offs = 0; offs < 0x40; offs += 2)
133//  for (offs = 0; offs < 0x40; offs += 2)
134134   for (offs = 0x40-2; offs >=0; offs -= 2)
135135   {
136136      int code, sx, sy, color, flipx, flipy;
trunk/src/mame/video/galaxold.c
r19030r19031
790790{
791791   video_start_common(machine());
792792   m_bg_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(galaxold_state::harem_get_tile_info),this),TILEMAP_SCAN_ROWS,8,8,32,32);
793//   m_bg_tilemap->set_transparent_pen(0);   // opaque tilemap to get sky and sand colors
793//  m_bg_tilemap->set_transparent_pen(0);   // opaque tilemap to get sky and sand colors
794794
795795   m_bg_tilemap->set_scroll_cols(32);
796796
trunk/src/mame/video/vsystem_spr2.c
r19030r19031
1616// Pipe Dream
1717
1818// there were lots of comments saying drivers using the
19//    static const UINT8 zoomtable[16] = { 0,7,14,20,25,30,34,38,42,46,49,52,54,57,59,61 };
19// static const UINT8 zoomtable[16] = { 0,7,14,20,25,30,34,38,42,46,49,52,54,57,59,61 };
2020// table for zooming needed upgrading, are we sure this isn't one of the
2121// differences between this sprite chip and the one in vsystem_spr.c, pspikes zooming is very rough
2222
r19030r19031
159159            continue;
160160      }
161161
162     
162
163163      if (m_pritype == 0) // turbo force etc.
164164      {
165165         usepri = curr_sprite.pri ? 0 : 2;
trunk/src/mame/drivers/funworld.c
r19030r19031
51655165
51665166  CTUNK: Rare board with blue TAB board encryption scheme
51675167         plus a daughterboard for program encryption.
5168       
5168
51695169*********************************************************/
51705170{
51715171   UINT8 *rom = machine().root_device().memregion("maincpu")->base();
trunk/src/mame/drivers/btime.c
r19030r19031
208208void deco_cpu7_device::mi_decrypt::write(UINT16 adr, UINT8 val)
209209{
210210   program->write_byte(adr, val);
211   had_written = true;   
211   had_written = true;
212212}
213213
214214
r19030r19031
20082008   UINT8 *rom = memregion("maincpu")->base();
20092009
20102010   /* At location 0xa2b6 there's a strange RLA followed by a BPL that reads from an
2011      unmapped area that causes the game to fail in several circumstances.On the Cassette
2012      version the RLA (33) is in reality a BIT (24),so I'm guessing that there's something
2013      wrong going on in the encryption scheme.*/
2011       unmapped area that causes the game to fail in several circumstances.On the Cassette
2012       version the RLA (33) is in reality a BIT (24),so I'm guessing that there's something
2013       wrong going on in the encryption scheme.*/
20142014   memset(&rom[0xa2b6],0x24,1);
20152015
20162016   m_audio_nmi_enable_type = AUDIO_ENABLE_DIRECT;
trunk/src/mame/drivers/vastar.c
r19030r19031
199199   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
200200
201201   PORT_START("DSW1")
202   PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) )      PORT_DIPLOCATION("DSW1:1,2")   
202   PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) )      PORT_DIPLOCATION("DSW1:1,2")
203203   PORT_DIPSETTING(    0x03, "3" )
204204   PORT_DIPSETTING(    0x02, "4" )
205205   PORT_DIPSETTING(    0x01, "5" )
206206   PORT_DIPSETTING(    0x00, "6" )
207   PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )      PORT_DIPLOCATION("DSW1:3")   
207   PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )      PORT_DIPLOCATION("DSW1:3")
208208   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
209209   PORT_DIPSETTING(    0x04, DEF_STR( On ) )
210210   PORT_DIPNAME( 0x08, 0x08, "Show Author Credits" )   PORT_DIPLOCATION("DSW1:4")
trunk/src/mame/drivers/cntsteer.c
r19030r19031
887887
888888   MCFG_CPU_ADD("subcpu", M6809, 2000000)       /* ? */
889889   MCFG_CPU_PROGRAM_MAP(cntsteer_cpu2_map)
890//   MCFG_DEVICE_DISABLE()
890//  MCFG_DEVICE_DISABLE()
891891   MCFG_CPU_VBLANK_INT_DRIVER("screen", cntsteer_state,  nmi_line_pulse) /* ? */
892892
893893   MCFG_CPU_ADD("audiocpu", M6502, 1500000)        /* ? */
trunk/src/mame/drivers/ddenlovr.c
r19030r19031
445445   arg_size = fetch_word(src_data, src_len, &bit_addr, 4) + 1;
446446
447447#ifdef MAME_DEBUG
448//   if (pen_size > 4 || arg_size > 8)
449//      popmessage("warning: pen_size %d arg_size %d", pen_size, arg_size);
448//  if (pen_size > 4 || arg_size > 8)
449//      popmessage("warning: pen_size %d arg_size %d", pen_size, arg_size);
450450#endif
451451
452452   // sryudens game bug
r19030r19031
25132513   AM_RANGE(0x83, 0x84) AM_READ(hanakanz_gfxrom_r)
25142514   AM_RANGE(0xa0, 0xa1) AM_DEVWRITE_LEGACY("ymsnd", ym2413_w)
25152515   AM_RANGE(0xb0, 0xb0) AM_READ_PORT("SYSTEM")
2516//   AM_RANGE(0xb1, 0xb2) AM_READ(hanakanz_keyb_r)
2516//  AM_RANGE(0xb1, 0xb2) AM_READ(hanakanz_keyb_r)
25172517   AM_RANGE(0xb1, 0xb1) AM_READ_PORT("KEYB0")
25182518   AM_RANGE(0xb2, 0xb2) AM_READ_PORT("KEYB1")
25192519   AM_RANGE(0xb3, 0xb3) AM_WRITE(hanakanz_coincounter_w)
2520//   AM_RANGE(0xb4, 0xb4) AM_WRITE(hanakanz_keyb_w)
2520//  AM_RANGE(0xb4, 0xb4) AM_WRITE(hanakanz_keyb_w)
25212521   AM_RANGE(0xb6, 0xb6) AM_READ(hanakanz_rand_r)
25222522   AM_RANGE(0xc0, 0xc0) AM_DEVREADWRITE("oki", okim6295_device, read, write)
2523//   AM_RANGE(0xe0, 0xef) AM_DEVREADWRITE("rtc", msm6242_device, read, write)
2523//  AM_RANGE(0xe0, 0xef) AM_DEVREADWRITE("rtc", msm6242_device, read, write)
25242524ADDRESS_MAP_END
25252525
25262526
r19030r19031
25372537   AM_RANGE(0x83, 0x84) AM_READ(hanakanz_gfxrom_r)
25382538   AM_RANGE(0xa0, 0xa1) AM_DEVWRITE_LEGACY("ymsnd", ym2413_w)
25392539   AM_RANGE(0x90, 0x90) AM_READ_PORT("SYSTEM")
2540//   AM_RANGE(0x91, 0x91) AM_READ(hanakanz_keyb_r)
2540//  AM_RANGE(0x91, 0x91) AM_READ(hanakanz_keyb_r)
25412541   AM_RANGE(0x91, 0x91) AM_READ_PORT("KEYB0")
25422542   AM_RANGE(0x92, 0x92) AM_READ_PORT("KEYB1")
25432543   AM_RANGE(0x93, 0x93) AM_WRITE(hanakanz_coincounter_w)
2544//   AM_RANGE(0x94, 0x94) AM_WRITE(hanakanz_keyb_w)
2544//  AM_RANGE(0x94, 0x94) AM_WRITE(hanakanz_keyb_w)
25452545   AM_RANGE(0x96, 0x96) AM_READ(hanakanz_rand_r)
25462546   AM_RANGE(0xc0, 0xc0) AM_DEVREADWRITE("oki", okim6295_device, read, write)
2547//   AM_RANGE(0xe0, 0xef) AM_DEVREADWRITE("rtc", msm6242_device, read, write)
2547//  AM_RANGE(0xe0, 0xef) AM_DEVREADWRITE("rtc", msm6242_device, read, write)
25482548ADDRESS_MAP_END
25492549
25502550
r19030r19031
51785178   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN    )
51795179   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN    )
51805180   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN    )
5181   
5181
51825182   PORT_START("KEYB0")
51835183   // Forced Joystick mode wrt kotbinyo:
51845184   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1         ) // * press at boot for service mode
r19030r19031
91339133   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
91349134
91359135   /* devices */
9136//   MCFG_MSM6242_ADD("rtc", hanakanz_rtc_intf)
9136//  MCFG_MSM6242_ADD("rtc", hanakanz_rtc_intf)
91379137MACHINE_CONFIG_END
91389138
91399139static MACHINE_CONFIG_DERIVED( kotbinsp, kotbinyo )
r19030r19031
1053110531DIPs  - 10-Position (x2)
1053210532HSync - 15.1015kHz
1053310533VSync - 60.1656Hz
10534             
10534
1053510535no RTC nor battery (unpopulated)
1053610536
1053710537***************************************************************************/
r19030r19031
1057910579   ROM_LOAD16_BYTE( "909035.8c", 0x000001, 0x100000, CRC(cea4dbfa) SHA1(581bbcfcb0c900667002b7b744197d039d586833) )
1058010580   ROM_LOAD16_BYTE( "909034.6b", 0x200000, 0x080000, CRC(9f366a2a) SHA1(2199cf640b665bd1ba3eac081bde288dec521383) )
1058110581   ROM_LOAD16_BYTE( "909033.6c", 0x200001, 0x080000, CRC(9388b85d) SHA1(a35fe0b585cba256bb5575f7b539b33dd0ca3aa0) )
10582   ROM_FILL(                     0x300000, 0x100000, 0xff )
10582   ROM_FILL(                     0x300000, 0x100000, 0xff )
1058310583   // mirror the whole address space (25 bits)
1058410584   ROM_COPY( "blitter", 0, 0x0400000, 0x400000 )
1058510585   ROM_COPY( "blitter", 0, 0x0800000, 0x400000 )
trunk/src/mame/drivers/dec8.c
r19030r19031
20792079   deco_karnovsprites_device::set_gfx_region(*device, 1);
20802080
20812081   MCFG_SCREEN_ADD("screen", RASTER)
2082//   MCFG_SCREEN_REFRESH_RATE(58)
2083//   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* 58Hz, 529ms Vblank duration */)
2084//   MCFG_SCREEN_SIZE(32*8, 32*8)
2085//   MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1)
2082//  MCFG_SCREEN_REFRESH_RATE(58)
2083//  MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* 58Hz, 529ms Vblank duration */)
2084//  MCFG_SCREEN_SIZE(32*8, 32*8)
2085//  MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1)
20862086   MCFG_SCREEN_RAW_PARAMS(DEC8_PIXEL_CLOCK, DEC8_HTOTAL, DEC8_HBEND, DEC8_HBSTART, DEC8_VTOTAL, DEC8_VBEND, DEC8_VBSTART)
20872087   MCFG_SCREEN_UPDATE_DRIVER(dec8_state, screen_update_lastmisn)
20882088
r19030r19031
21182118   MCFG_CPU_PROGRAM_MAP(ym3526_s_map)
21192119                        /* NMIs are caused by the main CPU */
21202120
2121//   MCFG_QUANTUM_TIME(attotime::from_hz(100000))
2121//  MCFG_QUANTUM_TIME(attotime::from_hz(100000))
21222122   MCFG_QUANTUM_PERFECT_CPU("maincpu") // needs heavy sync, otherwise one of the two CPUs will miss an irq and makes the game to hang
21232123
21242124   /* video hardware */
r19030r19031
21282128   deco_karnovsprites_device::set_gfx_region(*device, 1);
21292129
21302130   MCFG_SCREEN_ADD("screen", RASTER)
2131//   MCFG_SCREEN_REFRESH_RATE(58)
2132//   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* 58Hz, 529ms Vblank duration */)
2133//   MCFG_SCREEN_SIZE(32*8, 32*8)
2134//   MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1)
2131//  MCFG_SCREEN_REFRESH_RATE(58)
2132//  MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* 58Hz, 529ms Vblank duration */)
2133//  MCFG_SCREEN_SIZE(32*8, 32*8)
2134//  MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1)
21352135   MCFG_SCREEN_RAW_PARAMS(DEC8_PIXEL_CLOCK, DEC8_HTOTAL, DEC8_HBEND, DEC8_HBSTART, DEC8_VTOTAL, DEC8_VBEND, DEC8_VBSTART)
21362136   MCFG_SCREEN_UPDATE_DRIVER(dec8_state, screen_update_shackled)
21372137
r19030r19031
21762176   deco_karnovsprites_device::set_gfx_region(*device, 1);
21772177
21782178   MCFG_SCREEN_ADD("screen", RASTER)
2179//   MCFG_SCREEN_REFRESH_RATE(58)
2180//   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(529) /* 58Hz, 529ms Vblank duration */)
2181//   MCFG_SCREEN_SIZE(32*8, 32*8)
2182//   MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1)
2179//  MCFG_SCREEN_REFRESH_RATE(58)
2180//  MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(529) /* 58Hz, 529ms Vblank duration */)
2181//  MCFG_SCREEN_SIZE(32*8, 32*8)
2182//  MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1)
21832183   MCFG_SCREEN_RAW_PARAMS(DEC8_PIXEL_CLOCK, DEC8_HTOTAL, DEC8_HBEND, DEC8_HBSTART, DEC8_VTOTAL, DEC8_VBEND, DEC8_VBSTART)
21842184   MCFG_SCREEN_UPDATE_DRIVER(dec8_state, screen_update_gondo)
21852185   MCFG_SCREEN_VBLANK_DRIVER(dec8_state, screen_eof_dec8)
r19030r19031
22252225   deco_karnovsprites_device::set_gfx_region(*device, 1);
22262226
22272227   MCFG_SCREEN_ADD("screen", RASTER)
2228//   MCFG_SCREEN_REFRESH_RATE(58)
2229//   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(529) /* 58Hz, 529ms Vblank duration */)
2230//   MCFG_SCREEN_SIZE(32*8, 32*8)
2231//   MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1)
2228//  MCFG_SCREEN_REFRESH_RATE(58)
2229//  MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(529) /* 58Hz, 529ms Vblank duration */)
2230//  MCFG_SCREEN_SIZE(32*8, 32*8)
2231//  MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1)
22322232   MCFG_SCREEN_RAW_PARAMS(DEC8_PIXEL_CLOCK, DEC8_HTOTAL, DEC8_HBEND, DEC8_HBSTART, DEC8_VTOTAL, DEC8_VBEND, DEC8_VBSTART)
22332233   MCFG_SCREEN_UPDATE_DRIVER(dec8_state, screen_update_garyoret)
22342234   MCFG_SCREEN_VBLANK_DRIVER(dec8_state, screen_eof_dec8)
r19030r19031
22772277   deco_karnovsprites_device::set_gfx_region(*device, 1);
22782278
22792279   MCFG_SCREEN_ADD("screen", RASTER)
2280//   MCFG_SCREEN_REFRESH_RATE(58)
2281//   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* 58Hz, 529ms Vblank duration */)
2282//   MCFG_SCREEN_SIZE(32*8, 32*8)
2283//   MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1)
2280//  MCFG_SCREEN_REFRESH_RATE(58)
2281//  MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* 58Hz, 529ms Vblank duration */)
2282//  MCFG_SCREEN_SIZE(32*8, 32*8)
2283//  MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1)
22842284   MCFG_SCREEN_RAW_PARAMS(DEC8_PIXEL_CLOCK, DEC8_HTOTAL, DEC8_HBEND, DEC8_HBSTART, DEC8_VTOTAL, DEC8_VBEND, DEC8_VBSTART)
22852285   MCFG_SCREEN_UPDATE_DRIVER(dec8_state, screen_update_ghostb)
22862286   MCFG_SCREEN_VBLANK_DRIVER(dec8_state, screen_eof_dec8)
r19030r19031
23282328   deco_karnovsprites_device::set_gfx_region(*device, 1);
23292329
23302330   MCFG_SCREEN_ADD("screen", RASTER)
2331//   MCFG_SCREEN_REFRESH_RATE(58)
2332//   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(529) /* 58Hz, 529ms Vblank duration */)
2333//   MCFG_SCREEN_SIZE(32*8, 32*8)
2334//   MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1)
2331//  MCFG_SCREEN_REFRESH_RATE(58)
2332//  MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(529) /* 58Hz, 529ms Vblank duration */)
2333//  MCFG_SCREEN_SIZE(32*8, 32*8)
2334//  MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1)
23352335   MCFG_SCREEN_RAW_PARAMS(DEC8_PIXEL_CLOCK, DEC8_HTOTAL, DEC8_HBEND, DEC8_HBSTART, DEC8_VTOTAL, DEC8_VBEND, DEC8_VBSTART)
23362336   MCFG_SCREEN_UPDATE_DRIVER(dec8_state, screen_update_lastmisn)
23372337
r19030r19031
23842384   deco_mxc06_device::set_gfx_region(*device, 1);
23852385
23862386   MCFG_SCREEN_ADD("screen", RASTER)
2387//   MCFG_SCREEN_REFRESH_RATE(58)
2388//   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* 58Hz, 529ms Vblank duration */)
2389//   MCFG_SCREEN_SIZE(32*8, 32*8)
2390//   MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1)
2387//  MCFG_SCREEN_REFRESH_RATE(58)
2388//  MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* 58Hz, 529ms Vblank duration */)
2389//  MCFG_SCREEN_SIZE(32*8, 32*8)
2390//  MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1)
23912391   MCFG_SCREEN_RAW_PARAMS(DEC8_PIXEL_CLOCK, DEC8_HTOTAL, DEC8_HBEND, DEC8_HBSTART, DEC8_VTOTAL, DEC8_VBEND, DEC8_VBSTART)
23922392   MCFG_SCREEN_UPDATE_DRIVER(dec8_state, screen_update_oscar)
23932393
r19030r19031
24262426   MCFG_BUFFERED_SPRITERAM8_ADD("spriteram")
24272427
24282428   MCFG_SCREEN_ADD("screen", RASTER)
2429//   MCFG_SCREEN_REFRESH_RATE(58)
2430//   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(529) /* 58Hz, 529ms Vblank duration */)
2431//   MCFG_SCREEN_SIZE(32*8, 32*8)
2432//   MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1)
2429//  MCFG_SCREEN_REFRESH_RATE(58)
2430//  MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(529) /* 58Hz, 529ms Vblank duration */)
2431//  MCFG_SCREEN_SIZE(32*8, 32*8)
2432//  MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1)
24332433   MCFG_SCREEN_RAW_PARAMS(DEC8_PIXEL_CLOCK, DEC8_HTOTAL, DEC8_HBEND, DEC8_HBSTART, DEC8_VTOTAL, DEC8_VBEND, DEC8_VBSTART)
24342434   MCFG_SCREEN_UPDATE_DRIVER(dec8_state, screen_update_srdarwin)
24352435
r19030r19031
24772477
24782478
24792479   MCFG_SCREEN_ADD("screen", RASTER)
2480//   MCFG_SCREEN_REFRESH_RATE(58)
2481//   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(529) /* 58Hz, 529ms Vblank duration */)
2482//   MCFG_SCREEN_SIZE(32*8, 32*8)
2483//   MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1)
2480//  MCFG_SCREEN_REFRESH_RATE(58)
2481//  MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(529) /* 58Hz, 529ms Vblank duration */)
2482//  MCFG_SCREEN_SIZE(32*8, 32*8)
2483//  MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1)
24842484   MCFG_SCREEN_RAW_PARAMS(DEC8_PIXEL_CLOCK, DEC8_HTOTAL, DEC8_HBEND, DEC8_HBSTART, DEC8_VTOTAL, DEC8_VBEND, DEC8_VBSTART)
24852485   MCFG_SCREEN_UPDATE_DRIVER(dec8_state, screen_update_cobracom)
24862486
trunk/src/mame/drivers/naomi.c
r19030r19031
56175617    NAOMI_DEFAULT_EEPROM
56185618
56195619    ROM_REGION( 0xb000000, "rom_board", ROMREGION_ERASEFF)
5620    ROM_LOAD( "nja1_fl1.2d",     0x0800000, 0x0800000, CRC(a57c0576) SHA1(0c99a3e648798bf6a100512d682c08a3d4f05958) )
5621    ROM_LOAD( "nja1_fl2.2c",     0x1000000, 0x0800000, CRC(1f81f46b) SHA1(7677f881b84233f3f95a792f9be6f618cba6d586) )
5622    ROM_LOAD( "nja1_fl3.2b",     0x1800000, 0x0800000, CRC(24974c3d) SHA1(cd64dec682688e26fca91873e5e7b6e0d931d1ce) )
5620    ROM_LOAD( "nja1_fl1.2d",     0x0800000, 0x0800000, CRC(a57c0576) SHA1(0c99a3e648798bf6a100512d682c08a3d4f05958) )
5621    ROM_LOAD( "nja1_fl2.2c",     0x1000000, 0x0800000, CRC(1f81f46b) SHA1(7677f881b84233f3f95a792f9be6f618cba6d586) )
5622    ROM_LOAD( "nja1_fl3.2b",     0x1800000, 0x0800000, CRC(24974c3d) SHA1(cd64dec682688e26fca91873e5e7b6e0d931d1ce) )
56235623    ROM_LOAD( "nja1ma2.4l",      0x2000000, 0x1000000, CRC(5af34ea0) SHA1(b49a50e995cb6682782b0643d40001b9bffe0118) )
56245624    ROM_LOAD( "nja1ma3.4k",      0x3000000, 0x1000000, CRC(504a89b3) SHA1(e0b90542f80527e998db7ee3bb75e36c375cacba) )
56255625    ROM_LOAD( "nja1ma4.4j",      0x4000000, 0x1000000, CRC(d5c2799a) SHA1(ce46c1aa38479d9e5e350573bc6b214979b88dbc) )
trunk/src/mame/drivers/scramble.c
r19030r19031
17891789Triple Punch
17901790(C)1982 KKI
17911791
1792board silkscreend      PCO-008-01
1792board silkscreend       PCO-008-01
17931793
17941794Empty 24 pin socket at 2E
17951795Empty 40 pin socket at 0A
17961796
1797.2h   2732   stickered   TD4
1798.2k   2732   stickered   TC3
1799.2l   2732   stickered   TE2
1800.2m   2732   stickered   TD1
1801.5h   2716   stickered   TA7
1802.5f   2716   stickered   TA6
1803.6e   82s123   stickered   TA
1797.2h 2732    stickered   TD4
1798.2k 2732    stickered   TC3
1799.2l 2732    stickered   TE2
1800.2m 2732    stickered   TD1
1801.5h 2716    stickered   TA7
1802.5f 2716    stickered   TA6
1803.6e 82s123  stickered   TA
18041804***************************************************************************/
18051805
18061806ROM_START( triplepa )
trunk/src/mame/drivers/s6a.c
r19030r19031
261261
262262WRITE8_MEMBER( s6a_state::sol0_w )
263263{
264//   if (BIT(data, 4))
265//      m_samples->start(2, 5); // outhole
264//  if (BIT(data, 4))
265//      m_samples->start(2, 5); // outhole
266266}
267267
268268WRITE8_MEMBER( s6a_state::sol1_w )
r19030r19031
287287
288288   m_pias->cb1_w(m_cb1);
289289
290//   if (BIT(data, 5))
291//      m_samples->start(0, 6); // knocker
290//  if (BIT(data, 5))
291//      m_samples->start(0, 6); // knocker
292292}
293293
294294static const pia6821_interface pia22_intf =
trunk/src/mame/drivers/goldstar.c
r19030r19031
634634   AM_RANGE(0xe0, 0xe0) AM_DEVWRITE("sn3", sn76489_device, write)                  /* SN76489 #3 */
635635   AM_RANGE(0x60, 0x60) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w)               /* AY8910 control? */
636636   AM_RANGE(0x80, 0x80) AM_DEVREADWRITE_LEGACY("aysnd", ay8910_r, ay8910_data_w)      /* AY8910 Input? */
637//   AM_RANGE(0x01, 0x01) AM_DEVREAD_LEGACY("aysnd", ay8910_r)
638//   AM_RANGE(0x02, 0x03) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_address_w)
637//  AM_RANGE(0x01, 0x01) AM_DEVREAD_LEGACY("aysnd", ay8910_r)
638//  AM_RANGE(0x02, 0x03) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_address_w)
639639ADDRESS_MAP_END
640640
641641
r19030r19031
70127012   MCFG_CPU_VBLANK_INT_DRIVER("screen", goldstar_state,  nmi_line_pulse)
70137013
70147014   /* 3x 8255 */
7015//   MCFG_I8255A_ADD( "ppi8255_0", lucky8_ppi8255_0_intf )
7016//   MCFG_I8255A_ADD( "ppi8255_1", lucky8_ppi8255_1_intf )
7017//   MCFG_I8255A_ADD( "ppi8255_2", lucky8_ppi8255_2_intf )
7015//  MCFG_I8255A_ADD( "ppi8255_0", lucky8_ppi8255_0_intf )
7016//  MCFG_I8255A_ADD( "ppi8255_1", lucky8_ppi8255_1_intf )
7017//  MCFG_I8255A_ADD( "ppi8255_2", lucky8_ppi8255_2_intf )
70187018
70197019   /* video hardware */
70207020   MCFG_SCREEN_ADD("screen", RASTER)
r19030r19031
70277027
70287028   MCFG_GFXDECODE(megaline)
70297029   MCFG_PALETTE_LENGTH(256)
7030//   MCFG_NVRAM_ADD_1FILL("nvram")
7030//  MCFG_NVRAM_ADD_1FILL("nvram")
70317031
70327032   MCFG_VIDEO_START_OVERRIDE(goldstar_state,goldstar)
70337033
r19030r19031
1049910499
1050010500
1050110501  ==========================
10502  Custom 06B53P 9G1 - DIP 28   
10502  Custom 06B53P 9G1 - DIP 28
1050310503  ==========================
1050410504  Pinout
1050510505  ======
r19030r19031
1055510555  08 -> M2(16)
1055610556  09 -> M2(15)
1055710557  10 -> M2(12)
10558  11 -> N2(19) -> 10k -> +5V
10558  11 -> N2(19) -> 10k -> +5V
1055910559  12 -> GND
1056010560  13 -> GND
1056110561  14 -> M2(06)
r19030r19031
1063210632  ========
1063310633   BPROMS:
1063410634  ========
10635                       
10635
1063610636            GND-------------+ +----------N3(10)
1063710637            GND-----------+ | | +--------N3(06)
1063810638            K5(06)------+ | | | | +------(N/C)
r19030r19031
1064310643                    |>## 24S10 @M3 ###|
1064410644                    |#################|
1064510645                    +-+-+-+-+-+-+-+-+-+
10646                      | | | | | | | |
10646                      | | | | | | | |
1064710647            K5(15)----+ | | | | | | +----GND
1064810648            K3(12)------+ | | | | +------D3(03)
1064910649            K3(14)--------+ | | +--------D3(11)
r19030r19031
1065410654                   J3(10)---+ +----J3(11)
1065510655                 K5(05)---+ | | +----J3(12)
1065610656              H3(05)----+ | | | | +-----J3(13)
10657            +5V-------+ | | | | | |
10657            +5V-------+ | | | | | |
1065810658                      | | | | | | | +-------------------+
1065910659                      | | | | | | | |                   |
1066010660                    +-----------------+                 |
r19030r19031
1077810778            |                     | | | | | +--------------|-|-+
1077910779            |                     | | | | | | +------------|-+
1078010780            |                     | | | | | | | +----------+
10781            |                     | | | | | | | |   
10781            |                     | | | | | | | |
1078210782            |                 +---+-+-+-+-+-+-+-+---+
1078310783            |                 | 1+---------------+8 |
1078410784            |                 |  | | | | | | | | |  |
trunk/src/mame/drivers/firebeat.c
r19030r19031
106106          The display list objects seem to be there, but the address is wrong (0x14c400, instead of the correct address)
107107
108108        - The external Yamaha MIDI sound board is not emulated (no keyboard sounds).
109 
110 
111       - Notes on how the video is supposed to work from Ville / Ian Patterson:
112 
113       There are four "display contexts" that are set up via registers 20-4E. They are
114       basically just raw framebuffers. 40-4E sets the base framebuffer pointer, 30-3E
115       sets the size, 20-2E may set the minimum x and y coordinates but I haven't seen
116       them set to something other than 0 yet. One context is set as the one the RAMDAC
117       outputs to the monitor (not sure how this is selected yet, probably the lower
118       bits of register 12). Thestartup test in the popn BIOS checks all of VRAM, so
119       it moves the currentdisplay address around so you don't see crazy colors, which
120      is very helpful in figuring out how this part works.
121109
122       The other new part is that there are two VRAM write ports, managed by registers
123       60+68+70 and 64+6A+74, with status read from the lower bits of reg 7A. Each context
124       can either write to VRAM as currently emulated, or the port can be switched in to
125       "immediate mode" via registers 68/6A. Immedate mode can be used to run GCU commands
126       at any point during the frame. It's mainly used to call display lists, which is where
127       the display list addresses come from. Some games use it to send other commands, so
128      it appears to be a 4-dword FIFO or something along those lines.
110
111        - Notes on how the video is supposed to work from Ville / Ian Patterson:
112
113        There are four "display contexts" that are set up via registers 20-4E. They are
114        basically just raw framebuffers. 40-4E sets the base framebuffer pointer, 30-3E
115        sets the size, 20-2E may set the minimum x and y coordinates but I haven't seen
116        them set to something other than 0 yet. One context is set as the one the RAMDAC
117        outputs to the monitor (not sure how this is selected yet, probably the lower
118        bits of register 12). Thestartup test in the popn BIOS checks all of VRAM, so
119        it moves the currentdisplay address around so you don't see crazy colors, which
120        is very helpful in figuring out how this part works.
121
122        The other new part is that there are two VRAM write ports, managed by registers
123        60+68+70 and 64+6A+74, with status read from the lower bits of reg 7A. Each context
124        can either write to VRAM as currently emulated, or the port can be switched in to
125        "immediate mode" via registers 68/6A. Immedate mode can be used to run GCU commands
126        at any point during the frame. It's mainly used to call display lists, which is where
127        the display list addresses come from. Some games use it to send other commands, so
128        it appears to be a 4-dword FIFO or something along those lines.
129129*/
130130
131131#include "emu.h"
r19030r19031
730730      }
731731
732732      case 0x40:      /* framebuffer config */
733         // HACK: switch display lists at the right times for the ParaParaParadise games until we
733         // HACK: switch display lists at the right times for the ParaParaParadise games until we
734734         // do the video emulation properly
735735         if (mame_strnicmp(machine.system().name, "pp", 2) == 0)
736736         {
r19030r19031
11901190            //if (state->m_atapi_drivesel==1) logerror("!!!ATAPI COMMAND %x\n", state->m_atapi_data[0]&0xff);
11911191            switch (state->m_atapi_data[0]&0xff)
11921192            {
1193                       
1193
11941194                    case 0x55:   // MODE SELECT
11951195                  state->m_atapi_cdata_wait = state->m_atapi_data[4]/2;
11961196                  state->m_atapi_data_ptr = 0;
11971197                  logerror("ATAPI: Waiting for %x bytes of MODE SELECT data\n", state->m_atapi_cdata_wait);
11981198                  break;
11991199
1200                   
1200
12011201               case 0xa8:   // READ (12)
12021202                  // indicate data ready: set DRQ and DMA ready, and IO in INTREASON
12031203                  state->m_atapi_regs[ATAPI_REG_CMDSTATUS] = ATAPI_STAT_DRQ | ATAPI_STAT_SERVDSC;
r19030r19031
12091209               case 0x00: // BUS RESET / TEST UNIT READY
12101210               case 0xbb: // SET CD SPEED
12111211               case 0xa5: // PLAY AUDIO
1212               case 0x1b: // START_STOP_UNIT
1213               case 0x4e: // STOPPLAY_SCAN
1212               case 0x1b: // START_STOP_UNIT
1213               case 0x4e: // STOPPLAY_SCAN
12141214                  state->m_atapi_regs[ATAPI_REG_CMDSTATUS] = 0;
12151215                  break;
12161216            }
r19030r19031
23942394   ROM_REGION(0x400000, "ymz", ROMREGION_ERASE00)
23952395
23962396   ROM_REGION(0xc0, "user2", 0)   // Security dongle
2397   ROM_LOAD( "gqa11-ja",     0x000000, 0x0000c0, CRC(2ed8e2ae) SHA1(b8c3410dab643111b2d2027068175ba018a0a67e) )
2397   ROM_LOAD( "gqa11-ja",     0x000000, 0x0000c0, CRC(2ed8e2ae) SHA1(b8c3410dab643111b2d2027068175ba018a0a67e) )
23982398
23992399   DISK_REGION( "scsi0" )
24002400   DISK_IMAGE_READONLY( "a11jaa01", 0, SHA1(539ec6f1c1d198b0d6ce5543eadcbb4d9917fa42) )
trunk/src/mame/drivers/zn.c
r19030r19031
422422      {
423423         state->m_znsec0->init( zn_config_table[ n_game ].p_n_mainsec );
424424         state->m_znsec1->init( zn_config_table[ n_game ].p_n_gamesec );
425//         psx_sio_install_handler( machine, 0, sio_pad_handler );
425//          psx_sio_install_handler( machine, 0, sio_pad_handler );
426426         break;
427427      }
428428      n_game++;
trunk/src/mame/drivers/cps1.c
r19030r19031
18131813
18141814/* To-Do sf2amf dipswitch SW(B):4 + SW(B):5 + SW(B):6
18151815static INPUT_PORTS_START( sf2amf )
1816   PORT_INCLUDE(  )
1816    PORT_INCLUDE(  )
18171817
1818   PORT_MODIFY("DSWB")
1819   PORT_DIPNAME( 0x08, 0x00, "Turbo Switch 1 of 3" )   PORT_DIPLOCATION("SW(B):4")
1820   PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
1821   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1822   PORT_DIPNAME( 0x10, 0x00, "Turbo Switch 2 of 3" )   PORT_DIPLOCATION("SW(B):5")
1823   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
1824   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1825   PORT_DIPNAME( 0x20, 0x00, "Turbo Switch 3 of 3" )   PORT_DIPLOCATION("SW(B):6")
1826   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
1827   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1818    PORT_MODIFY("DSWB")
1819    PORT_DIPNAME( 0x08, 0x00, "Turbo Switch 1 of 3" )   PORT_DIPLOCATION("SW(B):4")
1820    PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
1821    PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1822    PORT_DIPNAME( 0x10, 0x00, "Turbo Switch 2 of 3" )   PORT_DIPLOCATION("SW(B):5")
1823    PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
1824    PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1825    PORT_DIPNAME( 0x20, 0x00, "Turbo Switch 3 of 3" )   PORT_DIPLOCATION("SW(B):6")
1826    PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
1827    PORT_DIPSETTING(    0x00, DEF_STR( On ) )
18281828INPUT_PORTS_END
18291829*/
18301830
r19030r19031
65766576ROM_START( sf2stt )
65776577   ROM_REGION( CODE_SIZE, "maincpu", 0 )      /* 68000 code */
65786578   /* do not comment this out, this is only for testing purpose
6579   ROM_LOAD16_BYTE( "12.bin",   0x00000, 0x40000, CRC(a258b4d5) SHA1(3433b6493794c98bb35c1b27cc65bb5f13d52e9b) )
6580   ROM_LOAD16_BYTE( "09.bin",   0x00001, 0x40000, CRC(59ccd474) SHA1(7bb28c28ee722435fdbb18eb73e52bd65b419103) )
6581   */
6579    ROM_LOAD16_BYTE( "12.bin",   0x00000, 0x40000, CRC(a258b4d5) SHA1(3433b6493794c98bb35c1b27cc65bb5f13d52e9b) )
6580    ROM_LOAD16_BYTE( "09.bin",   0x00001, 0x40000, CRC(59ccd474) SHA1(7bb28c28ee722435fdbb18eb73e52bd65b419103) )
6581    */
65826582   ROM_LOAD16_BYTE( "prg part 1.stt", 0x00000, 0x40000, NO_DUMP )
65836583   ROM_LOAD16_BYTE( "prg part 2.stt", 0x00001, 0x40000, NO_DUMP )
65846584   /* there are two empty sockets next to the two following program roms,
6585      these roms may be missing and this PCB is not working on real hardware */
6585       these roms may be missing and this PCB is not working on real hardware */
65866586   ROM_LOAD16_BYTE( "ce91e-b",        0x80000, 0x40000, CRC(0862386e) SHA1(9fcfbcbbc17529de75d5419018e7b1dd90b397c0) )
65876587   ROM_LOAD16_BYTE( "ce91e-a",        0x80001, 0x40000, CRC(0c83844d) SHA1(4c25ba4a50d62c62789d026e3d304ed1dfb3c248) )
65886588
r19030r19031
66256625ROM_START( sf2unkb )
66266626   ROM_REGION( CODE_SIZE, "maincpu", 0 )      /* 68000 code */
66276627   /* do not comment this out, this is only for testing purpose
6628   ROM_LOAD16_BYTE( "12.bin",             0x000000, 0x40000, CRC(a258b4d5) SHA1(3433b6493794c98bb35c1b27cc65bb5f13d52e9b) )
6629   ROM_LOAD16_BYTE( "09.bin",             0x000001, 0x40000, CRC(59ccd474) SHA1(7bb28c28ee722435fdbb18eb73e52bd65b419103) )
6630   ROM_LOAD16_BYTE( "11.bin",             0x080000, 0x40000, CRC(82097d63) SHA1(881e7ffb78197f6794b5d41f5c2c87da35e8cb15) )
6631   ROM_LOAD16_BYTE( "10.bin",             0x080001, 0x40000, CRC(0c83844d) SHA1(4c25ba4a50d62c62789d026e3d304ed1dfb3c248) )
6632   */
6628    ROM_LOAD16_BYTE( "12.bin",             0x000000, 0x40000, CRC(a258b4d5) SHA1(3433b6493794c98bb35c1b27cc65bb5f13d52e9b) )
6629    ROM_LOAD16_BYTE( "09.bin",             0x000001, 0x40000, CRC(59ccd474) SHA1(7bb28c28ee722435fdbb18eb73e52bd65b419103) )
6630    ROM_LOAD16_BYTE( "11.bin",             0x080000, 0x40000, CRC(82097d63) SHA1(881e7ffb78197f6794b5d41f5c2c87da35e8cb15) )
6631    ROM_LOAD16_BYTE( "10.bin",             0x080001, 0x40000, CRC(0c83844d) SHA1(4c25ba4a50d62c62789d026e3d304ed1dfb3c248) )
6632    */
66336633   ROM_LOAD16_BYTE( "prg part 1.sf2unkb", 0x00000, 0x80000, NO_DUMP )
66346634   ROM_LOAD16_BYTE( "prg part 2.sf2unkb", 0x00001, 0x80000, NO_DUMP )
66356635   /* there are two empty sockets next to the two following program roms,
6636      these roms may be missing and this PCB is not working on real hardware */
6636       these roms may be missing and this PCB is not working on real hardware */
66376637   ROM_LOAD16_BYTE( "w-6",                0x100000, 0x20000, CRC(bb4af315) SHA1(75f0827f4f7e9f292add46467f8d4fe19b2514c9) )
66386638   ROM_LOAD16_BYTE( "w-5",                0x100001, 0x20000, CRC(c02a13eb) SHA1(b807cc495bff3f95d03b061fc629c95f965cb6d8) )
66396639
r19030r19031
66716671   ROM_REGION( 0x40000, "oki", 0 )   /* Samples */
66726672   ROM_LOAD( "sample part 1.unkb", 0x20000, 0x20000, NO_DUMP )
66736673   /* do not comment this out, this is only for testing purpose
6674   ROM_LOAD( "sf2_18.11c",         0x00000, 0x20000, CRC(7f162009) SHA1(346bf42992b4c36c593e21901e22c87ae4a7d86d) )
6675   */
6674    ROM_LOAD( "sf2_18.11c",         0x00000, 0x20000, CRC(7f162009) SHA1(346bf42992b4c36c593e21901e22c87ae4a7d86d) )
6675    */
66766676   ROM_LOAD( "w-7",                0x20000, 0x20000, CRC(beade53f) SHA1(277c397dc12752719ec6b47d2224750bd1c07f79) )
66776677ROM_END
66786678
r19030r19031
83238323   ROM_LOAD16_BYTE( "5.amf",     0x000000, 0x80000, CRC(03991fba) SHA1(6c42bf15248640fdb3e98fb01b0a870649deb410) )
83248324   ROM_LOAD16_BYTE( "4.amf",     0x000001, 0x80000, CRC(39f15a1e) SHA1(901c4fea76bf5bff7330ed07ffde54cdccdaa680) )
83258325   /* there are two empty sockets next to the two former program roms,
8326      these roms may be missing and this PCB is not working on real hardware */
8326       these roms may be missing and this PCB is not working on real hardware */
83278327   ROM_LOAD16_BYTE( "prg part 3.amf", 0x100000, 0x40000, NO_DUMP )
83288328   ROM_LOAD16_BYTE( "prg part 4.amf", 0x100001, 0x40000, NO_DUMP )
83298329   /* do not comment this out, this is only for testing purpose
8330   ROM_LOAD16_BYTE( "u221.rom",   0x100000, 0x20000, CRC(64e6e091) SHA1(32ec05db955e538d4ada26d19ee50926f74b684f) )
8331   ROM_LOAD16_BYTE( "u195.rom",   0x100001, 0x20000, CRC(c95e4443) SHA1(28417dee9ccdfa65b0f4a92aa29b90279fe8cd85) )
8332   */
8333   
8330    ROM_LOAD16_BYTE( "u221.rom",   0x100000, 0x20000, CRC(64e6e091) SHA1(32ec05db955e538d4ada26d19ee50926f74b684f) )
8331    ROM_LOAD16_BYTE( "u195.rom",   0x100001, 0x20000, CRC(c95e4443) SHA1(28417dee9ccdfa65b0f4a92aa29b90279fe8cd85) )
8332    */
8333
83348334   ROM_REGION( 0x600000, "gfx", 0 )
83358335   ROMX_LOAD( "y.c.e.c m.k.r-001", 0x000000, 0x80000, CRC(a258de13) SHA1(2e477948c4c8a2fb7cfdc4a739766bc4a4e01c49), ROM_GROUPWORD | ROM_SKIP(6) )
83368336   ROM_CONTINUE(                       0x000002, 0x80000)
trunk/src/mame/drivers/supercrd.c
r19030r19031
3434
3535  ROMs:  PRG: 2x 27C512 (IC37, IC51)
3636         GFX: 2x 27C512 (IC10, IC11)
37      BP:  1x N82S147N
37        BP:  1x N82S147N
3838
3939  1x Xtal 16 MHz.
4040  1x 8 DIP switches bank.
r19030r19031
276276   AM_RANGE(0x0000, 0xbfff) AM_ROM
277277   AM_RANGE(0xc000, 0xcfff) AM_RAM_WRITE(supercrd_videoram_w) AM_SHARE("videoram")   // wrong
278278   AM_RANGE(0xd000, 0xdfff) AM_RAM_WRITE(supercrd_colorram_w) AM_SHARE("colorram")   // wrong
279//   AM_RANGE(0x0000, 0x0000) AM_RAM AM_SHARE("nvram")
280//   AM_RANGE(0xe000, 0xe000) AM_DEVWRITE("crtc", mc6845_device, address_w)
281//   AM_RANGE(0xe001, 0xe001) AM_DEVREADWRITE("crtc", mc6845_device, register_r, register_w)
279//  AM_RANGE(0x0000, 0x0000) AM_RAM AM_SHARE("nvram")
280//  AM_RANGE(0xe000, 0xe000) AM_DEVWRITE("crtc", mc6845_device, address_w)
281//  AM_RANGE(0xe001, 0xe001) AM_DEVREADWRITE("crtc", mc6845_device, register_r, register_w)
282282ADDRESS_MAP_END
283283
284284
r19030r19031
401401
402402//static const mc6845_interface mc6845_intf =
403403//{
404//   "screen",   /* screen we are acting on */
405//   4,         /* number of pixels per video memory address */
406//   NULL,      /* before pixel update callback */
407//   NULL,      /* row update callback */
408//   NULL,      /* after pixel update callback */
409//   DEVCB_NULL,   /* callback for display state changes */
410//   DEVCB_NULL,   /* callback for cursor state changes */
411//   DEVCB_NULL,   /* HSYNC callback */
412//   DEVCB_NULL,   /* VSYNC callback */
413//   NULL      /* update address callback */
404//  "screen",   /* screen we are acting on */
405//  4,          /* number of pixels per video memory address */
406//  NULL,       /* before pixel update callback */
407//  NULL,       /* row update callback */
408//  NULL,       /* after pixel update callback */
409//  DEVCB_NULL, /* callback for display state changes */
410//  DEVCB_NULL, /* callback for cursor state changes */
411//  DEVCB_NULL, /* HSYNC callback */
412//  DEVCB_NULL, /* VSYNC callback */
413//  NULL        /* update address callback */
414414//};
415415
416416
r19030r19031
420420
421421//static I8255_INTERFACE (ppi8255_intf_0)
422422//{
423//   /* (port) Mode X - description */
424//   DEVCB_UNMAPPED,      /* Port A read */
425//   DEVCB_UNMAPPED,      /* Port A write */
426//   DEVCB_UNMAPPED,      /* Port B read */
427//   DEVCB_UNMAPPED,      /* Port B write */
428//   DEVCB_UNMAPPED,      /* Port C read */
429//   DEVCB_UNMAPPED      /* Port C write */
423//  /* (port) Mode X - description */
424//  DEVCB_UNMAPPED,     /* Port A read */
425//  DEVCB_UNMAPPED,     /* Port A write */
426//  DEVCB_UNMAPPED,     /* Port B read */
427//  DEVCB_UNMAPPED,     /* Port B write */
428//  DEVCB_UNMAPPED,     /* Port C read */
429//  DEVCB_UNMAPPED      /* Port C write */
430430//};
431431
432432//static I8255_INTERFACE (ppi8255_intf_1)
433433//{
434//   /* (port) Mode X - description */
435//   DEVCB_UNMAPPED,      /* Port A read */
436//   DEVCB_UNMAPPED,      /* Port A write */
437//   DEVCB_UNMAPPED,      /* Port B read */
438//   DEVCB_UNMAPPED,      /* Port B write */
439//   DEVCB_UNMAPPED,      /* Port C read */
440//   DEVCB_UNMAPPED      /* Port C write */
434//  /* (port) Mode X - description */
435//  DEVCB_UNMAPPED,     /* Port A read */
436//  DEVCB_UNMAPPED,     /* Port A write */
437//  DEVCB_UNMAPPED,     /* Port B read */
438//  DEVCB_UNMAPPED,     /* Port B write */
439//  DEVCB_UNMAPPED,     /* Port C read */
440//  DEVCB_UNMAPPED      /* Port C write */
441441//};
442442
443443/**************************
r19030r19031
449449   MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK/8)   /* 2MHz, guess */
450450   MCFG_CPU_PROGRAM_MAP(supercrd_map)
451451
452//   MCFG_NVRAM_ADD_0FILL("nvram")
452//  MCFG_NVRAM_ADD_0FILL("nvram")
453453
454//   MCFG_I8255_ADD( "ppi8255_0", ppi8255_intf_0 )
455//   MCFG_I8255_ADD( "ppi8255_1", ppi8255_intf_1 )
454//  MCFG_I8255_ADD( "ppi8255_0", ppi8255_intf_0 )
455//  MCFG_I8255_ADD( "ppi8255_1", ppi8255_intf_1 )
456456
457457    /* video hardware */
458458
r19030r19031
469469   MCFG_PALETTE_INIT_OVERRIDE(supercrd_state, supercrd)
470470   MCFG_VIDEO_START_OVERRIDE(supercrd_state, supercrd)
471471
472//   MCFG_MC6845_ADD("crtc", MC6845, MASTER_CLOCK/8, mc6845_intf)
472//  MCFG_MC6845_ADD("crtc", MC6845, MASTER_CLOCK/8, mc6845_intf)
473473
474474    /* sound hardware */
475475   MCFG_SPEAKER_STANDARD_MONO("mono")
476476
477//   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
477//  MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
478478MACHINE_CONFIG_END
479479
480480
r19030r19031
488488   ROM_LOAD( "supca_417_ce2.ic51", 0x10000, 0x08000, CRC(36415f73) SHA1(9881b88991f034d79260502289432a7318aa1647) )   // wrong
489489   ROM_IGNORE(                     0x8000)
490490
491//   ROM_LOAD( "supca_417_ce1.ic37", 0x0000, 0x8000, CRC(b67f7d38) SHA1(eaf8f24d476185d4744858afcbf0005362f49cab) )
492//   ROM_CONTINUE(                   0x0000, 0x8000)
493//   ROM_LOAD( "supca_417_ce2.ic51", 0x8000, 0x8000, CRC(36415f73) SHA1(9881b88991f034d79260502289432a7318aa1647) )
494//   ROM_IGNORE(                     0x8000)
491//  ROM_LOAD( "supca_417_ce1.ic37", 0x0000, 0x8000, CRC(b67f7d38) SHA1(eaf8f24d476185d4744858afcbf0005362f49cab) )
492//  ROM_CONTINUE(                   0x0000, 0x8000)
493//  ROM_LOAD( "supca_417_ce2.ic51", 0x8000, 0x8000, CRC(36415f73) SHA1(9881b88991f034d79260502289432a7318aa1647) )
494//  ROM_IGNORE(                     0x8000)
495495
496496   ROM_REGION( 0x20000, "gfxtemp", 0 )
497497   ROM_LOAD( "supca_410_zg2.ic11", 0x00000, 0x10000, CRC(a4646dc6) SHA1(638ad334bb4f1430381474ddfaa1029cb4d13916) )
trunk/src/mame/drivers/aerofgt.c
r19030r19031
16341634   MCFG_DEVICE_ADD("vsystem_spr_ol2", VSYSTEM_SPR2, 0)
16351635   MCFG_VSYSTEM_SPR2_SET_TILE_INDIRECT( aerofgt_state, aerofgt_ol2_tile_callback )
16361636   MCFG_VSYSTEM_SPR2_SET_GFXREGION(3)
1637   
1637
16381638   MCFG_VIDEO_START_OVERRIDE(aerofgt_state,turbofrc)
16391639
16401640   /* sound hardware */
trunk/src/version.c
r19030r19031
3838***************************************************************************/
3939
4040extern const char build_version[];
41const char build_version[] = "0.147u2 ("__DATE__")";
41const char build_version[] = "0.147u3 ("__DATE__")";
trunk/src/emu/sound/tms5110r.c
r19030r19031
383383   },
384384   /* Chirp table */
385385   /*
386   {   0,  42, -44, 50, -78, 18, 37, 20,
387       2, -31, -59,  2,  95, 90,  5, 15,
388      38, -4,  -91,-91, -42,-35,-36, -4,
389      37, 43,   34, 33,  15, -1, -8,-18,
390     -19,-17,   -9,-10,  -6,  0,  3,  2,
391       1,  0,    0,  0,   0,  0,  0,  0,
392       0,  0,    0,  0 },*/
386    {   0,  42, -44, 50, -78, 18, 37, 20,
387        2, -31, -59,  2,  95, 90,  5, 15,
388       38, -4,  -91,-91, -42,-35,-36, -4,
389       37, 43,   34, 33,  15, -1, -8,-18,
390      -19,-17,   -9,-10,  -6,  0,  3,  2,
391        1,  0,    0,  0,   0,  0,  0,  0,
392        0,  0,    0,  0 },*/
393393   {   0,127,127,  0,  0,  0,  0,  0,
394394       0,  0,  0,  0,  0,  0,  0,  0,
395395       0,  0,  0,  0,  0,  0,  0,  0,
r19030r19031
460460   },
461461   /* Chirp table */
462462   /*
463   {   0,  42, -44, 50, -78, 18, 37, 20,
464       2, -31, -59,  2,  95, 90,  5, 15,
465      38, -4,  -91,-91, -42,-35,-36, -4,
466      37, 43,   34, 33,  15, -1, -8,-18,
467     -19,-17,   -9,-10,  -6,  0,  3,  2,
468       1,  0,    0,  0,   0,  0,  0,  0,
469       0,  0,    0,  0 },*/
463    {   0,  42, -44, 50, -78, 18, 37, 20,
464        2, -31, -59,  2,  95, 90,  5, 15,
465       38, -4,  -91,-91, -42,-35,-36, -4,
466       37, 43,   34, 33,  15, -1, -8,-18,
467      -19,-17,   -9,-10,  -6,  0,  3,  2,
468        1,  0,    0,  0,   0,  0,  0,  0,
469        0,  0,    0,  0 },*/
470470   {   0,127,127,  0,  0,  0,  0,  0,
471471       0,  0,  0,  0,  0,  0,  0,  0,
472472       0,  0,  0,  0,  0,  0,  0,  0,
r19030r19031
541541   },
542542   /* Chirp table */
543543   /*
544   {   0,  42, -44, 50, -78, 18, 37, 20,
545       2, -31, -59,  2,  95, 90,  5, 15,
546      38, -4,  -91,-91, -42,-35,-36, -4,
547      37, 43,   34, 33,  15, -1, -8,-18,
548     -19,-17,   -9,-10,  -6,  0,  3,  2,
549       1,  0,    0,  0,   0,  0,  0,  0,
550       0,  0,    0,  0 },*/
544    {   0,  42, -44, 50, -78, 18, 37, 20,
545        2, -31, -59,  2,  95, 90,  5, 15,
546       38, -4,  -91,-91, -42,-35,-36, -4,
547       37, 43,   34, 33,  15, -1, -8,-18,
548      -19,-17,   -9,-10,  -6,  0,  3,  2,
549        1,  0,    0,  0,   0,  0,  0,  0,
550        0,  0,    0,  0 },*/
551551   {   0,127,127,  0,  0,  0,  0,  0,
552552       0,  0,  0,  0,  0,  0,  0,  0,
553553       0,  0,  0,  0,  0,  0,  0,  0,
trunk/src/emu/sound/tms5220.c
r19030r19031
418418   UINT8 RDB_flag;               /* whether we should read data register or status register */
419419
420420   /* io_ready: page 3 of the datasheet specifies that READY will be asserted until
421    * data is available or processed by the system.
422    */
421     * data is available or processed by the system.
422     */
423423   UINT8 io_ready;
424424
425425   /* flag for "true" timing involving rs/ws */
r19030r19031
431431   UINT8 write_latch;
432432
433433   /* The TMS52xx has two different ways of providing output data: the
434      analog speaker pin (which was usually used) and the Digital I/O pin.
435      The internal DAC used to feed the analog pin is only 8 bits, and has the
436      funny clipping/clamping logic, while the digital pin gives full 12? bit
437      resolution of the output data.
438      TODO: add a way to set/reset this other than the FORCE_DIGITAL define
439    */
434       analog speaker pin (which was usually used) and the Digital I/O pin.
435       The internal DAC used to feed the analog pin is only 8 bits, and has the
436       funny clipping/clamping logic, while the digital pin gives full 12? bit
437       resolution of the output data.
438       TODO: add a way to set/reset this other than the FORCE_DIGITAL define
439     */
440440   UINT8 digital_select;
441441   device_t *device;
442442
r19030r19031
554554
555555/**********************************************************************************************
556556
557     printbits helper function: takes a long int input and prints the resulting bits to stderr
557      printbits helper function: takes a long int input and prints the resulting bits to stderr
558558
559559***********************************************************************************************/
560560
r19030r19031
592592
593593/**********************************************************************************************
594594
595    tms5220_data_write -- handle a write to the TMS5220
595    tms5220_data_write -- handle a write to the TMS5220
596596
597597***********************************************************************************************/
598598
r19030r19031
652652
653653/**********************************************************************************************
654654
655    update_status_and_ints -- check to see if the various flags should be on or off
656    Description of flags, and their position in the status register:
657     From the data sheet:
658      bit D0(bit 7) = TS - Talk Status is active (high) when the VSP is processing speech data.
659            Talk Status goes active at the initiation of a Speak command or after nine
660            bytes of data are loaded into the FIFO following a Speak External command. It
661            goes inactive (low) when the stop code (Energy=1111) is processed, or
662            immediately by a buffer empty condition or a reset command.
663      bit D1(bit 6) = BL - Buffer Low is active (high) when the FIFO buffer is more than half empty.
664            Buffer Low is set when the "Last-In" byte is shifted down past the half-full
665            boundary of the stack. Buffer Low is cleared when data is loaded to the stack
666            so that the "Last-In" byte lies above the half-full boundary and becomes the
667            eighth data byte of the stack.
668      bit D2(bit 5) = BE - Buffer Empty is active (high) when the FIFO buffer has run out of data
669            while executing a Speak External command. Buffer Empty is set when the last bit
670            of the "Last-In" byte is shifted out to the Synthesis Section. This causes
671            Talk Status to be cleared. Speech is terminated at some abnormal point and the
672            Speak External command execution is terminated.
655     update_status_and_ints -- check to see if the various flags should be on or off
656     Description of flags, and their position in the status register:
657      From the data sheet:
658        bit D0(bit 7) = TS - Talk Status is active (high) when the VSP is processing speech data.
659                Talk Status goes active at the initiation of a Speak command or after nine
660                bytes of data are loaded into the FIFO following a Speak External command. It
661                goes inactive (low) when the stop code (Energy=1111) is processed, or
662                immediately by a buffer empty condition or a reset command.
663        bit D1(bit 6) = BL - Buffer Low is active (high) when the FIFO buffer is more than half empty.
664                Buffer Low is set when the "Last-In" byte is shifted down past the half-full
665                boundary of the stack. Buffer Low is cleared when data is loaded to the stack
666                so that the "Last-In" byte lies above the half-full boundary and becomes the
667                eighth data byte of the stack.
668        bit D2(bit 5) = BE - Buffer Empty is active (high) when the FIFO buffer has run out of data
669                while executing a Speak External command. Buffer Empty is set when the last bit
670                of the "Last-In" byte is shifted out to the Synthesis Section. This causes
671                Talk Status to be cleared. Speech is terminated at some abnormal point and the
672                Speak External command execution is terminated.
673673
674674***********************************************************************************************/
675675
r19030r19031
680680   update_ready_state(tms);
681681
682682   /* BL is set if neither byte 9 nor 8 of the fifo are in use; this
683   translates to having fifo_count (which ranges from 0 bytes in use to 16
684   bytes used) being less than or equal to 8. Victory/Victorba depends on this. */
683    translates to having fifo_count (which ranges from 0 bytes in use to 16
684    bytes used) being less than or equal to 8. Victory/Victorba depends on this. */
685685   if (tms->fifo_count <= 8)
686686   {
687687      // generate an interrupt if necessary; if /BL was inactive and is now active, set int.
r19030r19031
693693      tms->buffer_low = 0;
694694
695695   /* BE is set if neither byte 15 nor 14 of the fifo are in use; this
696   translates to having fifo_count equal to exactly 0 */
696    translates to having fifo_count equal to exactly 0 */
697697   if (tms->fifo_count == 0)
698698   {
699699      // generate an interrupt if necessary; if /BE was inactive and is now active, set int.
r19030r19031
705705      tms->buffer_empty = 0;
706706
707707   /* TS is talk status and is set elsewhere in the fifo parser and in
708   the SPEAK command handler; however, if /BE is true during speak external
709   mode, it is immediately unset here. */
708    the SPEAK command handler; however, if /BE is true during speak external
709    mode, it is immediately unset here. */
710710   if ((tms->speak_external == 1) && (tms->buffer_empty == 1))
711711   {
712712      // generate an interrupt: /TS was active, and is now inactive.
r19030r19031
717717      }
718718   }
719719   /* Note that TS being unset will also generate an interrupt when a STOP
720   frame is encountered; this is handled in the sample generator code and not here */
720    frame is encountered; this is handled in the sample generator code and not here */
721721}
722722
723723/**********************************************************************************************
724724
725    extract_bits -- extract a specific number of bits from the current input stream (FIFO or VSM)
725    extract_bits -- extract a specific number of bits from the current input stream (FIFO or VSM)
726726
727727***********************************************************************************************/
728728
r19030r19031
759759
760760/**********************************************************************************************
761761
762    tms5220_status_read -- read status or data from the TMS5220
762    tms5220_status_read -- read status or data from the TMS5220
763763
764764***********************************************************************************************/
765765
r19030r19031
801801
802802/**********************************************************************************************
803803
804    tms5220_cycles_to_ready -- returns the number of cycles until ready is asserted
805    NOTE: this function is deprecated and is known to be VERY inaccurate.
806    Use at your own peril!
804     tms5220_cycles_to_ready -- returns the number of cycles until ready is asserted
805     NOTE: this function is deprecated and is known to be VERY inaccurate.
806     Use at your own peril!
807807
808808***********************************************************************************************/
809809
r19030r19031
829829         val = (tms->fifo[tms->fifo_head] >> tms->fifo_bits_taken) & 0xf;
830830         if (val == 0)
831831            /* 0 -> silence frame: we will only read 4 bits, and we will
832             * therefore need to read another frame before the FIFO is not
833             * full any more */
832                 * therefore need to read another frame before the FIFO is not
833                 * full any more */
834834            answer += tms->subc_reload?200:304;
835835         /* 15 -> stop frame, we will only read 4 bits, but the FIFO will
836          * we cleared; otherwise, we need to parse the repeat flag (1 bit)
837          * and the pitch (6 bits), so everything will be OK. */
836             * we cleared; otherwise, we need to parse the repeat flag (1 bit)
837             * and the pitch (6 bits), so everything will be OK. */
838838      }
839839   }
840840
r19030r19031
844844
845845/**********************************************************************************************
846846
847    tms5220_int_read -- returns the interrupt state of the TMS5220
847    tms5220_int_read -- returns the interrupt state of the TMS5220
848848
849849***********************************************************************************************/
850850
r19030r19031
859859
860860/**********************************************************************************************
861861
862    tms5220_process -- fill the buffer with a specific number of samples
862    tms5220_process -- fill the buffer with a specific number of samples
863863
864864***********************************************************************************************/
865865
r19030r19031
875875      goto empty;
876876
877877   /* if speak external is set, but talk status is not (yet) set,
878   wait for buffer low to clear */
878    wait for buffer low to clear */
879879   if (!tms->talk_status && tms->speak_external && tms->buffer_low)
880880      goto empty;
881881
r19030r19031
883883   while ((size > 0) && tms->speaking_now)
884884   {
885885      /* if it is the appropriate time to update the old energy/pitch idxes,
886       * i.e. when IP=7, PC=12, T=17, subcycle=2, do so. Since IP=7 PC=12 T=17
887       * is JUST BEFORE the transition to IP=0 PC=0 T=0 sybcycle=(0 or 1),
888       * which happens 4 T-cycles later), we change on the latter.*/
886         * i.e. when IP=7, PC=12, T=17, subcycle=2, do so. Since IP=7 PC=12 T=17
887         * is JUST BEFORE the transition to IP=0 PC=0 T=0 sybcycle=(0 or 1),
888         * which happens 4 T-cycles later), we change on the latter.*/
889889      if ((tms->interp_period == 0) && (tms->PC == 0) && (tms->subcycle < 2))
890890      {
891891         tms->OLDE = (tms->new_frame_energy_idx == 0);
r19030r19031
893893      }
894894
895895      /* if we're ready for a new frame to be applied, i.e. when IP=0, PC=12, Sub=1
896       * (In reality, the frame was really loaded incrementally during the entire IP=0
897       * PC=x time period, but it doesn't affect anything until IP=0 PC=12 happens)
898       */
896         * (In reality, the frame was really loaded incrementally during the entire IP=0
897         * PC=x time period, but it doesn't affect anything until IP=0 PC=12 happens)
898         */
899899      if ((tms->interp_period == 0) && (tms->PC == 12) && (tms->subcycle == 1))
900900      {
901901         // HACK for regression testing, be sure to comment out before release!
r19030r19031
939939            }
940940
941941         /* in all cases where interpolation would be inhibited, set the inhibit flag; otherwise clear it.
942            Interpolation inhibit cases:
943          * Old frame was voiced, new is unvoiced
944          * Old frame was silence/zero energy, new has nonzero energy
945          * Old frame was unvoiced, new is voiced
946          */
942               Interpolation inhibit cases:
943             * Old frame was voiced, new is unvoiced
944             * Old frame was silence/zero energy, new has nonzero energy
945             * Old frame was unvoiced, new is voiced
946             */
947947         if ( ((OLD_FRAME_UNVOICED_FLAG == 0) && (NEW_FRAME_UNVOICED_FLAG == 1))
948948            || ((OLD_FRAME_UNVOICED_FLAG == 1) && (NEW_FRAME_UNVOICED_FLAG == 0))
949949            || ((OLD_FRAME_SILENCE_FLAG == 1) && (NEW_FRAME_SILENCE_FLAG == 0)) )
r19030r19031
10561056      {
10571057         // generate voiced samples here
10581058         /* US patent 4331836 Figure 14B shows, and logic would hold, that a pitch based chirp
1059          * function has a chirp/peak and then a long chain of zeroes.
1060          * The last entry of the chirp rom is at address 0b110011 (51d), the 52nd sample,
1061          * and if the address reaches that point the ADDRESS incrementer is
1062          * disabled, forcing all samples beyond 51d to be == 51d
1063          * (address 51d holds zeroes, which may or may not be inverted to -1)
1064          */
1059             * function has a chirp/peak and then a long chain of zeroes.
1060             * The last entry of the chirp rom is at address 0b110011 (51d), the 52nd sample,
1061             * and if the address reaches that point the ADDRESS incrementer is
1062             * disabled, forcing all samples beyond 51d to be == 51d
1063             * (address 51d holds zeroes, which may or may not be inverted to -1)
1064             */
10651065         if (tms->pitch_count >= 51)
10661066            tms->excitation_data = tms->coeff->chirptable[51];
10671067         else /*tms->pitch_count < 51*/
r19030r19031
11241124         tms->PC++;
11251125      }
11261126      /* Circuit 412 in the patent ensures that when INHIBIT is true,
1127       * during the period from IP=7 PC=12 T12, to IP=0 PC=12 T12, the pitch
1128       * count is forced to 0; since the initial stop happens right before
1129       * the switch to IP=0 PC=0 and this code is located after the switch would
1130       * happen, we check for ip=0 inhibit=1, which covers that whole range.
1131       * The purpose of Circuit 412 is to prevent a spurious click caused by
1132       * the voiced source being fed to the filter before all the values have
1133       * been updated during ip=0 when interpolation was inhibited.
1134       */
1127         * during the period from IP=7 PC=12 T12, to IP=0 PC=12 T12, the pitch
1128         * count is forced to 0; since the initial stop happens right before
1129         * the switch to IP=0 PC=0 and this code is located after the switch would
1130         * happen, we check for ip=0 inhibit=1, which covers that whole range.
1131         * The purpose of Circuit 412 is to prevent a spurious click caused by
1132         * the voiced source being fed to the filter before all the values have
1133         * been updated during ip=0 when interpolation was inhibited.
1134         */
11351135      tms->pitch_count++;
11361136      if (tms->pitch_count >= tms->current_pitch) tms->pitch_count = 0;
11371137      if ((tms->interp_period == 0)&&(tms->inhibit==1)) tms->pitch_count = 0;
r19030r19031
11651165
11661166/**********************************************************************************************
11671167
1168    clip_analog -- clips the 14 bit return value from the lattice filter to its final 10 bit value (-512 to 511), and upshifts/range extends this to 16 bits
1168    clip_analog -- clips the 14 bit return value from the lattice filter to its final 10 bit value (-512 to 511), and upshifts/range extends this to 16 bits
11691169
11701170***********************************************************************************************/
11711171
11721172static INT16 clip_analog(INT16 cliptemp)
11731173{
11741174   /* clipping, just like the patent shows:
1175    * the top 10 bits of this result are visible on the digital output IO pin.
1176    * next, if the top 3 bits of the 14 bit result are all the same, the lowest of those 3 bits plus the next 7 bits are the signed analog output, otherwise the low bits are all forced to match the inverse of the topmost bit, i.e.:
1177    * 1x xxxx xxxx xxxx -> 0b10000000
1178    * 11 1bcd efgh xxxx -> 0b1bcdefgh
1179    * 00 0bcd efgh xxxx -> 0b0bcdefgh
1180    * 0x xxxx xxxx xxxx -> 0b01111111
1181    */
1175     * the top 10 bits of this result are visible on the digital output IO pin.
1176     * next, if the top 3 bits of the 14 bit result are all the same, the lowest of those 3 bits plus the next 7 bits are the signed analog output, otherwise the low bits are all forced to match the inverse of the topmost bit, i.e.:
1177     * 1x xxxx xxxx xxxx -> 0b10000000
1178     * 11 1bcd efgh xxxx -> 0b1bcdefgh
1179     * 00 0bcd efgh xxxx -> 0b0bcdefgh
1180     * 0x xxxx xxxx xxxx -> 0b01111111
1181     */
11821182#ifdef DEBUG_CLIP
11831183   if ((cliptemp > 2047) || (cliptemp < -2048)) fprintf(stderr,"clipping cliptemp to range; was %d\n", cliptemp);
11841184#endif
r19030r19031
12031203
12041204/**********************************************************************************************
12051205
1206    matrix_multiply -- does the proper multiply and shift
1207    a is the k coefficient and is clamped to 10 bits (9 bits plus a sign)
1208    b is the running result and is clamped to 14 bits.
1209    output is 14 bits, but note the result LSB bit is always 1.
1210    Because the low 4 bits of the result are trimmed off before
1211    output, this makes almost no difference in the computation.
1206     matrix_multiply -- does the proper multiply and shift
1207     a is the k coefficient and is clamped to 10 bits (9 bits plus a sign)
1208     b is the running result and is clamped to 14 bits.
1209     output is 14 bits, but note the result LSB bit is always 1.
1210     Because the low 4 bits of the result are trimmed off before
1211     output, this makes almost no difference in the computation.
12121212
12131213**********************************************************************************************/
12141214static INT32 matrix_multiply(INT32 a, INT32 b)
r19030r19031
12281228
12291229/**********************************************************************************************
12301230
1231    lattice_filter -- executes one 'full run' of the lattice filter on a specific byte of
1232    excitation data, and specific values of all the current k constants,  and returns the
1233    resulting sample.
1231     lattice_filter -- executes one 'full run' of the lattice filter on a specific byte of
1232     excitation data, and specific values of all the current k constants,  and returns the
1233     resulting sample.
12341234
12351235***********************************************************************************************/
12361236
r19030r19031
12391239   // Lattice filter here
12401240   // Aug/05/07: redone as unrolled loop, for clarity - LN
12411241   /* Originally Copied verbatim from table I in US patent 4,209,804, now updated to be in same order as the actual chip does it, not that it matters.
1242     notation equivalencies from table:
1243     Yn(i) == tms->u[n-1]
1244     Kn = tms->current_k[n-1]
1245     bn = tms->x[n-1]
1246    */
1242      notation equivalencies from table:
1243      Yn(i) == tms->u[n-1]
1244      Kn = tms->current_k[n-1]
1245      bn = tms->x[n-1]
1246     */
12471247      tms->u[10] = matrix_multiply(tms->previous_energy, (tms->excitation_data<<6));  //Y(11)
12481248      tms->u[9] = tms->u[10] - matrix_multiply(tms->current_k[9], tms->x[9]);
12491249      tms->u[8] = tms->u[9] - matrix_multiply(tms->current_k[8], tms->x[8]);
r19030r19031
12821282
12831283/**********************************************************************************************
12841284
1285    process_command -- extract a byte from the FIFO and interpret it as a command
1285    process_command -- extract a byte from the FIFO and interpret it as a command
12861286
12871287***********************************************************************************************/
12881288
r19030r19031
13321332         if (tms->talk_status == 0) /* TALKST must be clear for LA */
13331333         {
13341334            /* tms5220 data sheet says that if we load only one 4-bit nibble, it won't work.
1335               This code does not care about this. */
1335                   This code does not care about this. */
13361336            if (tms->intf->load_address)
13371337               (*tms->intf->load_address)(tms->device, cmd & 0x0f);
13381338            tms->schedule_dummy_read = TRUE;
r19030r19031
14031403   // We actually don't care how many bits are left in the fifo here; the frame subpart will be processed normally, and any bits extracted 'past the end' of the fifo will be read as zeroes; the fifo being emptied will set the /BE latch which will halt speech exactly as if a stop frame had been encountered (instead of whatever partial frame was read); the same exact circuitry is used for both on the real chip, see us patent 4335277 sheet 16, gates 232a (decode stop frame) and 232b (decode /BE plus DDIS (decode disable) which is active during speak external).
14041404
14051405   /* if the chip is a tms5220C, and the rate mode is set to that each frame (0x04 bit set)
1406   has a 2 bit rate preceding it, grab two bits here and store them as the rate; */
1406    has a 2 bit rate preceding it, grab two bits here and store them as the rate; */
14071407   if ((tms->variant == SUBTYPE_TMS5220C) && (tms->tms5220c_rate & 0x04))
14081408   {
14091409      indx = extract_bits(tms, 2);
r19030r19031
21772177
21782178   // initialize the chip state
21792179   /* Note that we do not actually clear IRQ on start-up: IRQ is even raised
2180    * if m_buffer_empty or m_buffer_low are 0 */
2180    * if m_buffer_empty or m_buffer_low are 0 */
21812181   m_speaking_now = false;
21822182   m_speak_external = false;
21832183   m_talk_status = false;
r19030r19031
23142314   while ((size > 0) && m_speaking_now)
23152315   {
23162316      /* if it is the appropriate time to update the old energy/pitch idxes,
2317       * i.e. when IP=7, PC=12, T=17, subcycle=2, do so. Since IP=7 PC=12 T=17
2318       * is JUST BEFORE the transition to IP=0 PC=0 T=0 sybcycle=(0 or 1),
2319       * which happens 4 T-cycles later), we change on the latter.
2320       */
2317         * i.e. when IP=7, PC=12, T=17, subcycle=2, do so. Since IP=7 PC=12 T=17
2318         * is JUST BEFORE the transition to IP=0 PC=0 T=0 sybcycle=(0 or 1),
2319         * which happens 4 T-cycles later), we change on the latter.
2320         */
23212321      if ((m_interp_period == 0) && (m_PC == 0) && (m_subcycle < 2))
23222322      {
23232323         m_OLDE = (m_new_frame_energy_idx == 0);
r19030r19031
23252325      }
23262326
23272327      /* if we're ready for a new frame to be applied, i.e. when IP=0, PC=12, Sub=1
2328       * (In reality, the frame was really loaded incrementally during the
2329       * entire IP=0 PC=x time period, but it doesn't affect anything until IP=0 PC=12 happens)
2330       */
2328         * (In reality, the frame was really loaded incrementally during the
2329         * entire IP=0 PC=x time period, but it doesn't affect anything until IP=0 PC=12 happens)
2330         */
23312331      if ((m_interp_period == 0) && (m_PC == 12) && (m_subcycle == 1))
23322332      {
23332333         // HACK for regression testing, be sure to comment out before release!
r19030r19031
25732573         m_PC++;
25742574      }
25752575      /* Circuit 412 in the patent ensures that when INHIBIT is true,
2576       * during the period from IP=7 PC=12 T12, to IP=0 PC=12 T12, the pitch
2577       * count is forced to 0; since the initial stop happens right before
2578       * the switch to IP=0 PC=0 and this code is located after the switch would
2579       * happen, we check for ip=0 inhibit=1, which covers that whole range.
2580       * The purpose of Circuit 412 is to prevent a spurious click caused by
2581       * the voiced source being fed to the filter before all the values have
2582       * been updated during ip=0 when interpolation was inhibited.
2583       */
2576         * during the period from IP=7 PC=12 T12, to IP=0 PC=12 T12, the pitch
2577         * count is forced to 0; since the initial stop happens right before
2578         * the switch to IP=0 PC=0 and this code is located after the switch would
2579         * happen, we check for ip=0 inhibit=1, which covers that whole range.
2580         * The purpose of Circuit 412 is to prevent a spurious click caused by
2581         * the voiced source being fed to the filter before all the values have
2582         * been updated during ip=0 when interpolation was inhibited.
2583         */
25842584      m_pitch_count++;
25852585      if (m_pitch_count >= m_current_pitch) m_pitch_count = 0;
25862586      if ((m_interp_period == 0) && m_inhibit) m_pitch_count = 0;
r19030r19031
26222622{
26232623   /* Lattice filter here */
26242624   /* Aug/05/07: redone as unrolled loop, for clarity - LN
2625    * Originally Copied verbatim from table I in US patent 4,209,804, now updated
2626    * to be in same order as the actual chip does it, not that it matters.
2627    * notation equivalencies from table:
2628    *      Yn(i) == m_u[n-1]
2629    *      Kn = m_current_k[n-1]
2630    *      bn = m_x[n-1]
2631    */
2625     * Originally Copied verbatim from table I in US patent 4,209,804, now updated
2626     * to be in same order as the actual chip does it, not that it matters.
2627     * notation equivalencies from table:
2628     *      Yn(i) == m_u[n-1]
2629     *      Kn = m_current_k[n-1]
2630     *      bn = m_x[n-1]
2631     */
26322632
26332633   m_u[10] = matrix_multiply(m_previous_energy, (m_excitation_data<<6));  //Y(11)
26342634   m_u[9] = m_u[10] - matrix_multiply(m_current_k[9], m_x[9]);
r19030r19031
26942694            logerror("tms52xx: data_write triggered talk status to go active!\n");
26952695#endif
26962696            /* ...then we now have enough bytes to start talking; clear out
2697             * the new frame parameters (it will become old frame just before the first call to parse_frame())
2698             * TODO: the 3 lines below (and others) are needed for victory
2699             * to not fail its selftest due to a sample ending too late, may require additional investigation */
2697                 * the new frame parameters (it will become old frame just before the first call to parse_frame())
2698                 * TODO: the 3 lines below (and others) are needed for victory
2699                 * to not fail its selftest due to a sample ending too late, may require additional investigation */
27002700            m_subcycle = m_subc_reload;
27012701            m_PC = 0;
27022702            m_interp_period = reload_table[m_tms5220c_rate & 0x3]; // is this correct? should this be always 7 instead, so that the new frame is loaded quickly?
r19030r19031
28422842   int indx, i, rep_flag;
28432843
28442844   /* We actually don't care how many bits are left in the fifo here; the
2845    * frame subpart will be processed normally, and any bits extracted 'past
2846    * the end' of the fifo will be read as zeroes; the fifo being emptied will
2847    * set the /BE latch which will halt speech exactly as if a stop frame had
2848    * been encountered (instead of whatever partial frame was read); the same
2849    * exact circuitry is used for both on the real chip, see us patent 4335277
2850    * sheet 16, gates 232a (decode stop frame) and 232b (decode /BE plus DDIS
2851    * (decode disable) which is active during speak external). */
2845     * frame subpart will be processed normally, and any bits extracted 'past
2846     * the end' of the fifo will be read as zeroes; the fifo being emptied will
2847     * set the /BE latch which will halt speech exactly as if a stop frame had
2848     * been encountered (instead of whatever partial frame was read); the same
2849     * exact circuitry is used for both on the real chip, see us patent 4335277
2850     * sheet 16, gates 232a (decode stop frame) and 232b (decode /BE plus DDIS
2851     * (decode disable) which is active during speak external). */
28522852
28532853   /* if the chip is a tms5220C, and the rate mode is set to that each frame (0x04 bit set)
2854    * has a 2 bit rate preceding it, grab two bits here and store them as the rate; */
2854    * has a 2 bit rate preceding it, grab two bits here and store them as the rate; */
28552855   if ((m_variant == SUBTYPE_TMS5220C) && (m_tms5220c_rate & 0x04))
28562856   {
28572857      indx = extract_bits(2);
r19030r19031
28952895   update_status_and_ints();
28962896   if (!m_talk_status) goto ranout;
28972897   /* if this is a repeat frame, just do nothing, it will reuse the
2898    * old coefficients */
2898    * old coefficients */
28992899   if (rep_flag) return;
29002900
29012901   // extract first 4 K coefficients
r19030r19031
29722972   update_ready_state();
29732973
29742974   /* BL is set if neither byte 9 nor 8 of the fifo are in use; this
2975    * translates to having fifo_count (which ranges from 0 bytes in use to 16
2976    * bytes used) being less than or equal to 8. Victory/Victorba depends on this. */
2975     * translates to having fifo_count (which ranges from 0 bytes in use to 16
2976     * bytes used) being less than or equal to 8. Victory/Victorba depends on this. */
29772977   if (m_fifo_count <= 8)
29782978   {
29792979      // generate an interrupt if necessary; if /BL was inactive and is now active, set int.
r19030r19031
29842984      m_buffer_low = false;
29852985
29862986   /* BE is set if neither byte 15 nor 14 of the fifo are in use; this
2987    * translates to having fifo_count equal to exactly 0 */
2987    * translates to having fifo_count equal to exactly 0 */
29882988   if (m_fifo_count == 0)
29892989   {
29902990      // generate an interrupt if necessary; if /BE was inactive and is now active, set int.
r19030r19031
29952995      m_buffer_empty = false;
29962996
29972997   /* TS is talk status and is set elsewhere in the fifo parser and in
2998    * the SPEAK command handler; however, if /BE is true during speak external
2999    * mode, it is immediately unset here. */
2998     * the SPEAK command handler; however, if /BE is true during speak external
2999     * mode, it is immediately unset here. */
30003000   if (m_speak_external && m_buffer_empty)
30013001   {
30023002      // generate an interrupt: /TS was active, and is now inactive.
r19030r19031
30073007      }
30083008   }
30093009   /* Note that TS being unset will also generate an interrupt when a STOP
3010    * frame is encountered; this is handled in the sample generator code and not here */
3010    * frame is encountered; this is handled in the sample generator code and not here */
30113011}
30123012
30133013/******************************************************************************
r19030r19031
32143214         logerror("tms52xx: Scheduling ready cycle for /RS...\n");
32153215#endif
32163216         /* upon /RS being activated, /READY goes inactive after 100 nsec from
3217          * data sheet, through 3 asynchronous gates on patent. This is effectively
3218          * within one clock, so we immediately set io_ready to 0 and activate the callback. */
3217             * data sheet, through 3 asynchronous gates on patent. This is effectively
3218             * within one clock, so we immediately set io_ready to 0 and activate the callback. */
32193219         m_io_ready = 0;
32203220         update_ready_state();
32213221         /* How long does /READY stay inactive, when /RS is pulled low?
3222          * I believe its almost always ~16 clocks (25 usec at 800khz as shown on the datasheet) */
3222            * I believe its almost always ~16 clocks (25 usec at 800khz as shown on the datasheet) */
32233223         m_ready_timer->adjust(attotime::from_hz(clock()/16));
32243224      }
32253225   }
r19030r19031
32703270         logerror("tms52xx: Scheduling ready cycle for /WS...\n");
32713271#endif
32723272         /* upon /WS being activated, /READY goes inactive after 100 nsec
3273          * from data sheet, through 3 asynchronous gates on patent.
3274          * This is effectively within one clock, so we immediately set
3275          * io_ready to 0 and activate the callback. */
3273             * from data sheet, through 3 asynchronous gates on patent.
3274             * This is effectively within one clock, so we immediately set
3275             * io_ready to 0 and activate the callback. */
32763276         m_io_ready = 0;
32773277         update_ready_state();
32783278         /* Now comes the complicated part: long does /READY stay inactive
3279          * when /WS is pulled low? This depends ENTIRELY on the command written,
3280          * or whether the chip is in speak external mode or not...
3281          * Speak external mode: ~16 cycles
3282          * Command Mode:
3283          * SPK: ? cycles
3284          * SPKEXT: ? cycles
3285          * RDBY: between 60 and 140 cycles
3286          * RB: ? cycles (80?)
3287          * RST: between 60 and 140 cycles
3288          * SET RATE (5220C only): ? cycles (probably ~16) */
3279             * when /WS is pulled low? This depends ENTIRELY on the command written,
3280             * or whether the chip is in speak external mode or not...
3281             * Speak external mode: ~16 cycles
3282             * Command Mode:
3283             * SPK: ? cycles
3284             * SPKEXT: ? cycles
3285             * RDBY: between 60 and 140 cycles
3286             * RB: ? cycles (80?)
3287             * RST: between 60 and 140 cycles
3288             * SET RATE (5220C only): ? cycles (probably ~16) */
32893289
32903290         // TODO: actually HANDLE the timing differences! currently just assuming always 16 cycles
32913291         m_ready_timer->adjust(attotime::from_hz(clock()/16));
trunk/src/emu/machine/scsicd.c
r19030r19031
272272         SetPhase( SCSI_PHASE_STATUS );
273273         *transferLength = 0;
274274         break;
275         
276       case 0x4e: // STOP
275
276      case 0x4e: // STOP
277277         if (cdrom)
278278         {
279279            cdda = cdda_from_cdrom(machine(), cdrom);
trunk/src/emu/cpu/m6502/m4510.c
r19030r19031
5757
5858void m4510_device::device_start()
5959{
60    if(direct_disabled)
60   if(direct_disabled)
6161      mintf = new mi_4510_nd(this);
6262   else
6363      mintf = new mi_4510_normal(this);
trunk/src/emu/cpu/m6502/m6502make.c
r19030r19031
211211         opc = string(opcode.begin(), k);
212212         fullopc = string(opcode.begin(), ke-1);
213213         mode = string(ke, opcode.end());
214         
214
215215         bool step_over = opc == "jsr" || opc == "bsr";
216216         bool step_out = opc == "rts" || opc == "rti" || opc == "rtn";
217217         fprintf(f, "\t{ \"%s\", DASM_%s, %s },\n",
trunk/src/emu/cpu/m6502/m6510.c
r19030r19031
7676   read_port.resolve_safe(0);
7777   write_port.resolve_safe();
7878
79    if(direct_disabled)
79   if(direct_disabled)
8080      mintf = new mi_6510_nd(this);
8181   else
8282      mintf = new mi_6510_normal(this);
trunk/src/emu/cpu/m6502/om65c02.lst
r19030r19031
533533   if(A & TMP2)
534534      P &= ~F_Z;
535535   else
536      P |= F_Z;   
536      P |= F_Z;
537537   TMP2 &= ~A;
538538   write(TMP, TMP2);
539539   prefetch();
r19030r19031
545545   if(A & TMP2)
546546      P &= ~F_Z;
547547   else
548      P |= F_Z;   
548      P |= F_Z;
549549   TMP2 &= ~A;
550550   write(TMP, TMP2);
551551   prefetch();
r19030r19031
558558   if(A & TMP2)
559559      P &= ~F_Z;
560560   else
561      P |= F_Z;   
561      P |= F_Z;
562562   TMP2 |= A;
563563   write(TMP, TMP2);
564564   prefetch();
r19030r19031
570570   if(A & TMP2)
571571      P &= ~F_Z;
572572   else
573      P |= F_Z;   
573      P |= F_Z;
574574   TMP2 |= A;
575575   write(TMP, TMP2);
576576   prefetch();
trunk/src/emu/cpu/m6502/om65ce02.lst
r19030r19031
14591459   if(A & TMP2)
14601460      P &= ~F_Z;
14611461   else
1462      P |= F_Z;   
1462      P |= F_Z;
14631463   TMP2 &= ~A;
14641464   write(TMP, TMP2);
14651465   prefetch();
r19030r19031
14701470   if(A & TMP2)
14711471      P &= ~F_Z;
14721472   else
1473      P |= F_Z;   
1473      P |= F_Z;
14741474   TMP2 &= ~A;
14751475   write(TMP, TMP2);
14761476   prefetch();
r19030r19031
14821482   if(A & TMP2)
14831483      P &= ~F_Z;
14841484   else
1485      P |= F_Z;   
1485      P |= F_Z;
14861486   TMP2 |= A;
14871487   write(TMP, TMP2);
14881488   prefetch();
r19030r19031
14931493   if(A & TMP2)
14941494      P &= ~F_Z;
14951495   else
1496      P |= F_Z;   
1496      P |= F_Z;
14971497   TMP2 |= A;
14981498   write(TMP, TMP2);
14991499   prefetch();
trunk/src/emu/cpu/m6502/om6502.lst
r19030r19031
19621962   read(0xfffe);
19631963   for(;;) {
19641964      read(0xffff);
1965   }   
1965   }
trunk/src/emu/cpu/z8000/z8000ops.c
r19030r19031
58295829}
58305830
58315831/******************************************
5832 trtib    @rd,@rs,rr
5833 flags:    -ZSV--
5832 trtib   @rd,@rs,rr
5833 flags:  -ZSV--
58345834 ******************************************/
58355835static void ZB8_ddN0_0010_0000_rrrr_ssN0_0000(z8000_state *cpustate)
58365836{
r19030r19031
58455845}
58465846
58475847/******************************************
5848 trtirb    @rd,@rs,rbr
5849 flags:    -ZSV--
5848 trtirb  @rd,@rs,rbr
5849 flags:  -ZSV--
58505850 ******************************************/
58515851static void ZB8_ddN0_0110_0000_rrrr_ssN0_1110(z8000_state *cpustate)
58525852{
r19030r19031
58665866}
58675867
58685868/******************************************
5869 trtdb    @rd,@rs,rbr
5870 flags:    -ZSV--
5869 trtdb   @rd,@rs,rbr
5870 flags:  -ZSV--
58715871 ******************************************/
58725872static void ZB8_ddN0_1010_0000_rrrr_ssN0_0000(z8000_state *cpustate)
58735873{
r19030r19031
58825882}
58835883
58845884/******************************************
5885 trtdrb    @rd,@rs,rbr
5886 flags:    -ZSV--
5885 trtdrb  @rd,@rs,rbr
5886 flags:  -ZSV--
58875887 ******************************************/
58885888static void ZB8_ddN0_1110_0000_rrrr_ssN0_1110(z8000_state *cpustate)
58895889{
r19030r19031
59035903}
59045904
59055905/******************************************
5906 trib    @rd,@rs,rbr
5907 flags:    -ZSV--
5906 trib    @rd,@rs,rbr
5907 flags:  -ZSV--
59085908 ******************************************/
59095909static void ZB8_ddN0_0000_0000_rrrr_ssN0_0000(z8000_state *cpustate)
59105910{
r19030r19031
59195919}
59205920
59215921/******************************************
5922 trirb    @rd,@rs,rbr
5923 flags:    -ZSV--
5922 trirb   @rd,@rs,rbr
5923 flags:  -ZSV--
59245924 ******************************************/
59255925static void ZB8_ddN0_0100_0000_rrrr_ssN0_0000(z8000_state *cpustate)
59265926{
r19030r19031
59355935}
59365936
59375937/******************************************
5938 trdb    @rd,@rs,rbr
5939 flags:    -ZSV--
5938 trdb    @rd,@rs,rbr
5939 flags:  -ZSV--
59405940 ******************************************/
59415941static void ZB8_ddN0_1000_0000_rrrr_ssN0_0000(z8000_state *cpustate)
59425942{
r19030r19031
59515951}
59525952
59535953/******************************************
5954 trdrb    @rd,@rs,rbr
5955 flags:    -ZSV--
5954 trdrb   @rd,@rs,rbr
5955 flags:  -ZSV--
59565956 ******************************************/
59575957static void ZB8_ddN0_1100_0000_rrrr_ssN0_0000(z8000_state *cpustate)
59585958{
trunk/src/emu/cpu/avr8/avr8.c
r19030r19031
99      the existing opcodes has been shown to wildly corrupt the video output in Craft, so one can assume that the
1010      existing timing is 100% correct.
1111
12     Unimplemented opcodes: CPSR, LD Z+, ST -Z/-Y/-X, ELPM, SPM, SPM Z+, EIJMP, SLEEP, BREAK, WDR, ICALL, EICALL,
13                            JMP, CALL
12      Unimplemented opcodes: CPSR, LD Z+, ST -Z/-Y/-X, ELPM, SPM, SPM Z+, EIJMP, SLEEP, BREAK, WDR, ICALL, EICALL,
13                             JMP, CALL
1414
15   - Changelist -
16     30 Oct. 2012
17     - Added FMUL, FMULS, FMULSU opcodes [MooglyGuy]
18     - Fixed incorrect flag calculation in ROR opcode [MooglyGuy]
19     - Fixed incorrect bit testing in SBIC/SBIS opcodes [MooglyGuy]
15    - Changelist -
16      30 Oct. 2012
17      - Added FMUL, FMULS, FMULSU opcodes [MooglyGuy]
18      - Fixed incorrect flag calculation in ROR opcode [MooglyGuy]
19      - Fixed incorrect bit testing in SBIC/SBIS opcodes [MooglyGuy]
2020
21     25 Oct. 2012
22     - Added MULS, ANDI, STI Z+, LD -Z, LD -Y, LD -X, LD Y+q, LD Z+q, SWAP, ASR, ROR and SBIS opcodes [MooglyGuy]
23     - Corrected cycle counts for LD and ST opcodes [MooglyGuy]
24     - Moved opcycles init into inner while loop, fixes 2-cycle and 3-cycle opcodes effectively forcing
25       all subsequent 1-cycle opcodes to be 2 or 3 cycles [MooglyGuy]
26     - Fixed register behavior in MULSU, LD -Z, and LD -Y opcodes [MooglyGuy]
21      25 Oct. 2012
22      - Added MULS, ANDI, STI Z+, LD -Z, LD -Y, LD -X, LD Y+q, LD Z+q, SWAP, ASR, ROR and SBIS opcodes [MooglyGuy]
23      - Corrected cycle counts for LD and ST opcodes [MooglyGuy]
24      - Moved opcycles init into inner while loop, fixes 2-cycle and 3-cycle opcodes effectively forcing
25        all subsequent 1-cycle opcodes to be 2 or 3 cycles [MooglyGuy]
26      - Fixed register behavior in MULSU, LD -Z, and LD -Y opcodes [MooglyGuy]
2727
28     18 Oct. 2012
29     - Added OR, SBCI, ORI, ST Y+, ADIQ opcodes [MooglyGuy]
30     - Fixed COM, NEG, LSR opcodes [MooglyGuy]
28      18 Oct. 2012
29      - Added OR, SBCI, ORI, ST Y+, ADIQ opcodes [MooglyGuy]
30      - Fixed COM, NEG, LSR opcodes [MooglyGuy]
3131
3232*/
3333
r19030r19031
783783    //UINT8 compare_mode[2] = { (m_r[AVR8_REGIDX_TCCR0A] & AVR8_TCCR0A_COM0A_MASK) >> AVR8_TCCR0A_COM0A_SHIFT,
784784                              //(m_r[AVR8_REGIDX_TCCR0A] & AVR8_TCCR0A_COM0B_MASK) >> AVR8_TCCR0A_COM0B_SHIFT };
785785    UINT8 ocr0[2] = { m_r[AVR8_REGIDX_OCR0A], m_r[AVR8_REGIDX_OCR0B] };
786   UINT8 ocf0[2] = { (1 << AVR8_TIFR0_OCF0A_SHIFT), (1 << AVR8_TIFR0_OCF0B_SHIFT) };
786    UINT8 ocf0[2] = { (1 << AVR8_TIFR0_OCF0A_SHIFT), (1 << AVR8_TIFR0_OCF0B_SHIFT) };
787787    INT32 increment = m_timer0_increment;
788788
789789    for(INT32 reg = AVR8_REG_A; reg <= AVR8_REG_B; reg++)
r19030r19031
854854
855855    m_r[AVR8_REGIDX_TCNT0] = count + increment;
856856
857   update_interrupt(AVR8_INTIDX_OCF0A);
858   update_interrupt(AVR8_INTIDX_OCF0B);
859   update_interrupt(AVR8_INTIDX_TOV0);
857    update_interrupt(AVR8_INTIDX_OCF0A);
858    update_interrupt(AVR8_INTIDX_OCF0B);
859    update_interrupt(AVR8_INTIDX_TOV0);
860860        */
861861}
862862
r19030r19031
10541054                break;
10551055
10561056            default:
1057                  verboselog(m_pc, 0, "update_timer1_compare_mode: Unknown waveform generation mode: %02x\n", wgm1);
1057               verboselog(m_pc, 0, "update_timer1_compare_mode: Unknown waveform generation mode: %02x\n", wgm1);
10581058                break;
10591059        }
10601060        /*
trunk/src/emu/cpu/avr8/avr8.h
r19030r19031
99      the existing opcodes has been shown to wildly corrupt the video output in Craft, so one can assume that the
1010      existing timing is 100% correct.
1111
12     Unimplemented opcodes: CPSR, LD Z+, ST Z+, ST -Z/-Y/-X, ELPM, SPM, SPM Z+, EIJMP, SLEEP, BREAK, WDR, ICALL,
13                            EICALL, JMP, CALL, SBIW
12      Unimplemented opcodes: CPSR, LD Z+, ST Z+, ST -Z/-Y/-X, ELPM, SPM, SPM Z+, EIJMP, SLEEP, BREAK, WDR, ICALL,
13                             EICALL, JMP, CALL, SBIW
1414
15   - Changelist -
16     30 Oct. 2012
17     - Added FMUL, FMULS, FMULSU opcodes [MooglyGuy]
18     - Fixed incorrect flag calculation in ROR opcode [MooglyGuy]
19     - Fixed incorrect bit testing in SBIC/SBIS opcodes [MooglyGuy]
15    - Changelist -
16      30 Oct. 2012
17      - Added FMUL, FMULS, FMULSU opcodes [MooglyGuy]
18      - Fixed incorrect flag calculation in ROR opcode [MooglyGuy]
19      - Fixed incorrect bit testing in SBIC/SBIS opcodes [MooglyGuy]
2020
21     25 Oct. 2012
22     - Added MULS, ANDI, STI Z+, LD -Z, LD -Y, LD -X, LD Y+q, LD Z+q, SWAP, ASR, ROR and SBIS opcodes [MooglyGuy]
23     - Corrected cycle counts for LD and ST opcodes [MooglyGuy]
24     - Moved opcycles init into inner while loop, fixes 2-cycle and 3-cycle opcodes effectively forcing
25       all subsequent 1-cycle opcodes to be 2 or 3 cycles [MooglyGuy]
26     - Fixed register behavior in MULSU, LD -Z, and LD -Y opcodes [MooglyGuy]
21      25 Oct. 2012
22      - Added MULS, ANDI, STI Z+, LD -Z, LD -Y, LD -X, LD Y+q, LD Z+q, SWAP, ASR, ROR and SBIS opcodes [MooglyGuy]
23      - Corrected cycle counts for LD and ST opcodes [MooglyGuy]
24      - Moved opcycles init into inner while loop, fixes 2-cycle and 3-cycle opcodes effectively forcing
25        all subsequent 1-cycle opcodes to be 2 or 3 cycles [MooglyGuy]
26      - Fixed register behavior in MULSU, LD -Z, and LD -Y opcodes [MooglyGuy]
2727
28     18 Oct. 2012
29     - Added OR, SBCI, ORI, ST Y+, ADIQ opcodes [MooglyGuy]
30     - Fixed COM, NEG, LSR opcodes [MooglyGuy]
28      18 Oct. 2012
29      - Added OR, SBCI, ORI, ST Y+, ADIQ opcodes [MooglyGuy]
30      - Fixed COM, NEG, LSR opcodes [MooglyGuy]
3131
3232*/
3333
trunk/src/emu/cpu/i386/i386.c
r19030r19031
28312831   entry = seg->selector & ~0x7;
28322832   if (limit == 0 || entry + 7 > limit)
28332833      return 0;
2834   
2834
28352835   address = entry + base;
28362836
28372837   // todo: bigendian
r19030r19031
29102910
29112911   if(param[0] > 65535)
29122912      return 0;
2913   
2913
29142914   if (PROTECTED_MODE && !V8086_MODE)
29152915   {
29162916      memset(&seg, 0, sizeof(seg));
trunk/src/emu/video/pc_vga.c
r19030r19031
29942994/*
299529953d4h index 5Eh (R/W):  Extended Vertical Overflow Register             (80x +)
29962996bit    0  Vertical Total bit 10. Bit 10 of the Vertical Total register (3d4h
2997        index 6). Bits 8 and 9 are in 3d4h index 7 bit 0 and 5.
2998      1  Vertical Display End bit 10. Bit 10 of the Vertical Display End
2999        register (3d4h index 12h). Bits 8 and 9 are in 3d4h index 7 bit 1
3000        and 6
3001      2  Start Vertical Blank bit 10. Bit 10 of the Vertical Start Blanking
3002        register (3d4h index 15h). Bit 8 is in 3d4h index 7 bit 3 and bit 9
3003        in 3d4h index 9 bit 5
3004      4  Vertical Retrace Start bit 10. Bit 10 of the Vertical Start Retrace
3005        register (3d4h index 10h). Bits 8 and 9 are in 3d4h index 7 bit 2
3006        and 7.
3007      6  Line Compare Position bit 10. Bit 10 of the Line Compare register
3008        (3d4h index 18h). Bit 8 is in 3d4h index 7 bit 4 and bit 9 in 3d4h
3009        index 9 bit 6.
2997          index 6). Bits 8 and 9 are in 3d4h index 7 bit 0 and 5.
2998       1  Vertical Display End bit 10. Bit 10 of the Vertical Display End
2999          register (3d4h index 12h). Bits 8 and 9 are in 3d4h index 7 bit 1
3000          and 6
3001       2  Start Vertical Blank bit 10. Bit 10 of the Vertical Start Blanking
3002          register (3d4h index 15h). Bit 8 is in 3d4h index 7 bit 3 and bit 9
3003          in 3d4h index 9 bit 5
3004       4  Vertical Retrace Start bit 10. Bit 10 of the Vertical Start Retrace
3005          register (3d4h index 10h). Bits 8 and 9 are in 3d4h index 7 bit 2
3006          and 7.
3007       6  Line Compare Position bit 10. Bit 10 of the Line Compare register
3008          (3d4h index 18h). Bit 8 is in 3d4h index 7 bit 4 and bit 9 in 3d4h
3009          index 9 bit 6.
30103010 */
30113011         case 0x5e:
30123012            vga.crtc.vert_total = (vga.crtc.vert_total & 0xfbff) | ((data & 0x01) << 10);
trunk/src/mess/drivers/adam.c
r19030r19031
626626{
627627   /*
628628
629       bit     description
629        bit     description
630630
631       0       Lower memory option 0
632       1       Lower memory option 1
633       2       Upper memory option 0
634       3       Upper memory option 1
635       4
636       5
637       6
638       7
631        0       Lower memory option 0
632        1       Lower memory option 1
633        2       Upper memory option 0
634        3       Upper memory option 1
635        4
636        5
637        6
638        7
639639
640   */
640    */
641641
642642   m_mioc = data;
643643}
r19030r19031
666666{
667667   /*
668668
669       bit     description
669        bit     description
670670
671       0       Network reset
672       1       EOS enable
673       2
674       3
675       4
676       5
677       6
678       7
671        0       Network reset
672        1       EOS enable
673        2
674        3
675        4
676        5
677        6
678        7
679679
680   */
680    */
681681
682682   if (BIT(m_an, 0) && !BIT(data, 0))
683683   {
r19030r19031
698698{
699699   /*
700700
701       bit     description
701        bit     description
702702
703       0       BA8
704       1       BA9
705       2       BA10
706       3       BA11
707       4       BA12
708       5       BA13
709       6       BA14
710       7       BA15
703        0       BA8
704        1       BA9
705        2       BA10
706        3       BA11
707        4       BA12
708        5       BA13
709        6       BA14
710        7       BA15
711711
712   */
712    */
713713
714714   m_ba = (data << 8) | (m_ba & 0xff);
715715}
r19030r19031
723723{
724724   /*
725725
726       bit     description
726        bit     description
727727
728       0       M6801 mode bit 0
729       1       M6801 mode bit 1
730       2       M6801 mode bit 2
731       3       NET RXD
732       4
728        0       M6801 mode bit 0
729        1       M6801 mode bit 1
730        2       M6801 mode bit 2
731        3       NET RXD
732        4
733733
734   */
734    */
735735
736736   UINT8 data = M6801_MODE_7;
737737
r19030r19031
750750{
751751   /*
752752
753       bit     description
753        bit     description
754754
755       0       _DMA
756       1
757       2       _BWR
758       3
759       4       NET TXD
755        0       _DMA
756        1
757        2       _BWR
758        3
759        4       NET TXD
760760
761   */
761    */
762762
763763   // DMA
764764   m_dma = BIT(data, 0);
r19030r19031
779779{
780780   /*
781781
782       bit     description
782        bit     description
783783
784       0       BD0
785       1       BD1
786       2       BD2
787       3       BD3
788       4       BD4
789       5       BD5
790       6       BD6
791       7       BD7
784        0       BD0
785        1       BD1
786        2       BD2
787        3       BD3
788        4       BD4
789        5       BD5
790        6       BD6
791        7       BD7
792792
793   */
793    */
794794
795795   return m_data_out;
796796}
r19030r19031
804804{
805805   /*
806806
807       bit     description
807        bit     description
808808
809       0       BD0
810       1       BD1
811       2       BD2
812       3       BD3
813       4       BD4
814       5       BD5
815       6       BD6
816       7       BD7
809        0       BD0
810        1       BD1
811        2       BD2
812        3       BD3
813        4       BD4
814        5       BD5
815        6       BD6
816        7       BD7
817817
818   */
818    */
819819
820820   m_data_in = data;
821821}
r19030r19031
829829{
830830   /*
831831
832       bit     description
832        bit     description
833833
834       0       BA0
835       1       BA1
836       2       BA2
837       3       BA3
838       4       BA4
839       5       BA5
840       6       BA6
841       7       BA7
834        0       BA0
835        1       BA1
836        2       BA2
837        3       BA3
838        4       BA4
839        5       BA5
840        6       BA6
841        7       BA7
842842
843   */
843    */
844844
845845   m_ba = (m_ba & 0xff00) | data;
846846}
r19030r19031
11681168   MCFG_ADAM_EXPANSION_SLOT_ADD(ADAM_LEFT_EXPANSION_SLOT_TAG, XTAL_7_15909MHz/2, slot1_intf, adam_slot1_devices, "adamlink", NULL)
11691169   MCFG_ADAM_EXPANSION_SLOT_ADD(ADAM_CENTER_EXPANSION_SLOT_TAG, XTAL_7_15909MHz/2, slot2_intf, adam_slot2_devices, NULL, NULL)
11701170   MCFG_ADAM_EXPANSION_SLOT_ADD(ADAM_RIGHT_EXPANSION_SLOT_TAG, XTAL_7_15909MHz/2, slot3_intf, adam_slot3_devices, "ram", NULL)
1171   
1171
11721172   // internal ram
11731173   MCFG_RAM_ADD(RAM_TAG)
11741174   MCFG_RAM_DEFAULT_SIZE("64K")
trunk/src/mess/drivers/pc100.c
r19030r19031
22
33    NEC PC-100
44
5   preliminary driver by Angelo Salese
6   Thanks to Carl for the i8259 tip;
5    preliminary driver by Angelo Salese
6    Thanks to Carl for the i8259 tip;
77
88    TODO:
99    - floppy support (no images available right now);
r19030r19031
2020    F8216: FA                        cli
2121    F8217: 0A E9                     or      ch,cl
2222    F8219: 74 15                     je      0F8230h
23   - Second one is for the vblank irq timing:
24      F8238: 8B D3                     mov     dx,bx
25      F823A: 8B D9                     mov     bx,cx
26      F823C: CF                        iret
27   F824D: E4 02                     in      al,2h
28   F824F: 8A E0                     mov     ah,al
29   F8251: B0 EF                     mov     al,0EFh
30   F8253: E6 02                     out     2h,al
31   F8255: BB 00 00                  mov     bx,0h
32   F8258: BA 00 00                  mov     dx,0h
33   F825B: B9 20 4E                  mov     cx,4E20h
34   F825E: FB                        sti
35   F825F: E2 FE                     loop    0F825Fh ;calculates the vblank here
36   F8261: FA                        cli
37   F8262: 8A C4                     mov     al,ah
38   F8264: E6 02                     out     2h,al
39   F8266: 2B D3                     sub     dx,bx
40   F8268: 81 FA 58 1B               cmp     dx,1B58h
41   F826C: 78 06                     js      0F8274h ;error if DX is smaller than 0x1b58
42   F826E: 81 FA 40 1F               cmp     dx,1F40h
43   F8272: 78 0A                     js      0F827Eh ;error if DX is greater than 0x1f40
44   F8274: B1 05                     mov     cl,5h
45   F8276: E8 CB 03                  call    0F8644h
46   F8279: E8 79 FF                  call    0F81F5h
47   F827C: EB FE                     jmp     0F827Ch
48   F827E: B0 FF                     mov     al,0FFh
49   fwiw with current timings, we get DX=0x1f09, enough for passing the test;
23    - Second one is for the vblank irq timing:
24        F8238: 8B D3                     mov     dx,bx
25        F823A: 8B D9                     mov     bx,cx
26        F823C: CF                        iret
27    F824D: E4 02                     in      al,2h
28    F824F: 8A E0                     mov     ah,al
29    F8251: B0 EF                     mov     al,0EFh
30    F8253: E6 02                     out     2h,al
31    F8255: BB 00 00                  mov     bx,0h
32    F8258: BA 00 00                  mov     dx,0h
33    F825B: B9 20 4E                  mov     cx,4E20h
34    F825E: FB                        sti
35    F825F: E2 FE                     loop    0F825Fh ;calculates the vblank here
36    F8261: FA                        cli
37    F8262: 8A C4                     mov     al,ah
38    F8264: E6 02                     out     2h,al
39    F8266: 2B D3                     sub     dx,bx
40    F8268: 81 FA 58 1B               cmp     dx,1B58h
41    F826C: 78 06                     js      0F8274h ;error if DX is smaller than 0x1b58
42    F826E: 81 FA 40 1F               cmp     dx,1F40h
43    F8272: 78 0A                     js      0F827Eh ;error if DX is greater than 0x1f40
44    F8274: B1 05                     mov     cl,5h
45    F8276: E8 CB 03                  call    0F8644h
46    F8279: E8 79 FF                  call    0F81F5h
47    F827C: EB FE                     jmp     0F827Ch
48    F827E: B0 FF                     mov     al,0FFh
49    fwiw with current timings, we get DX=0x1f09, enough for passing the test;
5050
5151****************************************************************************/
5252
r19030r19031
352352WRITE8_MEMBER( pc100_state::rtc_porta_w )
353353{
354354/*
355   ---- -x-- chip select
356   ---- --x- read
357   ---- ---x write
355    ---- -x-- chip select
356    ---- --x- read
357    ---- ---x write
358358*/
359359
360360   m_rtc->write_w(data & 1);
trunk/src/mess/drivers/apple3.c
r19030r19031
7272   /* basic machine hardware */
7373   MCFG_CPU_ADD("maincpu", M6502, 2000000)        /* 2 MHz */
7474   MCFG_CPU_PROGRAM_MAP(apple3_map)
75//   MCFG_CPU_CONFIG( apple3_m6502_interface )
75//  MCFG_CPU_CONFIG( apple3_m6502_interface )
7676   MCFG_CPU_PERIODIC_INT_DRIVER(apple3_state, apple3_interrupt,  192)
7777   MCFG_QUANTUM_TIME(attotime::from_hz(60))
7878
trunk/src/mess/drivers/pc9801.c
r19030r19031
99    - proper 8251 uart hook-up on keyboard
1010    - boot is too slow right now, might be due of the floppy / HDD devices
1111    - investigate on POR bit
12   - Write a PC80S31K device (also used on PC-8801 and PC-88VA, it's the FDC + Z80 sub-system);
12    - Write a PC80S31K device (also used on PC-8801 and PC-88VA, it's the FDC + Z80 sub-system);
1313
1414    TODO (PC-9801RS):
1515    - floppy disk hook-up;
trunk/src/mess/drivers/alphasma.c
r19030r19031
44
55        08/28/2012 Skeleton driver
66
7   TODO:
8   - define video HW capabilities
9   - "Addr. Bus RAM error" string read, presumably memory mapped RAM at 0x8000
10     is actually a r/w bank register.
7    TODO:
8    - define video HW capabilities
9    - "Addr. Bus RAM error" string read, presumably memory mapped RAM at 0x8000
10      is actually a r/w bank register.
1111
1212****************************************************************************/
1313
r19030r19031
3030
3131   virtual void machine_start();
3232   virtual void palette_init();
33//   virtual UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
33//  virtual UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
3434};
3535
3636
r19030r19031
4141ADDRESS_MAP_END
4242
4343static ADDRESS_MAP_START(alphasmart_io, AS_IO, 8, alphasmart_state)
44//   AM_RANGE(MC68HC11_IO_PORTA, MC68HC11_IO_PORTA) AM_DEVREADWRITE("hd44780", hd44780_device, control_read, control_write)
45//   AM_RANGE(MC68HC11_IO_PORTD, MC68HC11_IO_PORTD) AM_DEVREADWRITE("hd44780", hd44780_device, data_read, data_write)
44//  AM_RANGE(MC68HC11_IO_PORTA, MC68HC11_IO_PORTA) AM_DEVREADWRITE("hd44780", hd44780_device, control_read, control_write)
45//  AM_RANGE(MC68HC11_IO_PORTD, MC68HC11_IO_PORTD) AM_DEVREADWRITE("hd44780", hd44780_device, data_read, data_write)
4646ADDRESS_MAP_END
4747
4848/* Input ports */
r19030r19031
7979   MCFG_CPU_PROGRAM_MAP(alphasmart_mem)
8080   MCFG_CPU_IO_MAP(alphasmart_io)
8181   MCFG_CPU_CONFIG(alphasmart_hc11_config)
82//   MCFG_CPU_PERIODIC_INT_DRIVER(alphasmart_state, irq0_line_hold,  50)
82//  MCFG_CPU_PERIODIC_INT_DRIVER(alphasmart_state, irq0_line_hold,  50)
8383
8484   MCFG_HD44780_ADD("hd44780", alphasmart_4line_display)
8585
trunk/src/mess/drivers/apc.c
r19030r19031
11/***************************************************************************
22
3   Advanced Personal Computer (c) 1982 NEC
3    Advanced Personal Computer (c) 1982 NEC
44
5   preliminary driver by Angelo Salese
5    preliminary driver by Angelo Salese
66
7   TODO:
8   - video emulation
9   - Floppy device
10   - keyboard
11   - Understand interrupt sources
12   - NMI seems valid, dumps a x86 stack to vram?
13   - Unknown RTC device type;
14   - What are exactly APU and MPU devices? They sounds scary ...
15   - DMA hook-ups
16   - serial ports
17   - parallel ports
18   - Extract info regarding Hard Disk functionality
19   - Various unknown ports
20   - What kind of external ROM actually maps at 0xa****?
7    TODO:
8    - video emulation
9    - Floppy device
10    - keyboard
11    - Understand interrupt sources
12    - NMI seems valid, dumps a x86 stack to vram?
13    - Unknown RTC device type;
14    - What are exactly APU and MPU devices? They sounds scary ...
15    - DMA hook-ups
16    - serial ports
17    - parallel ports
18    - Extract info regarding Hard Disk functionality
19    - Various unknown ports
20    - What kind of external ROM actually maps at 0xa****?
2121
2222============================================================================
23   front ^
24         |
25   card
26   ----
27   69PFCU 7220               PFCU1R 2764
28   69PTS  7220
29   -
30   69PFB2 8086/8087   DFBU2J PFBU2L 2732
31   69SNB RAM
23    front ^
24          |
25    card
26    ----
27    69PFCU 7220               PFCU1R 2764
28    69PTS  7220
29    -
30    69PFB2 8086/8087   DFBU2J PFBU2L 2732
31    69SNB RAM
3232
3333----------------------------------------------------------------------------
34   i/o memory map (preliminary):
35   0x00 - 0x1f DMA
36   0x20 - 0x23 i8259 master
37   0x28 - 0x2f i8259 slave (even), pit8253 (odd)
38   0x30 - 0x37 serial i8251, even #1 / odd #2
39   0x38 - 0x3f DMA segments
40   0x40 - 0x43 upd7220, even chr / odd bitmap
41   0x48 - 0x4f keyboard
42   0x50 - 0x53 upd765
43   0x58        rtc
44   0x5a - 0x5e APU
45   0x60        MPU (melody)
46   0x61 - 0x67 (Mirror of pit8253?)
47   0x68 - 0x6f parallel port
34    i/o memory map (preliminary):
35    0x00 - 0x1f DMA
36    0x20 - 0x23 i8259 master
37    0x28 - 0x2f i8259 slave (even), pit8253 (odd)
38    0x30 - 0x37 serial i8251, even #1 / odd #2
39    0x38 - 0x3f DMA segments
40    0x40 - 0x43 upd7220, even chr / odd bitmap
41    0x48 - 0x4f keyboard
42    0x50 - 0x53 upd765
43    0x58        rtc
44    0x5a - 0x5e APU
45    0x60        MPU (melody)
46    0x61 - 0x67 (Mirror of pit8253?)
47    0x68 - 0x6f parallel port
4848
4949----------------------------------------------------------------------------
50500xfe3c2: checks if the floppy has a valid string for booting (either "CP/M-86"
r19030r19031
172172   int xi,yi;
173173   int x;
174174   UINT8 char_size;
175//   UINT8 interlace_on;
175//  UINT8 interlace_on;
176176
177//   if(state->m_video_ff[DISPLAY_REG] == 0) //screen is off
178//      return;
177//  if(state->m_video_ff[DISPLAY_REG] == 0) //screen is off
178//      return;
179179
180//   interlace_on = state->m_video_reg[2] == 0x10; /* TODO: correct? */
180//  interlace_on = state->m_video_reg[2] == 0x10; /* TODO: correct? */
181181   char_size = 16;
182182
183183   for(x=0;x<pitch;x++)
184184   {
185185      UINT8 tile_data;
186//      UINT8 secret,reverse,u_line,v_line;
186//      UINT8 secret,reverse,u_line,v_line;
187187      UINT8 color;
188188      UINT8 tile,attr,pen;
189189      UINT32 tile_addr;
190190
191//      tile_addr = addr+(x*(state->m_video_ff[WIDTH40_REG]+1));
191//      tile_addr = addr+(x*(state->m_video_ff[WIDTH40_REG]+1));
192192      tile_addr = addr+(x*(1));
193193
194194      tile = state->m_video_ram_1[(tile_addr*2+1) & 0x1fff] & 0x007f;
195195      attr = (state->m_video_ram_1[(tile_addr*2 & 0x1fff) | 0x2000] & 0x00ff);
196196
197//      secret = (attr & 1) ^ 1;
197//      secret = (attr & 1) ^ 1;
198198      //blink = attr & 2;
199//      reverse = attr & 4;
200//      u_line = attr & 8;
201//      v_line = attr & 0x10;
199//      reverse = attr & 4;
200//      u_line = attr & 8;
201//      v_line = attr & 0x10;
202202      color = (attr & 0xe0) >> 5;
203203
204204      for(yi=0;yi<lr;yi++)
r19030r19031
207207         {
208208            int res_x,res_y;
209209
210//            res_x = (x*8+xi) * (state->m_video_ff[WIDTH40_REG]+1);
210//              res_x = (x*8+xi) * (state->m_video_ff[WIDTH40_REG]+1);
211211            res_x = (x*8+xi) * (1);
212212            res_y = y*lr+yi;
213213
214214            if(res_x > 640 || res_y > char_size*25) //TODO
215215               continue;
216216
217//            tile_data = secret ? 0 : (state->m_char_rom[tile*char_size+interlace_on*0x800+yi]);
217//              tile_data = secret ? 0 : (state->m_char_rom[tile*char_size+interlace_on*0x800+yi]);
218218            tile_data = (state->m_char_rom[tile+yi*0x80]);
219219
220//            if(reverse) { tile_data^=0xff; }
221//            if(u_line && yi == 7) { tile_data = 0xff; }
222//            if(v_line)   { tile_data|=8; }
220//              if(reverse) { tile_data^=0xff; }
221//              if(u_line && yi == 7) { tile_data = 0xff; }
222//              if(v_line)  { tile_data|=8; }
223223
224224            if(cursor_on && cursor_addr == tile_addr)
225225               tile_data^=0xff;
r19030r19031
232232            if(pen)
233233               bitmap.pix16(res_y, res_x) = pen;
234234
235//            if(state->m_video_ff[WIDTH40_REG])
236//            {
237//               if(res_x+1 > 640 || res_y > char_size*25) //TODO
238//                  continue;
235//              if(state->m_video_ff[WIDTH40_REG])
236//              {
237//                  if(res_x+1 > 640 || res_y > char_size*25) //TODO
238//                      continue;
239239
240//               bitmap.pix16(res_y, res_x+1) = pen;
241//            }
240//                  bitmap.pix16(res_y, res_x+1) = pen;
241//              }
242242         }
243243      }
244244   }
r19030r19031
387387
388388static ADDRESS_MAP_START( apc_map, AS_PROGRAM, 16, apc_state )
389389   AM_RANGE(0x00000, 0x9ffff) AM_RAM
390//   AM_RANGE(0xa0000, 0xaffff) space for an external ROM
390//  AM_RANGE(0xa0000, 0xaffff) space for an external ROM
391391   AM_RANGE(0xfe000, 0xfffff) AM_ROM AM_REGION("ipl", 0)
392392ADDRESS_MAP_END
393393
r19030r19031
396396   AM_RANGE(0x00, 0x1f) AM_READWRITE8(apc_dma_r, apc_dma_w,0xff00)
397397   AM_RANGE(0x20, 0x23) AM_DEVREADWRITE8_LEGACY("pic8259_master", pic8259_r, pic8259_w, 0x00ff) // i8259
398398   AM_RANGE(0x28, 0x2f) AM_READWRITE8(apc_port_28_r, apc_port_28_w, 0xffff)
399//   0x30, 0x37 serial port 0/1 (i8251) (even/odd)
399//  0x30, 0x37 serial port 0/1 (i8251) (even/odd)
400400   AM_RANGE(0x38, 0x3f) AM_WRITE8(apc_dma_segments_w,0x00ff)
401401   AM_RANGE(0x40, 0x43) AM_READWRITE8(apc_gdc_r, apc_gdc_w, 0xffff)
402402//  0x46 UPD7220 reset interrupt
403403   AM_RANGE(0x48, 0x4f) AM_READWRITE8(apc_kbd_r, apc_kbd_w, 0x00ff)
404404   AM_RANGE(0x50, 0x53) AM_DEVICE8("upd765", upd765a_device, map, 0x00ff ) // upd765
405//   0x5a  APU data (Arithmetic Processing Unit!)
406//   0x5e  APU status/command
405//  0x5a  APU data (Arithmetic Processing Unit!)
406//  0x5e  APU status/command
407407   AM_RANGE(0x60, 0x67) AM_READWRITE8(apc_port_60_r, apc_port_60_w, 0xffff)
408//   0x60 Melody Processing Unit
409//   AM_RANGE(0x68, 0x6f) i8255 , printer port (A: status (R) B: data (W) C: command (W))
410//   AM_DEVREADWRITE8("upd7220_btm", upd7220_device, read, write, 0x00ff)
408//  0x60 Melody Processing Unit
409//  AM_RANGE(0x68, 0x6f) i8255 , printer port (A: status (R) B: data (W) C: command (W))
410//  AM_DEVREADWRITE8("upd7220_btm", upd7220_device, read, write, 0x00ff)
411411ADDRESS_MAP_END
412412
413413static INPUT_PORTS_START( apc )
r19030r19031
468468
469469void apc_state::fdc_drq(bool state)
470470{
471//   printf("%02x DRQ\n",state);
472//   i8237_dreq0_w(m_dma, state);
471//  printf("%02x DRQ\n",state);
472//  i8237_dreq0_w(m_dma, state);
473473   m_dmac->dreq1_w(state);
474474
475475}
476476
477477void apc_state::fdc_irq(bool state)
478478{
479//   printf("IRQ %d\n",state);
479//  printf("IRQ %d\n",state);
480480   pic8259_ir3_w(machine().device("pic8259_slave"), state);
481481}
482482
r19030r19031
628628
629629   m_dmac->hack_w(state);
630630
631//   printf("%02x HLDA\n",state);
631//  printf("%02x HLDA\n",state);
632632}
633633
634634WRITE_LINE_MEMBER( apc_state::apc_tc_w )
r19030r19031
655655   address_space &program = m_maincpu->space(AS_PROGRAM);
656656   offs_t addr = (m_dma_offset[m_dack] << 16) | offset;
657657
658//   printf("%08x %02x\n",addr,data);
658//  printf("%08x %02x\n",addr,data);
659659
660660   program.write_byte(addr, data);
661661}
r19030r19031
673673
674674READ8_MEMBER(apc_state::test_r)
675675{
676//   printf("2dd DACK R\n");
676//  printf("2dd DACK R\n");
677677
678678   return m_fdc->dma_r();
679679}
r19030r19031
767767   ROM_LOAD16_BYTE( "pfbu2j.bin",   0x00000, 0x001000, CRC(86970df5) SHA1(be59c5dad3bd8afc21e9f2f1404553d4371978be) )
768768    ROM_LOAD16_BYTE( "pfbu2l.bin",   0x00001, 0x001000, CRC(38df2e70) SHA1(a37ccaea00c2b290610d354de08b489fa897ec48) )
769769
770//   ROM_REGION( 0x10000, "file", ROMREGION_ERASE00 )
771//   ROM_LOAD( "sioapc.o", 0, 0x10000, CRC(1) SHA1(1) )
770//  ROM_REGION( 0x10000, "file", ROMREGION_ERASE00 )
771//  ROM_LOAD( "sioapc.o", 0, 0x10000, CRC(1) SHA1(1) )
772772
773773   ROM_REGION( 0x2000, "gfx", ROMREGION_ERASE00 )
774774    ROM_LOAD("pfcu1r.bin",   0x000000, 0x002000, CRC(683efa94) SHA1(43157984a1746b2e448f3236f571011af9a3aa73) )
trunk/src/mess/drivers/a7800.c
r19030r19031
99    2002/05/13 kubecj   added more banks for bankswitching
1010                            added PAL machine description
1111                            changed clock to be precise
12   
13    2012/10/25 Robert Tuccitto   NTSC Color Generator utilized for
14            color palette with hue shift/start
15            based on observation of several
16            systems across multiple displays
1712
13    2012/10/25 Robert Tuccitto  NTSC Color Generator utilized for
14                color palette with hue shift/start
15                based on observation of several
16                systems across multiple displays
17
1818    2012/11/09 Robert Tuccitto  Fixed 3 degree hue begin point
19            miscalculation of color palette
19                miscalculation of color palette
2020
2121***************************************************************************/
2222
trunk/src/mess/drivers/ng_aes.c
r19030r19031
9292   if(neocd.cd == NULL) // no cd is there, bail out
9393      return QChannelData;
9494
95//   NeoCDSectorLBA
95//  NeoCDSectorLBA
9696   switch (CDEmuStatus) {
9797      case reading:
9898      case playing: {
99     
99
100100         UINT32 msf;
101101         msf = lba_to_msf_alt(NeoCDSectorLBA+150);
102102
103103
104104
105105         QChannelData[0] = cdrom_get_track(neocd.cd, NeoCDSectorLBA);
106     
106
107107         QChannelData[1] = (msf >> 16)&0xff;
108108         QChannelData[2] = (msf >> 8)&0xff;
109109         QChannelData[3] = (msf >> 0)&0xff;
110     
110
111111         int elapsedlba;
112112         elapsedlba = NeoCDSectorLBA - neocd.toc->tracks[ cdrom_get_track(neocd.cd, NeoCDSectorLBA) ].physframeofs;
113113         msf = lba_to_msf_alt (elapsedlba);
r19030r19031
115115         QChannelData[4] = (msf >> 16)&0xff;
116116         QChannelData[5] = (msf >> 8)&0xff;
117117         QChannelData[6] = (msf >> 0)&0xff;
118     
118
119119         if (QChannelData[0]==1)
120120            QChannelData[7] = 0x4;
121121         else
r19030r19031
140140
141141   static unsigned char TOCEntry[4];
142142
143   if(neocd.cd == NULL)
143   if(neocd.cd == NULL)
144144      return TOCEntry;
145145
146146
r19030r19031
252252static void MapVectorTable(bool bMapBoardROM)
253253{
254254   /*
255   if (!bMapBoardROM && Neo68KROMActive) {
256      SekMapMemory(Neo68KFix[nNeoActiveSlot], 0x000000, 0x0003FF, SM_ROM);
257   } else {
258      SekMapMemory(NeoVectorActive, 0x000000, 0x0003FF, SM_ROM);
259   }
260   */
255    if (!bMapBoardROM && Neo68KROMActive) {
256        SekMapMemory(Neo68KFix[nNeoActiveSlot], 0x000000, 0x0003FF, SM_ROM);
257    } else {
258        SekMapMemory(NeoVectorActive, 0x000000, 0x0003FF, SM_ROM);
259    }
260    */
261261}
262262
263263
r19030r19031
404404
405405void ng_aes_state::SekWriteWord(UINT32 a, UINT16 d)
406406{
407//   printf("write word %08x %04x\n", a, d);
407//  printf("write word %08x %04x\n", a, d);
408408   curr_space->write_word(a,d);
409409}
410410
411411void ng_aes_state::SekWriteByte(UINT32 a, UINT8 d)
412412{
413//   printf("write byte %08x %02x\n", a, d);
413//  printf("write byte %08x %02x\n", a, d);
414414   curr_space->write_byte(a,d);
415415}
416416
417417UINT32 ng_aes_state::SekReadByte(UINT32 a)
418418{
419//   printf("read byte %08x\n", a);
419//  printf("read byte %08x\n", a);
420420   return curr_space->read_byte(a);
421421}
422422
423423
424424UINT32 ng_aes_state::SekReadWord(UINT32 a)
425425{
426//   printf("read WORD %08x\n", a);
426//  printf("read WORD %08x\n", a);
427427   return curr_space->read_word(a);
428428}
429429
r19030r19031
947947   if ((nff0002 & 0x0500)) {
948948      if (NeoCDAssyStatus == 1 && bNeoCDLoadSector) {
949949
950//         if (LC8951RegistersW[10] & 0x80) {
950//          if (LC8951RegistersW[10] & 0x80) {
951951            NeoCDSectorLBA++;
952952            NeoCDSectorLBA = CDEmuLoadSector(NeoCDSectorLBA, NeoCDSectorData + 4) -1;
953//         }
953//          }
954954
955955         if (LC8951RegistersW[10] & 0x80) {
956956            LC8951UpdateHeader();
957   
957
958958            LC8951RegistersR[12] = 0x80;                              // STAT0
959959            LC8951RegistersR[13] = 0;                                 // STAT1
960960            LC8951RegistersR[14] = 0x10;                              // STAT2
961961            LC8951RegistersR[15] = 0;                                 // STAT3
962   
963//            bprintf(PRINT_IMPORTANT, _T("    Sector %08i (%02i:%02i:%02i) read\n"), NeoCDSectorLBA, NeoCDSectorMin, NeoCDSectorSec, NeoCDSectorFrm);
964962
963//              bprintf(PRINT_IMPORTANT, _T("    Sector %08i (%02i:%02i:%02i) read\n"), NeoCDSectorLBA, NeoCDSectorMin, NeoCDSectorSec, NeoCDSectorFrm);
964
965965// CDZ protection hack? (error correction on the CDC should correct this?)
966966#if 1
967967            if (NeoCDSectorData[4 + 64] == 'g' && !strncmp(NeoCDSectorData + 4, "Copyright by SNK", 16)) {
968//               printf(PRINT_ERROR, _T("    simulated CDZ protection error\n"));
969//               bprintf(PRINT_ERROR, _T("    %.70hs\n"), NeoCDSectorData + 4);
970   
968//                  printf(PRINT_ERROR, _T("    simulated CDZ protection error\n"));
969//                  bprintf(PRINT_ERROR, _T("    %.70hs\n"), NeoCDSectorData + 4);
970
971971               NeoCDSectorData[4 + 64] = 'f';
972   
973               // LC8951RegistersR[12] = 0x00;                           // STAT0
972
973               // LC8951RegistersR[12] = 0x00;                                 // STAT0
974974            }
975975#endif
976976
977977            nIRQAcknowledge &= ~0x20;
978978            NeoCDIRQUpdate(0);
979   
979
980980            LC8951RegistersR[1] &= ~0x20;
981981
982//            bprintf(PRINT_IMPORTANT, _T("    DECI interrupt triggered\n"));
982//              bprintf(PRINT_IMPORTANT, _T("    DECI interrupt triggered\n"));
983983         }
984984      }
985985
986986      bNeoCDLoadSector = true;
987//      bNeoCDLoadSector = false;
987//      bNeoCDLoadSector = false;
988988   }
989989}
990990
r19030r19031
992992
993993UINT8 ng_aes_state::neogeoReadTransfer(UINT32 sekAddress, int is_byte_transfer)
994994{
995//   if ((sekAddress & 0x0FFFFF) < 16)
996//      printf(PRINT_NORMAL, _T("  - NGCD port 0x%06X read (byte, PC: 0x%06X)\n"), sekAddress, SekGetPC(-1));
997   
995//  if ((sekAddress & 0x0FFFFF) < 16)
996//      printf(PRINT_NORMAL, _T("  - NGCD port 0x%06X read (byte, PC: 0x%06X)\n"), sekAddress, SekGetPC(-1));
997
998998   sekAddress ^= 1;
999999
10001000   switch (nActiveTransferArea) {
r19030r19031
10121012         return NeoTextRAM[(sekAddress & 0x3FFFF) >> 1];
10131013         break;
10141014   }
1015   
1015
10161016   return ~0;
10171017}
10181018
10191019
10201020void ng_aes_state::neogeoWriteTransfer(UINT32 sekAddress, UINT8 byteValue, int is_byte_transfer)
10211021{
1022//   if ((sekAddress & 0x0FFFFF) < 16)
1023//      bprintf(PRINT_NORMAL, _T("  - Transfer: 0x%06X -> 0x%02X (PC: 0x%06X)\n"), sekAddress, byteValue, SekGetPC(-1));
1022//  if ((sekAddress & 0x0FFFFF) < 16)
1023//      bprintf(PRINT_NORMAL, _T("  - Transfer: 0x%06X -> 0x%02X (PC: 0x%06X)\n"), sekAddress, byteValue, SekGetPC(-1));
10241024
10251025   if (!nTransferWriteEnable) {
1026//      return;
1026//      return;
10271027   }
10281028   int address;
10291029
r19030r19031
10331033   switch (nActiveTransferArea) {
10341034      case 0:                     // Sprites
10351035         address = (nSpriteTransferBank + (sekAddress & 0x0FFFFF));
1036         
1036
10371037         // wtf? is this just due to how we decode the sprite gfx or is something bad happening?
10381038         if ((address&3)==0) NeoSpriteRAM[address] = byteValue;
10391039         if ((address&3)==1) NeoSpriteRAM[address^3] = byteValue;
10401040         if ((address&3)==2) NeoSpriteRAM[address^3] = byteValue;
10411041         if ((address&3)==3) NeoSpriteRAM[address] = byteValue;
10421042
1043         //   NeoCDOBJBankUpdate[nSpriteTransferBank >> 20] = true;
1043         //  NeoCDOBJBankUpdate[nSpriteTransferBank >> 20] = true;
10441044         break;
10451045      case 1:                     // ADPCM
10461046         YM2610ADPCMAROM[nNeoActiveSlot][nADPCMTransferBank + ((sekAddress & 0x0FFFFF) >> 1)] = byteValue;
r19030r19031
10581058         break;
10591059      case 5:                     // Text
10601060         NeoTextRAM[(sekAddress & 0x3FFFF) >> 1] = byteValue;
1061//         NeoUpdateTextOne((sekAddress & 0x3FFFF) >> 1, byteValue);
1061//          NeoUpdateTextOne((sekAddress & 0x3FFFF) >> 1, byteValue);
10621062         break;
10631063   }
10641064}
r19030r19031
10671067
10681068UINT16 ng_aes_state::neogeoReadWordCDROM(UINT32 sekAddress)
10691069{
1070//   bprintf(PRINT_NORMAL, _T("  - CDROM: 0x%06X read (word, PC: 0x%06X)\n"), sekAddress, SekGetPC(-1));
1070//  bprintf(PRINT_NORMAL, _T("  - CDROM: 0x%06X read (word, PC: 0x%06X)\n"), sekAddress, SekGetPC(-1));
10711071
10721072
10731073   switch (sekAddress & 0xFFFF) {
r19030r19031
10771077
10781078      // LC8951 registers
10791079      case 0x0100:
1080//         bprintf(PRINT_NORMAL, _T("  - LC8951 register read (PC: 0x%06X)\n"), SekGetPC(-1));
1080//          bprintf(PRINT_NORMAL, _T("  - LC8951 register read (PC: 0x%06X)\n"), SekGetPC(-1));
10811081         return nLC8951Register;
10821082      case 0x0102: {
1083//         bprintf(PRINT_NORMAL, _T("  - LC8951 register 0x%X read (PC: 0x%06X)\n"), nLC8951Register, SekGetPC(-1));
1083//          bprintf(PRINT_NORMAL, _T("  - LC8951 register 0x%X read (PC: 0x%06X)\n"), nLC8951Register, SekGetPC(-1));
10841084
10851085         INT32 reg = LC8951RegistersR[nLC8951Register];
10861086
r19030r19031
11011101
11021102      // CD mechanism communication
11031103      case 0x0160:
1104         return NeoCDCommsread();   
1104         return NeoCDCommsread();
11051105
11061106      case 0x011C: // region
11071107         return ~((0x10 | (NeoSystem & 3)) << 8);
11081108   }
11091109
11101110
1111//   bprintf(PRINT_NORMAL, _T("  - NGCD port 0x%06X read (word, PC: 0x%06X)\n"), sekAddress, SekGetPC(-1));
1111//  bprintf(PRINT_NORMAL, _T("  - NGCD port 0x%06X read (word, PC: 0x%06X)\n"), sekAddress, SekGetPC(-1));
11121112
11131113   return ~0;
11141114}
r19030r19031
11161116
11171117void ng_aes_state::neogeoWriteWordCDROM(UINT32 sekAddress, UINT16 wordValue)
11181118{
1119//   bprintf(PRINT_NORMAL, _T("  - NGCD port 0x%06X -> 0x%04X (PC: 0x%06X)\n"), sekAddress, wordValue, SekGetPC(-1));
1119//  bprintf(PRINT_NORMAL, _T("  - NGCD port 0x%06X -> 0x%04X (PC: 0x%06X)\n"), sekAddress, wordValue, SekGetPC(-1));
11201120   int byteValue = wordValue & 0xff;
11211121
11221122   switch (sekAddress & 0xFFFE) {
11231123      case 0x0002:
1124//         bprintf(PRINT_IMPORTANT, _T("  - NGCD Interrupt mask -> 0x%04X (PC: 0x%06X)\n"), wordValue, SekGetPC(-1));
1125         nff0002 = wordValue;         
1124//          bprintf(PRINT_IMPORTANT, _T("  - NGCD Interrupt mask -> 0x%04X (PC: 0x%06X)\n"), wordValue, SekGetPC(-1));
1125         nff0002 = wordValue;
11261126
11271127// LC8951RegistersR[1] |= 0x20;
11281128
11291129         //if (nff0002 & 0x0500)
1130         //   nNeoCDCyclesIRQPeriod = (INT32)(12000000.0 * nBurnCPUSpeedAdjust / (256.0 * 75.0));
1130         //  nNeoCDCyclesIRQPeriod = (INT32)(12000000.0 * nBurnCPUSpeedAdjust / (256.0 * 75.0));
11311131         //else
1132         //   nNeoCDCyclesIRQPeriod = (INT32)(12000000.0 * nBurnCPUSpeedAdjust / (256.0 *  75.0));
1132         //  nNeoCDCyclesIRQPeriod = (INT32)(12000000.0 * nBurnCPUSpeedAdjust / (256.0 *  75.0));
11331133
11341134         break;
11351135
r19030r19031
11821182
11831183      case 0x007E:
11841184         NeoCDDMAMode = wordValue;
1185//         bprintf(PRINT_NORMAL, _T("  - DMA controller 0x%2X -> 0x%04X (PC: 0x%06X)\n"), sekAddress & 0xFF, wordValue, SekGetPC(-1));
1185//          bprintf(PRINT_NORMAL, _T("  - DMA controller 0x%2X -> 0x%04X (PC: 0x%06X)\n"), sekAddress & 0xFF, wordValue, SekGetPC(-1));
11861186         break;
11871187
11881188      // upload DMA controller program
r19030r19031
11951195      case 0x008A:
11961196      case 0x008C:
11971197      case 0x008E:
1198//         bprintf(PRINT_NORMAL, _T("  - DMA controller program[%02i] -> 0x%04X (PC: 0x%06X)\n"), sekAddress & 0x0F, wordValue, SekGetPC(-1));
1198//          bprintf(PRINT_NORMAL, _T("  - DMA controller program[%02i] -> 0x%04X (PC: 0x%06X)\n"), sekAddress & 0x0F, wordValue, SekGetPC(-1));
11991199         break;
12001200
12011201      // LC8951 registers
12021202      case 0x0100:
12031203         nLC8951Register = byteValue & 0x0F;
1204//         bprintf(PRINT_NORMAL, _T("  - LC8951 register -> 0x%02X (PC: 0x%06X)\n"), nLC8951Register, SekGetPC(-1));
1204//          bprintf(PRINT_NORMAL, _T("  - LC8951 register -> 0x%02X (PC: 0x%06X)\n"), nLC8951Register, SekGetPC(-1));
12051205         break;
12061206      case 0x0102:
1207//         bprintf(PRINT_NORMAL, _T("  - LC8951 register 0x%X -> 0x%02X (PC: 0x%06X)\n"), nLC8951Register, byteValue, SekGetPC(-1));
1207//          bprintf(PRINT_NORMAL, _T("  - LC8951 register 0x%X -> 0x%02X (PC: 0x%06X)\n"), nLC8951Register, byteValue, SekGetPC(-1));
12081208         switch (nLC8951Register) {
12091209            case 3:                                             // DBCH
12101210               LC8951RegistersW[ 3]  = byteValue & 0x0F;
r19030r19031
12171217               LC8951RegistersW[ 7]  = ~0x00;
12181218               LC8951RegistersR[ 1] &= ~0x40;
12191219               break;
1220//            case 10:
1221//               LC8951RegistersW[nLC8951Register] = byteValue;
1222//               bprintf(PRINT_NORMAL, _T("  - CTRL0 -> %02X (PC: 0x%06X)\n"), LC8951RegistersW[nLC8951Register], byteValue, SekGetPC(-1));
1223//               break;
1220//              case 10:
1221//                  LC8951RegistersW[nLC8951Register] = byteValue;
1222//                  bprintf(PRINT_NORMAL, _T("  - CTRL0 -> %02X (PC: 0x%06X)\n"), LC8951RegistersW[nLC8951Register], byteValue, SekGetPC(-1));
1223//                  break;
12241224            case 11:
12251225               LC8951RegistersW[11]  = byteValue;                     // CTRL1
12261226               LC8951UpdateHeader();
r19030r19031
12351235         break;
12361236
12371237      case 0x0104:
1238//         bprintf(PRINT_NORMAL, _T("  - NGCD 0xE00000 area -> 0x%02X (PC: 0x%06X)\n"), byteValue, SekGetPC(-1));
1238//          bprintf(PRINT_NORMAL, _T("  - NGCD 0xE00000 area -> 0x%02X (PC: 0x%06X)\n"), byteValue, SekGetPC(-1));
12391239         nActiveTransferArea = byteValue;
12401240         break;
12411241
12421242      case 0x0120:
1243//         bprintf(PRINT_NORMAL, _T("  - NGCD OBJ BUSREQ -> 1 (PC: 0x%06X)\n"), SekGetPC(-1));
1243//          bprintf(PRINT_NORMAL, _T("  - NGCD OBJ BUSREQ -> 1 (PC: 0x%06X)\n"), SekGetPC(-1));
12441244         NeoSetSpriteSlot(1);
12451245         memset(NeoCDOBJBankUpdate, 0, sizeof(NeoCDOBJBankUpdate));
12461246         break;
12471247      case 0x0122:
1248//         bprintf(PRINT_NORMAL, _T("  - NGCD PCM BUSREQ -> 1 (PC: 0x%06X) %x\n"), SekGetPC(-1), byteValue);
1248//          bprintf(PRINT_NORMAL, _T("  - NGCD PCM BUSREQ -> 1 (PC: 0x%06X) %x\n"), SekGetPC(-1), byteValue);
12491249         break;
12501250      case 0x0126:
1251//         bprintf(PRINT_NORMAL, _T("  - NGCD Z80 BUSREQ -> 1 (PC: 0x%06X)\n"), SekGetPC(-1));
1251//          bprintf(PRINT_NORMAL, _T("  - NGCD Z80 BUSREQ -> 1 (PC: 0x%06X)\n"), SekGetPC(-1));
12521252         curr_space->machine().scheduler().synchronize();
12531253         curr_space->machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
12541254
12551255         break;
12561256      case 0x0128:
1257//         bprintf(PRINT_NORMAL, _T("  - NGCD FIX BUSREQ -> 1 (PC: 0x%06X)\n"), SekGetPC(-1));
1257//          bprintf(PRINT_NORMAL, _T("  - NGCD FIX BUSREQ -> 1 (PC: 0x%06X)\n"), SekGetPC(-1));
12581258         NeoSetTextSlot(1);
12591259         break;
12601260
12611261      case 0x0140:
1262//         bprintf(PRINT_NORMAL, _T("  - NGCD OBJ BUSREQ -> 0 (PC: 0x%06X)\n"), SekGetPC(-1));   
1262//          bprintf(PRINT_NORMAL, _T("  - NGCD OBJ BUSREQ -> 0 (PC: 0x%06X)\n"), SekGetPC(-1));
12631263         video_reset();
12641264         break;
12651265      case 0x0142:
1266//         bprintf(PRINT_NORMAL, _T("  - NGCD PCM BUSREQ -> 0 (PC: 0x%06X)\n"), SekGetPC(-1));
1266//          bprintf(PRINT_NORMAL, _T("  - NGCD PCM BUSREQ -> 0 (PC: 0x%06X)\n"), SekGetPC(-1));
12671267         break;
12681268      case 0x0146:
1269//         bprintf(PRINT_NORMAL, _T("  - NGCD Z80 BUSREQ -> 0 (PC: 0x%06X)\n"), SekGetPC(-1));
1269//          bprintf(PRINT_NORMAL, _T("  - NGCD Z80 BUSREQ -> 0 (PC: 0x%06X)\n"), SekGetPC(-1));
12701270         curr_space->machine().scheduler().synchronize();
12711271         curr_space->machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_HALT, CLEAR_LINE);
12721272         break;
12731273      case 0x0148:
1274//         bprintf(PRINT_NORMAL, _T("  - NGCD FIX BUSREQ -> 0 (PC: 0x%06X)\n"), SekGetPC(-1));
1274//          bprintf(PRINT_NORMAL, _T("  - NGCD FIX BUSREQ -> 0 (PC: 0x%06X)\n"), SekGetPC(-1));
12751275         video_reset();
12761276         break;
12771277
r19030r19031
12841284         break;
12851285
12861286      case 0x016c:
1287//         bprintf(PRINT_ERROR, _T("  - NGCD port 0x%06X -> 0x%02X (PC: 0x%06X)\n"), sekAddress, byteValue, SekGetPC(-1));
1287//          bprintf(PRINT_ERROR, _T("  - NGCD port 0x%06X -> 0x%02X (PC: 0x%06X)\n"), sekAddress, byteValue, SekGetPC(-1));
12881288
12891289         MapVectorTable(!(byteValue == 0xFF));
12901290
r19030r19031
12931293         break;
12941294
12951295      case 0x016e:
1296//         bprintf(PRINT_IMPORTANT, _T("  - NGCD 0xE00000 area write access %s (0x%02X, PC: 0x%06X)\n"), byteValue ? _T("enabled") : _T("disabled"), byteValue, SekGetPC(-1));
1296//          bprintf(PRINT_IMPORTANT, _T("  - NGCD 0xE00000 area write access %s (0x%02X, PC: 0x%06X)\n"), byteValue ? _T("enabled") : _T("disabled"), byteValue, SekGetPC(-1));
12971297
12981298         nTransferWriteEnable = byteValue;
12991299         break;
r19030r19031
13011301      case 0x0180: {
13021302         static UINT8 clara = 0;
13031303         if (!byteValue && clara) {
1304//            bprintf(PRINT_IMPORTANT, _T("  - NGCD CD communication reset (PC: 0x%06X)\n"), SekGetPC(-1));
1305//            NeoCDCommsReset();
1304//              bprintf(PRINT_IMPORTANT, _T("  - NGCD CD communication reset (PC: 0x%06X)\n"), SekGetPC(-1));
1305//              NeoCDCommsReset();
13061306         }
1307         clara = byteValue;         
1307         clara = byteValue;
13081308         break;
13091309      }
13101310      case 0x0182: {
13111311         static UINT8 clara = 0;
13121312         if (!byteValue && clara) {
1313//            bprintf(PRINT_IMPORTANT, _T("  - NGCD Z80 reset (PC: 0x%06X)\n"), SekGetPC(-1));
1313//              bprintf(PRINT_IMPORTANT, _T("  - NGCD Z80 reset (PC: 0x%06X)\n"), SekGetPC(-1));
13141314            //ZetReset();
13151315         }
1316         clara = byteValue;         
1316         clara = byteValue;
13171317         break;
13181318      }
13191319      case 0x01A0:
r19030r19031
13251325
13261326
13271327      default: {
1328//         bprintf(PRINT_NORMAL, _T("  - NGCD port 0x%06X -> 0x%04X (PC: 0x%06X)\n"), sekAddress, wordValue, SekGetPC(-1));
1328//          bprintf(PRINT_NORMAL, _T("  - NGCD port 0x%06X -> 0x%04X (PC: 0x%06X)\n"), sekAddress, wordValue, SekGetPC(-1));
13291329      }
13301330   }
1331   
1331
13321332}
13331333
13341334
r19030r19031
13941394   // Here, only bus access is used to get a rough approximation --
13951395   // each read/write takes a single cycle, setup and everything else is ignored.
13961396
1397//   bprintf(PRINT_IMPORTANT, _T("  - DMA controller transfer started (PC: 0x%06X)\n"), SekGetPC(-1));
1397//  bprintf(PRINT_IMPORTANT, _T("  - DMA controller transfer started (PC: 0x%06X)\n"), SekGetPC(-1));
13981398
13991399   switch (NeoCDDMAMode) {
14001400
14011401      case 0xCFFD: {
1402//         bprintf(PRINT_NORMAL, _T("    adr : 0x%08X - 0x%08X <- address, skip odd bytes\n"), NeoCDDMAAddress1, NeoCDDMAAddress1 + NeoCDDMACount * 8);
1402//          bprintf(PRINT_NORMAL, _T("    adr : 0x%08X - 0x%08X <- address, skip odd bytes\n"), NeoCDDMAAddress1, NeoCDDMAAddress1 + NeoCDDMACount * 8);
14031403
14041404         //  - DMA controller 0x7E -> 0xCFFD (PC: 0xC07CE2)
14051405         //  - DMA controller program[00] -> 0xFCF5 (PC: 0xC07CE8)
r19030r19031
14251425      }
14261426
14271427      case 0xE2DD: {
1428//         bprintf(PRINT_NORMAL, _T("    copy: 0x%08X - 0x%08X <- 0x%08X - 0x%08X, skip odd bytes\n"), NeoCDDMAAddress2, NeoCDDMAAddress2 + NeoCDDMACount * 2, NeoCDDMAAddress1, NeoCDDMAAddress1 + NeoCDDMACount * 4);
1428//          bprintf(PRINT_NORMAL, _T("    copy: 0x%08X - 0x%08X <- 0x%08X - 0x%08X, skip odd bytes\n"), NeoCDDMAAddress2, NeoCDDMAAddress2 + NeoCDDMACount * 2, NeoCDDMAAddress1, NeoCDDMAAddress1 + NeoCDDMACount * 4);
14291429
14301430         //  - DMA controller 0x7E -> 0xE2DD (PC: 0xC0A190)
14311431         //  - DMA controller program[00] -> 0xFCF5 (PC: 0xC0A192)
r19030r19031
14501450      }
14511451
14521452      case 0xFC2D: {
1453//         bprintf(PRINT_NORMAL, _T("    copy: 0x%08X - 0x%08X <- LC8951 external buffer, skip odd bytes\n"), NeoCDDMAAddress1, NeoCDDMAAddress1 + NeoCDDMACount * 4);
1453//          bprintf(PRINT_NORMAL, _T("    copy: 0x%08X - 0x%08X <- LC8951 external buffer, skip odd bytes\n"), NeoCDDMAAddress1, NeoCDDMAAddress1 + NeoCDDMACount * 4);
14541454
14551455         //  - DMA controller 0x7E -> 0xFC2D (PC: 0xC0A190)
14561456         //  - DMA controller program[00] -> 0xFCF5 (PC: 0xC0A192)
r19030r19031
14941494         //  - DMA controller program[14] -> 0xFCF5 (PC: 0xC0A1A0)
14951495
14961496      case 0xFE6D: {
1497//         bprintf(PRINT_NORMAL, _T("    copy: 0x%08X - 0x%08X <- 0x%08X - 0x%08X\n"), NeoCDDMAAddress2, NeoCDDMAAddress2 + NeoCDDMACount * 2, NeoCDDMAAddress1, NeoCDDMAAddress1 + NeoCDDMACount * 2);
1497//          bprintf(PRINT_NORMAL, _T("    copy: 0x%08X - 0x%08X <- 0x%08X - 0x%08X\n"), NeoCDDMAAddress2, NeoCDDMAAddress2 + NeoCDDMACount * 2, NeoCDDMAAddress1, NeoCDDMAAddress1 + NeoCDDMACount * 2);
14981498
14991499         //  - DMA controller 0x7E -> 0xFE6D (PC: 0xC0FD7A)
15001500         //  - DMA controller program[00] -> 0xFCF5 (PC: 0xC0FD7C)
r19030r19031
15161516
15171517if (NeoCDDMAAddress2 == 0x0800)  {
15181518// MapVectorTable(false);
1519//   bprintf(PRINT_ERROR, _T("    RAM vectors mapped (PC = 0x%08X\n"), SekGetPC(0));
1520//   extern INT32 bRunPause;
1521//   bRunPause = 1;
1519//  bprintf(PRINT_ERROR, _T("    RAM vectors mapped (PC = 0x%08X\n"), SekGetPC(0));
1520//  extern INT32 bRunPause;
1521//  bRunPause = 1;
15221522}
15231523         break;
15241524      }
15251525
15261526      case 0xFEF5: {
1527//         bprintf(PRINT_NORMAL, _T("    adr : 0x%08X - 0x%08X <- address\n"), NeoCDDMAAddress1, NeoCDDMAAddress1 + NeoCDDMACount * 4);
1527//          bprintf(PRINT_NORMAL, _T("    adr : 0x%08X - 0x%08X <- address\n"), NeoCDDMAAddress1, NeoCDDMAAddress1 + NeoCDDMACount * 4);
15281528
15291529         //  - DMA controller 0x7E -> 0xFEF5 (PC: 0xC07CE2)
15301530         //  - DMA controller program[00] -> 0xFCF5 (PC: 0xC07CE8)
r19030r19031
15481548      }
15491549
15501550      case 0xFFC5: {
1551//         bprintf(PRINT_NORMAL, _T("    copy: 0x%08X - 0x%08X <- LC8951 external buffer\n"), NeoCDDMAAddress1, NeoCDDMAAddress1 + NeoCDDMACount * 2);
1551//          bprintf(PRINT_NORMAL, _T("    copy: 0x%08X - 0x%08X <- LC8951 external buffer\n"), NeoCDDMAAddress1, NeoCDDMAAddress1 + NeoCDDMACount * 2);
15521552
15531553         //  - DMA controller 0x7E -> 0xFFC5 (PC: 0xC0A190)
15541554         //  - DMA controller program[00] -> 0xFCF5 (PC: 0xC0A192)
r19030r19031
15921592         //  - DMA controller program[14] -> 0x13FC (PC: 0xC0A1A0)
15931593
15941594      case 0xFFDD: {
1595//         bprintf(PRINT_NORMAL, _T("    Fill: 0x%08X - 0x%08X <- 0x%04X\n"), NeoCDDMAAddress1, NeoCDDMAAddress1 + NeoCDDMACount * 2, NeoCDDMAValue1);
1595//          bprintf(PRINT_NORMAL, _T("    Fill: 0x%08X - 0x%08X <- 0x%04X\n"), NeoCDDMAAddress1, NeoCDDMAAddress1 + NeoCDDMACount * 2, NeoCDDMAValue1);
15961596
15971597         //  - DMA controller 0x7E -> 0xFFDD (PC: 0xC07CE2)
15981598         //  - DMA controller program[00] -> 0xFCF5 (PC: 0xC07CE8)
r19030r19031
16371637      case 0:
16381638         break;
16391639      case 1:
1640//                        //bprintf(PRINT_ERROR, _T("    CD comms received command %i\n"), NeoCDCommsCommandFIFO[0]);
1640//                              //bprintf(PRINT_ERROR, _T("    CD comms received command %i\n"), NeoCDCommsCommandFIFO[0]);
16411641         CDEmuStop();
16421642
16431643         NeoCDAssyStatus = 0x0E;
16441644         bNeoCDLoadSector = false;
16451645         break;
16461646      case 2:
1647//                        //bprintf(PRINT_ERROR, _T("    CD comms received command %i\n"), NeoCDCommsCommandFIFO[0]);
1647//                              //bprintf(PRINT_ERROR, _T("    CD comms received command %i\n"), NeoCDCommsCommandFIFO[0]);
16481648         NeoCDCommsStatusFIFO[1] = NeoCDCommsCommandFIFO[3];
16491649          switch (NeoCDCommsCommandFIFO[3]) {
16501650
r19030r19031
16591659
16601660               NeoCDCommsStatusFIFO[6] = ChannelData[3] / 10;
16611661               NeoCDCommsStatusFIFO[7] = ChannelData[3] % 10;
1662               
1662
16631663               NeoCDCommsStatusFIFO[8] = ChannelData[7];
16641664
16651665// //bprintf(PRINT_ERROR, _T("    %02i %02i:%02i:%02i %02i:%02i:%02i %02i\n"), ChannelData[0], ChannelData[1], ChannelData[2], ChannelData[3], ChannelData[4], ChannelData[5], ChannelData[6], ChannelData[7]);
r19030r19031
17861786            NeoCDSectorLBA -= CD_FRAMES_PREGAP;
17871787
17881788            CDEmuStartRead();
1789//            LC8951RegistersR[1] |= 0x20;
1789//              LC8951RegistersR[1] |= 0x20;
17901790         } else {
17911791
17921792            if (CDEmuGetStatus() == reading) {
r19030r19031
18021802         break;
18031803      }
18041804      case 4:
1805//         //bprintf(PRINT_ERROR, _T("    CD comms received command %i\n"), NeoCDCommsCommandFIFO[0]);
1805//          //bprintf(PRINT_ERROR, _T("    CD comms received command %i\n"), NeoCDCommsCommandFIFO[0]);
18061806         CDEmuPause();
18071807         break;
18081808      case 5:
1809//         //bprintf(PRINT_ERROR, _T("    CD comms received command %i\n"), NeoCDCommsCommandFIFO[0]);
1810//         NeoCDAssyStatus = 9;
1811//         bNeoCDLoadSector = false;
1809//          //bprintf(PRINT_ERROR, _T("    CD comms received command %i\n"), NeoCDCommsCommandFIFO[0]);
1810//          NeoCDAssyStatus = 9;
1811//          bNeoCDLoadSector = false;
18121812         break;
18131813
18141814      case 6:
1815//         //bprintf(PRINT_ERROR, _T("    CD comms received command %i\n"), NeoCDCommsCommandFIFO[0]);
1815//          //bprintf(PRINT_ERROR, _T("    CD comms received command %i\n"), NeoCDCommsCommandFIFO[0]);
18161816         NeoCDAssyStatus = 4;
18171817         bNeoCDLoadSector = false;
18181818         break;
18191819      case 7:
1820//         //bprintf(PRINT_ERROR, _T("    CD comms received command %i\n"), NeoCDCommsCommandFIFO[0]);
1820//          //bprintf(PRINT_ERROR, _T("    CD comms received command %i\n"), NeoCDCommsCommandFIFO[0]);
18211821         NeoCDAssyStatus = 1;
18221822         bNeoCDLoadSector = true;
18231823         break;
r19030r19031
18301830      case 13:
18311831      case 14:
18321832      case 15:
1833//         //bprintf(PRINT_ERROR, _T("    CD comms received command %i\n"), NeoCDCommsCommandFIFO[0]);
1833//          //bprintf(PRINT_ERROR, _T("    CD comms received command %i\n"), NeoCDCommsCommandFIFO[0]);
18341834         NeoCDAssyStatus = 9;
18351835         bNeoCDLoadSector = false;
18361836         break;
r19030r19031
18531853
18541854                  printf("has command %02x\n", NeoCDCommsCommandFIFO[0]);
18551855
1856//               bprintf(PRINT_NORMAL, _T("  - CD mechanism command receive completed : 0x"));
1856//                  bprintf(PRINT_NORMAL, _T("  - CD mechanism command receive completed : 0x"));
18571857               for (INT32 i = 0; i < 9; i++) {
1858//                  bprintf(PRINT_NORMAL, _T("%X"), NeoCDCommsCommandFIFO[i]);
1858//                      bprintf(PRINT_NORMAL, _T("%X"), NeoCDCommsCommandFIFO[i]);
18591859                  sum += NeoCDCommsCommandFIFO[i];
18601860               }
18611861               sum = ~(sum + 5) & 0x0F;
1862//               bprintf(PRINT_NORMAL, _T(" (CS 0x%X, %s)\n"), NeoCDCommsCommandFIFO[9], (sum == NeoCDCommsCommandFIFO[9]) ? _T("OK") : _T("NG"));
1862//                  bprintf(PRINT_NORMAL, _T(" (CS 0x%X, %s)\n"), NeoCDCommsCommandFIFO[9], (sum == NeoCDCommsCommandFIFO[9]) ? _T("OK") : _T("NG"));
18631863               if (sum == NeoCDCommsCommandFIFO[9]) {
18641864
18651865                  printf("request to process command %02x\n", NeoCDCommsCommandFIFO[0]);
r19030r19031
18921892
18931893            // status send complete
18941894
1895//            if (NeoCDCommsStatusFIFO[0] || NeoCDCommsStatusFIFO[1]) {
1896//               INT32  sum = 0;
1895//              if (NeoCDCommsStatusFIFO[0] || NeoCDCommsStatusFIFO[1]) {
1896//                  INT32  sum = 0;
18971897//
1898//               bprintf(PRINT_NORMAL, _T("  - CD mechanism status send completed : 0x"));
1899//               for (INT32 i = 0; i < 9; i++) {
1900//                  bprintf(PRINT_NORMAL, _T("%X"), NeoCDCommsStatusFIFO[i]);
1901//                  sum += NeoCDCommsStatusFIFO[i];
1902//               }
1903//               sum = ~(sum + 5) & 0x0F;
1904//               bprintf(PRINT_NORMAL, _T(" (CS 0x%X, %s)\n"), NeoCDCommsStatusFIFO[9], (sum == NeoCDCommsStatusFIFO[9]) ? _T("OK") : _T("NG"));
1905//            }
1898//                  bprintf(PRINT_NORMAL, _T("  - CD mechanism status send completed : 0x"));
1899//                  for (INT32 i = 0; i < 9; i++) {
1900//                      bprintf(PRINT_NORMAL, _T("%X"), NeoCDCommsStatusFIFO[i]);
1901//                      sum += NeoCDCommsStatusFIFO[i];
1902//                  }
1903//                  sum = ~(sum + 5) & 0x0F;
1904//                  bprintf(PRINT_NORMAL, _T(" (CS 0x%X, %s)\n"), NeoCDCommsStatusFIFO[9], (sum == NeoCDCommsStatusFIFO[9]) ? _T("OK") : _T("NG"));
1905//              }
19061906
1907//            if (NeoCDAssyStatus == 0xE) {
1908//               NeoCDAssyStatus = 9;
1909//            }
1907//              if (NeoCDAssyStatus == 0xE) {
1908//                  NeoCDAssyStatus = 9;
1909//              }
19101910         }
19111911
19121912      }
r19030r19031
19561956   }
19571957
19581958   return NeoCDSectorData + ((LC8951RegistersW[5] << 8) | LC8951RegistersW[4]);
1959}                 
1959}
19601960
19611961void ng_aes_state::LC8915EndTransfer()
19621962{
r19030r19031
20142014   UINT16 ret = 0x0000;
20152015
20162016
2017   
2017
20182018   if (mem_mask & 0x00ff)
20192019   {
20202020      ret |= neogeoReadTransfer(0xe00000+ (offset*2)+1, is_byte_transfer) & 0xff;
r19030r19031
20382038   {
20392039      neogeoWriteTransfer(0xe00000+ (offset*2), data>>8, is_byte_transfer);
20402040   }
2041   
2041
20422042   if (mem_mask & 0x00ff)
20432043   {
20442044      neogeoWriteTransfer(0xe00000+ (offset*2)+1, data&0xff, is_byte_transfer);
r19030r19031
24262426   AM_RANGE(0x00, 0x00) AM_MIRROR(0xff00) AM_READ(audio_command_r)
24272427   AM_RANGE(0x04, 0x07) AM_MIRROR(0xff00) AM_DEVREADWRITE_LEGACY("ymsnd", ym2610_r, ym2610_w)
24282428   AM_RANGE(0x08, 0x08) AM_MIRROR(0xff00) /* write - NMI enable / acknowledge? (the data written doesn't matter) */
2429//   AM_RANGE(0x08, 0x08) AM_MIRROR(0xfff0) AM_MASK(0xfff0) AM_READ(audio_cpu_bank_select_f000_f7ff_r)
2430//   AM_RANGE(0x09, 0x09) AM_MIRROR(0xfff0) AM_MASK(0xfff0) AM_READ(audio_cpu_bank_select_e000_efff_r)
2431//   AM_RANGE(0x0a, 0x0a) AM_MIRROR(0xfff0) AM_MASK(0xfff0) AM_READ(audio_cpu_bank_select_c000_dfff_r)
2432//   AM_RANGE(0x0b, 0x0b) AM_MIRROR(0xfff0) AM_MASK(0xfff0) AM_READ(audio_cpu_bank_select_8000_bfff_r)
2429//  AM_RANGE(0x08, 0x08) AM_MIRROR(0xfff0) AM_MASK(0xfff0) AM_READ(audio_cpu_bank_select_f000_f7ff_r)
2430//  AM_RANGE(0x09, 0x09) AM_MIRROR(0xfff0) AM_MASK(0xfff0) AM_READ(audio_cpu_bank_select_e000_efff_r)
2431//  AM_RANGE(0x0a, 0x0a) AM_MIRROR(0xfff0) AM_MASK(0xfff0) AM_READ(audio_cpu_bank_select_c000_dfff_r)
2432//  AM_RANGE(0x0b, 0x0b) AM_MIRROR(0xfff0) AM_MASK(0xfff0) AM_READ(audio_cpu_bank_select_8000_bfff_r)
24332433   AM_RANGE(0x0c, 0x0c) AM_MIRROR(0xff00) AM_WRITE(audio_result_w)
24342434   AM_RANGE(0x18, 0x18) AM_MIRROR(0xff00) /* write - NMI disable? (the data written doesn't matter) */
24352435ADDRESS_MAP_END
trunk/src/mess/drivers/altos5.c
r19030r19031
11/***************************************************************************
22
3   Altos 5-15
3    Altos 5-15
44
55****************************************************************************/
66
r19030r19031
1919
2020   DECLARE_READ8_MEMBER(altos_2f_r);
2121   DECLARE_WRITE8_MEMBER( kbd_put );
22   UINT8 m_term_data;   
22   UINT8 m_term_data;
2323   required_device<cpu_device> m_maincpu;
2424   virtual void machine_reset();
2525};
r19030r19031
4848static ADDRESS_MAP_START(altos5_io, AS_IO, 8, altos5_state)
4949   ADDRESS_MAP_GLOBAL_MASK(0xff)
5050   AM_RANGE(0x2e, 0x2e) AM_DEVWRITE(TERMINAL_TAG, generic_terminal_device, write)
51   AM_RANGE(0x2f, 0x2f) AM_READ(altos_2f_r)
51   AM_RANGE(0x2f, 0x2f) AM_READ(altos_2f_r)
5252ADDRESS_MAP_END
5353
5454/* Input ports */
r19030r19031
6767   MCFG_CPU_ADD("maincpu", Z80, XTAL_16MHz / 4)
6868   MCFG_CPU_PROGRAM_MAP(altos5_mem)
6969   MCFG_CPU_IO_MAP(altos5_io)
70   
70
7171   /* video hardware */
72   MCFG_GENERIC_TERMINAL_ADD(TERMINAL_TAG, terminal_intf)   
72   MCFG_GENERIC_TERMINAL_ADD(TERMINAL_TAG, terminal_intf)
7373MACHINE_CONFIG_END
7474
7575
trunk/src/mess/drivers/bw2.c
r19030r19031
367367{
368368   /*
369369
370       PA0     KB0 Keyboard line select 0
371       PA1     KB1 Keyboard line select 1
372       PA2     KB2 Keyboard line select 2
373       PA3     KB3 Keyboard line select 3
374       PA4     /DS0 Drive select 0
375       PA5     /DS1 Drive select 1
376       PA6     Select RS232 connector
377       PA7     /STROBE to centronics printer
370        PA0     KB0 Keyboard line select 0
371        PA1     KB1 Keyboard line select 1
372        PA2     KB2 Keyboard line select 2
373        PA3     KB3 Keyboard line select 3
374        PA4     /DS0 Drive select 0
375        PA5     /DS1 Drive select 1
376        PA6     Select RS232 connector
377        PA7     /STROBE to centronics printer
378378
379   */
379    */
380380
381381   // keyboard
382382   m_kb = data & 0x0f;
r19030r19031
398398{
399399   /*
400400
401       PB0     Keyboard column status of selected line
402       PB1     Keyboard column status of selected line
403       PB2     Keyboard column status of selected line
404       PB3     Keyboard column status of selected line
405       PB4     Keyboard column status of selected line
406       PB5     Keyboard column status of selected line
407       PB6     Keyboard column status of selected line
408       PB7     Keyboard column status of selected line
401        PB0     Keyboard column status of selected line
402        PB1     Keyboard column status of selected line
403        PB2     Keyboard column status of selected line
404        PB3     Keyboard column status of selected line
405        PB4     Keyboard column status of selected line
406        PB5     Keyboard column status of selected line
407        PB6     Keyboard column status of selected line
408        PB7     Keyboard column status of selected line
409409
410   */
410    */
411411
412412   static const char *const rownames[] = { "Y0", "Y1", "Y2", "Y3", "Y4", "Y5", "Y6", "Y7", "Y8", "Y9" };
413413
r19030r19031
425425{
426426   /*
427427
428       PC0     Memory bank select
429       PC1     Memory bank select
430       PC2     Memory bank select
431       PC3     Not connected
428        PC0     Memory bank select
429        PC1     Memory bank select
430        PC2     Memory bank select
431        PC3     Not connected
432432
433   */
433    */
434434
435435   m_bank = data & 0x07;
436436}
r19030r19031
439439{
440440   /*
441441
442       PC4     BUSY from centronics printer
443       PC5     M/FDBK motor feedback
444       PC6     RLSD Carrier detect from RS232
445       PC7     /PROT Write protected disk
442        PC4     BUSY from centronics printer
443        PC5     M/FDBK motor feedback
444        PC6     RLSD Carrier detect from RS232
445        PC7     /PROT Write protected disk
446446
447   */
447    */
448448
449449   UINT8 data = 0;
450450
trunk/src/mess/machine/adam_prn.c
r19030r19031
136136{
137137   /*
138138
139       bit     description
139        bit     description
140140
141       0       M2 phase D
142       1       M2 phase B
143       2       M2 phase C
144       3       M2 phase A
145       4       M3 phase B
146       5       M3 phase D
147       6       M3 phase A
148       7       M3 phase C
141        0       M2 phase D
142        1       M2 phase B
143        2       M2 phase C
144        3       M2 phase A
145        4       M3 phase B
146        5       M3 phase D
147        6       M3 phase A
148        7       M3 phase C
149149
150   */
150    */
151151}
152152
153153
r19030r19031
159159{
160160   /*
161161
162       bit     description
162        bit     description
163163
164       0       mode bit 0
165       1       mode bit 1
166       2       mode bit 2
167       3       NET RXD
168       4       NET TXD
164        0       mode bit 0
165        1       mode bit 1
166        2       mode bit 2
167        3       NET RXD
168        4       NET TXD
169169
170   */
170    */
171171
172172   UINT8 data = M6801_MODE_7;
173173
r19030r19031
186186{
187187   /*
188188
189       bit     description
189        bit     description
190190
191       0       mode bit 0
192       1       mode bit 1
193       2       mode bit 2
194       3       NET RXD
195       4       NET TXD
191        0       mode bit 0
192        1       mode bit 1
193        2       mode bit 2
194        3       NET RXD
195        4       NET TXD
196196
197   */
197    */
198198
199199   m_bus->txd_w(this, BIT(data, 4));
200200}
r19030r19031
218218{
219219   /*
220220
221       bit     description
221        bit     description
222222
223       0
224       1
225       2
226       3
227       4       left margin
228       5       platen detent
229       6       wheel home
230       7       self-test
223        0
224        1
225        2
226        3
227        4       left margin
228        5       platen detent
229        6       wheel home
230        7       self-test
231231
232   */
232    */
233233
234234   return 0x80;
235235}
r19030r19031
243243{
244244   /*
245245
246       bit     description
246        bit     description
247247
248       0       print hammer solenoid
249       1       ribbon advance solenoid
250       2       platen motor advance
251       3       platen motor break
252       4
253       5
254       6
255       7
248        0       print hammer solenoid
249        1       ribbon advance solenoid
250        2       platen motor advance
251        3       platen motor break
252        4
253        5
254        6
255        7
256256
257   */
257    */
258258}
trunk/src/mess/machine/adam_ide.c
r19030r19031
99
1010/*
1111
12   TODO:
12    TODO:
1313
14   - parallel status port
15   - memory bank switching port
16   - boot ROM
14    - parallel status port
15    - memory bank switching port
16    - boot ROM
1717
1818*/
1919
r19030r19031
126126
127127      case 0x40: // Printer status
128128         /*
129         
130             bit     description
131         
132             0       
133             1       
134             2       
135             3       
136             4       
137             5       
138             6       
139             7       
140         
141         */
129
130                bit     description
131
132                0
133                1
134                2
135                3
136                4
137                5
138                6
139                7
140
141            */
142142         break;
143         
143
144144      case 0x58:
145145         m_ide_data = ide_bus_r(m_ide, 0, 0);
146146
147147         data = m_ide_data & 0xff;
148148         break;
149         
149
150150      case 0x59:
151151         data = m_ide_data >> 8;
152152         break;
153         
153
154154      case 0x5a:
155155         data = ide_bus_r(m_ide, 1, 6) & 0xff;
156156         break;
157         
157
158158      case 0x5b: // Digital Input Register
159159         data = 0xff;
160160         break;
r19030r19031
190190
191191      case 0x42: // Bank Number
192192         break;
193         
193
194194      case 0x58:
195195         m_ide_data |= data;
196196         ide_bus_w(m_ide, 0, 0, m_ide_data);
197197         break;
198         
198
199199      case 0x59:
200200         m_ide_data = data << 8;
201201         break;
202         
202
203203      case 0x5a: // Fixed Disk Control Register
204204         break;
205205      }
trunk/src/mess/machine/adam_ddp.c
r19030r19031
166166{
167167   /*
168168
169       bit     description
169        bit     description
170170
171       0       SPD SEL (0=20 ips, 1=80ips)
172       1       STOP0
173       2       STOP1
174       3       _GO FWD
175       4       _GO REV
176       5       BRAKE
177       6       _WR0
178       7       _WR1
171        0       SPD SEL (0=20 ips, 1=80ips)
172        1       STOP0
173        2       STOP1
174        3       _GO FWD
175        4       _GO REV
176        5       BRAKE
177        6       _WR0
178        7       _WR1
179179
180   */
180    */
181181
182182   if (m_ddp0->exists())
183183   {
r19030r19031
211211{
212212   /*
213213
214       bit     description
214        bit     description
215215
216       0       mode bit 0
217       1       mode bit 1 / CIP1
218       2       mode bit 2
219       3       NET RXD
220       4
216        0       mode bit 0
217        1       mode bit 1 / CIP1
218        2       mode bit 2
219        3       NET RXD
220        4
221221
222   */
222    */
223223
224224   UINT8 data = 0;
225225
r19030r19031
243243{
244244   /*
245245
246       bit     description
246        bit     description
247247
248       0       WRT DATA
249       1
250       2       TRACK A/B (0=B, 1=A)
251       3
252       4       NET TXD
248        0       WRT DATA
249        1
250        2       TRACK A/B (0=B, 1=A)
251        3
252        4       NET TXD
253253
254   */
254    */
255255
256256   if (m_ddp0->exists())
257257   {
r19030r19031
278278{
279279   /*
280280
281       bit     description
281        bit     description
282282
283       0       A8
284       1       A9
285       2       A10 (2114 _S)
286       3       MSENSE 0
287       4       MSENSE 1
288       5       CIP0
289       6       RD DATA 0 (always 1)
290       7       RD DATA 1 (data from drives ORed together)
283        0       A8
284        1       A9
285        2       A10 (2114 _S)
286        3       MSENSE 0
287        4       MSENSE 1
288        5       CIP0
289        6       RD DATA 0 (always 1)
290        7       RD DATA 1 (data from drives ORed together)
291291
292   */
292    */
293293
294294   UINT8 data = 0;
295295
trunk/src/mess/machine/adamlink.c
r19030r19031
7777      {
7878      case 0x5e:
7979         break;
80         
80
8181      case 0x5f:
8282         break;
8383      }
trunk/src/mess/machine/adam_fdc.c
r19030r19031
215215{
216216   /*
217217
218       bit     description
218        bit     description
219219
220       0       disk in place
221       1
222       2       FDC DRQ
223       3
224       4
225       5
226       6
227       7       SW3 (0=DS1, 1=DS2)
220        0       disk in place
221        1
222        2       FDC DRQ
223        3
224        4
225        5
226        6
227        7       SW3 (0=DS1, 1=DS2)
228228
229   */
229    */
230230
231231   UINT8 data = 0;
232232
r19030r19031
251251{
252252   /*
253253
254       bit     description
254        bit     description
255255
256       0
257       1       FDC ENP
258       2
259       3       FDC _DDEN
260       4
261       5       DRIVE SELECT
262       6       MOTOR ON
263       7
256        0
257        1       FDC ENP
258        2
259        3       FDC _DDEN
260        4
261        5       DRIVE SELECT
262        6       MOTOR ON
263        7
264264
265   */
265    */
266266
267267   // write precompensation
268268   //m_fdc->enp_w(BIT(data, 1));
r19030r19031
293293{
294294   /*
295295
296       bit     description
296        bit     description
297297
298       0       mode bit 0
299       1       mode bit 1
300       2       mode bit 2
301       3       NET RXD
302       4
298        0       mode bit 0
299        1       mode bit 1
300        2       mode bit 2
301        3       NET RXD
302        4
303303
304   */
304    */
305305
306306   UINT8 data = M6801_MODE_2;
307307
r19030r19031
320320{
321321   /*
322322
323       bit     description
323        bit     description
324324
325       0
326       1
327       2
328       3
329       4       NET TXD
325        0
326        1
327        2
328        3
329        4       NET TXD
330330
331   */
331    */
332332
333333   m_bus->txd_w(this, BIT(data, 4));
334334}
trunk/src/mess/machine/adam_kb.c
r19030r19031
261261{
262262   /*
263263
264       bit     description
264        bit     description
265265
266       0       X0
267       1       X1
268       2       X2
269       3       X3
270       4       X4
271       5       X5
272       6       X6
273       7       X7
266        0       X0
267        1       X1
268        2       X2
269        3       X3
270        4       X4
271        5       X5
272        6       X6
273        7       X7
274274
275   */
275    */
276276
277277   UINT8 data = 0xff;
278278
r19030r19031
302302{
303303   /*
304304
305       bit     description
305        bit     description
306306
307       0       mode bit 0
308       1       mode bit 1
309       2       mode bit 2
310       3       NET RXD
311       4
307        0       mode bit 0
308        1       mode bit 1
309        2       mode bit 2
310        3       NET RXD
311        4
312312
313   */
313    */
314314
315315   UINT8 data = M6801_MODE_7;
316316
r19030r19031
329329{
330330   /*
331331
332       bit     description
332        bit     description
333333
334       0
335       1
336       2
337       3
338       4       NET TXD
334        0
335        1
336        2
337        3
338        4       NET TXD
339339
340   */
340    */
341341
342342   m_bus->txd_w(this, BIT(data, 4));
343343}
r19030r19031
361361{
362362   /*
363363
364       bit     description
364        bit     description
365365
366       0       Y0
367       1       Y1
368       2       Y2
369       3       Y3
370       4       Y4
371       5       Y5
372       6       Y6
373       7       Y7
366        0       Y0
367        1       Y1
368        2       Y2
369        3       Y3
370        4       Y4
371        5       Y5
372        6       Y6
373        7       Y7
374374
375   */
375    */
376376
377377   m_key_y = (m_key_y & 0x1f00) | data;
378378}
r19030r19031
396396{
397397   /*
398398
399       bit     description
399        bit     description
400400
401       0       Y8
402       1       Y9
403       2       Y10
404       3       Y11
405       4       Y12
406       5
407       6
408       7
401        0       Y8
402        1       Y9
403        2       Y10
404        3       Y11
405        4       Y12
406        5
407        6
408        7
409409
410   */
410    */
411411
412412   m_key_y = ((data & 0x1f) << 8) | (m_key_y & 0xff);
413413}
trunk/src/mess/machine/adam_spi.c
r19030r19031
134134{
135135   /*
136136
137       bit     description
137        bit     description
138138
139       0       mode bit 0
140       1       mode bit 1
141       2       mode bit 2
142       3       NET RXD
143       4
139        0       mode bit 0
140        1       mode bit 1
141        2       mode bit 2
142        3       NET RXD
143        4
144144
145   */
145    */
146146
147147   UINT8 data = M6801_MODE_7;
148148
r19030r19031
161161{
162162   /*
163163
164       bit     description
164        bit     description
165165
166       0
167       1
168       2
169       3
170       4       NET TXD
166        0
167        1
168        2
169        3
170        4       NET TXD
171171
172   */
172    */
173173
174174   m_bus->txd_w(this, BIT(data, 4));
175175}
trunk/src/mess/video/isa_cga.c
r19030r19031
20442044      machine().root_device().membank("bank_wy1")->set_base(m_vram);
20452045   }
20462046   if ((m_control & 0xf0) == (mode & 0xf0)) return;
2047   
2047
20482048   switch(mode & 0xf0) {
20492049      case 0xc0: width = 1280; height = 800; break;
20502050      case 0xa0: width = 1280; height = 400; break;
20512051      case 0x80: width = 640; height = 400; break;
20522052      case 0x00: width = 640; height = 400; break; // unhandled
20532053   }
2054   rectangle visarea(0, width-1, 0, height-1);         
2054   rectangle visarea(0, width-1, 0, height-1);
20552055   subdevice<screen_device>(CGA_SCREEN_NAME)->configure(width, height, visarea, HZ_TO_ATTOSECONDS(60));
20562056
20572057}
r19030r19031
21152115      isa8_cga_device( mconfig, ISA8_WYSE700, "Wyse 700", tag, owner, clock )
21162116{
21172117   m_vram_size = 0x20000;
2118   m_start_offset = 0x18000;   
2118   m_start_offset = 0x18000;
21192119}
21202120
21212121
trunk/src/mess/video/isa_cga.h
r19030r19031
205205   virtual DECLARE_WRITE8_MEMBER( io_write );
206206   virtual UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
207207   void change_resolution(UINT8 mode);
208   
208
209209   UINT8 m_bank_offset;
210210   UINT8 m_bank_base;
211211   UINT8 m_control;

Previous 199869 Revisions Next


© 1997-2024 The MAME Team