Previous 15994 Revisions Next

r11106 Thursday 7th April, 2011 at 13:56:59 UTC by Miodrag Milanović
Removed adlib/gameblaster leftovers from at.c (no whatsnew)
[src/mess/drivers]at.c

src/mess/drivers/at.c
r11105r11106
1313#include "cpu/i86/i86.h"
1414#include "cpu/i86/i286.h"
1515#include "cpu/i386/i386.h"
16#include "sound/3812intf.h"
16
1717#include "machine/i8255a.h"
1818#include "machine/ins8250.h"
1919#include "machine/mc146818.h"
r11105r11106
4747
4848#include "sound/dac.h"
4949#include "sound/speaker.h"
50#include "sound/saa1099.h"
5150#include "machine/ram.h"
5251#include "machine/nvram.h"
5352#include "memconv.h"
5453
5554
56#define ym3812_StdClock 3579545
57
58/*
59  adlib (YM3812/OPL2 chip), part of many many soundcards (soundblaster)
60  soundblaster: YM3812 also accessible at 0x228/9 (address jumperable)
61  soundblaster pro version 1: 2 YM3812 chips
62   at 0x388 both accessed,
63   at 0x220/1 left?, 0x222/3 right? (jumperable)
64  soundblaster pro version 2: 1 OPL3 chip
65
66  pro audio spectrum +: 2 OPL2
67  pro audio spectrum 16: 1 OPL3
68 */
69#define ADLIB   /* YM3812/OPL2 Chip */
70/*
71  creativ labs game blaster (CMS creativ music system)
72  2 x saa1099 chips
73  also on sound blaster 1.0
74  option on sound blaster 1.5
75
76  jumperable? normally 0x220
77*/
78#define GAMEBLASTER
79
8055static ADDRESS_MAP_START( at16_map, AS_PROGRAM, 16 )
8156   AM_RANGE(0x000000, 0x09ffff) AM_MIRROR(0xff000000) AM_RAMBANK("bank10")
8257   AM_RANGE(0x0c0000, 0x0c7fff) AM_ROM
r11105r11106
125100   i8237_w( device, offset / 2, data);
126101}
127102
128static READ16_DEVICE_HANDLER( at16_388_r )
129{
130   if ( ACCESSING_BITS_0_7 )
131   {
132      return 0xFF;
133   }
134   else
135   {
136      return ym3812_status_port_r( device, offset );
137   }
138}
139
140
141static WRITE16_DEVICE_HANDLER( at16_388_w )
142{
143   if ( ACCESSING_BITS_0_7 )
144   {
145      ym3812_write_port_w( device, offset, data );
146   }
147   else
148   {
149      ym3812_control_port_w( device, offset, data );
150   }
151}
152
153103static READ8_HANDLER( at_keybc_r )
154104{
155105   switch (offset)
r11105r11106
187137   AM_RANGE(0x02e8, 0x02ef) AM_DEVREADWRITE8("ns16450_3", ins8250_r, ins8250_w, 0xffff)
188138   AM_RANGE(0x02f8, 0x02ff) AM_DEVREADWRITE8("ns16450_1", ins8250_r, ins8250_w, 0xffff)
189139   AM_RANGE(0x0378, 0x037f) AM_DEVREADWRITE8("lpt_1", pc_lpt_r, pc_lpt_w, 0x00ff)
190#ifdef ADLIB
191   AM_RANGE(0x0388, 0x0389) AM_DEVREADWRITE("ym3812", at16_388_r, at16_388_w )
192#endif
193140   AM_RANGE(0x03bc, 0x03bf) AM_DEVREADWRITE8("lpt_0", pc_lpt_r, pc_lpt_w, 0x00ff)
194141   AM_RANGE(0x03e8, 0x03ef) AM_DEVREADWRITE8("ns16450_2", ins8250_r, ins8250_w, 0xffff)
195142   AM_RANGE(0x03f0, 0x03f7) AM_READWRITE8(pc_fdc_r,                 pc_fdc_w, 0xffff)
r11105r11106
313260   AM_RANGE(0x02e8, 0x02ef) AM_READWRITE(uart8250_3_r,            uart8250_3_w)
314261   AM_RANGE(0x02f8, 0x02ff) AM_READWRITE(uart8250_1_r,            uart8250_1_w)
315262   AM_RANGE(0x0378, 0x037f) AM_READWRITE(pc_parallelport1_r,      pc_parallelport1_w)
316#ifdef ADLIB
317   AM_RANGE(0x0388, 0x0388) AM_DEVREADWRITE("ym3812", ym3812_status_port_r,ym3812_control_port_w)
318   AM_RANGE(0x0389, 0x0389) AM_DEVWRITE("ym3812", ym3812_write_port_w)
319#endif
320263   AM_RANGE(0x03bc, 0x03be) AM_READWRITE(pc_parallelport0_r,      pc_parallelport0_w)
321264   AM_RANGE(0x03e8, 0x03ef) AM_READWRITE(uart8250_2_r,            uart8250_2_w)
322265   AM_RANGE(0x03f0, 0x03f7) AM_READWRITE(pc_fdc_r,               pc_fdc_w)
r11105r11106
509452static const unsigned i286_address_mask = 0x00ffffff;
510453
511454
512#if defined(ADLIB)
513static const ym3812_interface at_ym3812_interface =
514{
515   /* irq line not connected to pc on adlib cards (and compatibles) */
516   NULL
517};
518#endif
519
520455static const pc_lpt_interface at_lpt_config =
521456{
522457   DEVCB_CPU_INPUT_LINE("maincpu", 0)
r11105r11106
583518   MCFG_SPEAKER_STANDARD_MONO("mono")
584519   MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
585520   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
586#ifdef ADLIB
587   MCFG_SOUND_ADD("ym3812", YM3812, ym3812_StdClock)
588   MCFG_SOUND_CONFIG(at_ym3812_interface)
589   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
590#endif
591#ifdef GAMEBLASTER
592   MCFG_SOUND_ADD("saa1099.1", SAA1099, 8000000)   /* running at 8 MHz ISA bus speed? */
593   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
594   MCFG_SOUND_ADD("saa1099.2", SAA1099, 8000000)
595   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
596#endif
597521
598522   MCFG_AT_KEYBOARD_CONTROLLER_ADD("keybc", XTAL_12MHz, keyboard_controller_intf)
599523   MCFG_KB_KEYTRONIC_ADD("keyboard", at_keytronic_intf)
r11105r11106
664588   MCFG_SPEAKER_STANDARD_MONO("mono")
665589   MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
666590   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
667#ifdef ADLIB
668   MCFG_SOUND_ADD("ym3812", YM3812, ym3812_StdClock)
669   MCFG_SOUND_CONFIG(at_ym3812_interface)
670   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
671#endif
672591
673592   MCFG_AT_KEYBOARD_CONTROLLER_ADD("keybc", XTAL_12MHz, keyboard_controller_intf)
674593   MCFG_KB_KEYTRONIC_ADD("keyboard", at_keytronic_intf)
r11105r11106
724643   MCFG_SPEAKER_STANDARD_MONO("mono")
725644   MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
726645   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
727#ifdef ADLIB
728   MCFG_SOUND_ADD("ym3812", YM3812, ym3812_StdClock)
729   MCFG_SOUND_CONFIG(at_ym3812_interface)
730   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
731#endif
732#ifdef GAMEBLASTER
733   MCFG_SOUND_ADD("saa1099.1", SAA1099, 8000000)   /* running at 8 MHz ISA bus speed? */
734   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
735   MCFG_SOUND_ADD("saa1099.2", SAA1099, 8000000)
736   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
737#endif
738646
739647   MCFG_AT_KEYBOARD_CONTROLLER_ADD("keybc", XTAL_12MHz, keyboard_controller_intf)
740648   MCFG_KB_KEYTRONIC_ADD("keyboard", at_keytronic_intf)
r11105r11106
790698   MCFG_SPEAKER_STANDARD_MONO("mono")
791699   MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
792700   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
793#ifdef ADLIB
794   MCFG_SOUND_ADD("ym3812", YM3812, ym3812_StdClock)
795   MCFG_SOUND_CONFIG(at_ym3812_interface)
796   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
797#endif
798#ifdef GAMEBLASTER
799   MCFG_SOUND_ADD("saa1099.1", SAA1099, 8000000)   /* running at 8 MHz ISA bus speed? */
800   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
801   MCFG_SOUND_ADD("saa1099.2", SAA1099, 8000000)
802   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
803#endif
701
804702   MCFG_SOUND_ADD("dac", DAC, 0)
805703   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
806704
r11105r11106
859757   MCFG_SPEAKER_STANDARD_MONO("mono")
860758   MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
861759   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
862#ifdef ADLIB
863   MCFG_SOUND_ADD("ym3812", YM3812, ym3812_StdClock)
864   MCFG_SOUND_CONFIG(at_ym3812_interface)
865   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
866#endif
867#ifdef GAMEBLASTER
868   MCFG_SOUND_ADD("saa1099.1", SAA1099, 8000000)   /* running at 8 MHz ISA bus speed? */
869   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
870   MCFG_SOUND_ADD("saa1099.2", SAA1099, 8000000)
871   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
872#endif
760
873761   MCFG_SOUND_ADD("dac", DAC, 0)
874762   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
875763

Previous 15994 Revisions Next


© 1998-2018 The MESS Team