Previous 199869 Revisions Next

r40637 Monday 7th September, 2015 at 23:05:07 UTC by Peter Ferrie
apple2.c: select displayed page for floating bus (nw)
[3rdparty/googletest/googletest/src]gtest-all.cc
[3rdparty/portaudio/src/common]pa_front.c
[src/mame/drivers]queen.c
[src/mess/drivers]apple2.c

trunk/3rdparty/googletest/googletest/src/gtest-all.cc
r249148r249149
1// Copyright 2008, Google Inc.
1#define _VARIADIC_MAX 10
2    // Copyright 2008, Google Inc.
23// All rights reserved.
34//
45// Redistribution and use in source and binary forms, with or without
trunk/3rdparty/portaudio/src/common/pa_front.c
r249148r249149
123123}
124124
125125static PaVersionInfo versionInfo_ = {
126    .versionMajor = paVersionMajor,
127    .versionMinor = paVersionMinor,
128    .versionSubMinor = paVersionSubMinor,
129    .versionControlRevision = TOSTRING(PA_SVN_REVISION),
130    .versionText = PA_VERSION_TEXT_
126    paVersionMajor,
127    paVersionMinor,
128    paVersionSubMinor,
129    TOSTRING(PA_SVN_REVISION),
130    PA_VERSION_TEXT_
131131};
132132
133133const PaVersionInfo* Pa_GetVersionInfo()
trunk/src/mame/drivers/queen.c
r249148r249149
3232#include "machine/pcshare.h"
3333#include "machine/pckeybrd.h"
3434#include "machine/idectrl.h"
35#include "video/pc_vga.h"
35#include "bus/isa/trident.h"
3636
3737
3838class queen_state : public pcat_base_state
3939{
4040public:
4141   queen_state(const machine_config &mconfig, device_type type, const char *tag)
42      : pcat_base_state(mconfig, type, tag)
42      : pcat_base_state(mconfig, type, tag),
43      m_vga(*this, "vga")
4344   {
4445   }
4546
4647   UINT32 *m_bios_ram;
4748   UINT32 *m_bios_ext_ram;
49
50   required_device<trident_vga_device> m_vga;
51
4852   UINT8 m_mtxc_config_reg[256];
4953   UINT8 m_piix4_config_reg[4][256];
54   UINT8 m_pci_vga_reg[256];
5055
5156   DECLARE_WRITE32_MEMBER( bios_ext_ram_w );
5257
r249148r249149
5459   virtual void machine_start();
5560   virtual void machine_reset();
5661   void intel82439tx_init();
62   void pci_vga_init();
5763};
5864
5965
r249148r249149
7076static void mtxc_config_w(device_t *busdevice, device_t *device, int function, int reg, UINT8 data)
7177{
7278   queen_state *state = busdevice->machine().driver_data<queen_state>();
73   printf("MTXC: write %d, %02X, %02X\n",  function, reg, data);
79//  osd_printf_debug("MXTC: write %d, %02X, %02X\n",  function, reg, data);
7480
7581   /*
7682   memory banking with North Bridge:
r249148r249149
99105
100106void queen_state::intel82439tx_init()
101107{
108   m_mtxc_config_reg[0] = 0x86;
109   m_mtxc_config_reg[1] = 0x80; // Vendor ID, Intel
110   m_mtxc_config_reg[3] = 0x70; // Device ID, MXTC
111
112   m_mtxc_config_reg[0x0b] = 0x06; // PCI Class Bridge
113
102114   m_mtxc_config_reg[0x60] = 0x02;
103115   m_mtxc_config_reg[0x61] = 0x02;
104116   m_mtxc_config_reg[0x62] = 0x02;
r249148r249149
212224   }
213225}
214226
227void queen_state::pci_vga_init()
228{
229   m_pci_vga_reg[0x00] = 0x23;
230   m_pci_vga_reg[0x01] = 0x10;
231   m_pci_vga_reg[0x02] = 0x50;
232   m_pci_vga_reg[0x03] = 0x97; // Trident 3DImage 9750 (seems must be that or the Blade 3D)
233   m_pci_vga_reg[0x04] = 0x01; // PCI_CMD_IO_ENABLE
234   m_pci_vga_reg[0x0b] = 0x03; // PCI class display
235}
215236
237static UINT8 pci_vga_config_r(device_t *busdevice, device_t *device, int function, int reg)
238{
239   queen_state *state = busdevice->machine().driver_data<queen_state>();
240//  osd_printf_debug("%s:PIIX4: write %d, %02X, %02X\n", machine.describe_context(), function, reg, data);
241   return state->m_pci_vga_reg[reg];
242}
243
244static UINT32 pci_vga_r(device_t *busdevice, device_t *device, int function, int reg, UINT32 mem_mask)
245{
246   UINT32 r = 0;
247   if (ACCESSING_BITS_24_31)
248   {
249      r |= pci_vga_config_r(busdevice, device, function, reg + 3) << 24;
250   }
251   if (ACCESSING_BITS_16_23)
252   {
253      r |= pci_vga_config_r(busdevice, device, function, reg + 2) << 16;
254   }
255   if (ACCESSING_BITS_8_15)
256   {
257      r |= pci_vga_config_r(busdevice, device, function, reg + 1) << 8;
258   }
259   if (ACCESSING_BITS_0_7)
260   {
261      r |= pci_vga_config_r(busdevice, device, function, reg + 0) << 0;
262   }
263   return r;
264}
265
266
267static void pci_vga_config_w(device_t *busdevice, device_t *device, int function, int reg, UINT8 data)
268{
269   queen_state *state = busdevice->machine().driver_data<queen_state>();
270//  osd_printf_debug("%s:PIIX4: write %d, %02X, %02X\n", machine.describe_context(), function, reg, data);
271   state->m_pci_vga_reg[reg] = data;
272}
273
274static void pci_vga_w(device_t *busdevice, device_t *device, int function, int reg, UINT32 data, UINT32 mem_mask)
275{
276osd_printf_warning("PCI write: %x %x\n", reg, data);
277   if (ACCESSING_BITS_24_31)
278   {
279      pci_vga_config_w(busdevice, device, function, reg + 3, (data >> 24) & 0xff);
280   }
281   if (ACCESSING_BITS_16_23)
282   {
283      pci_vga_config_w(busdevice, device, function, reg + 2, (data >> 16) & 0xff);
284   }
285   if (ACCESSING_BITS_8_15)
286   {
287      pci_vga_config_w(busdevice, device, function, reg + 1, (data >> 8) & 0xff);
288   }
289   if (ACCESSING_BITS_0_7)
290   {
291      if (reg == 4)
292      {
293         data |= 1; // PCI_CMD_IO_ENABLE
294      }
295
296      pci_vga_config_w(busdevice, device, function, reg + 0, (data >> 0) & 0xff);
297   }
298}
299
216300WRITE32_MEMBER(queen_state::bios_ext_ram_w)
217301{
218302   if (m_mtxc_config_reg[0x63] & 0x40)     // write to RAM if this region is write-enabled
r249148r249149
233317static ADDRESS_MAP_START( queen_map, AS_PROGRAM, 32, queen_state )
234318   AM_RANGE(0x00000000, 0x0009ffff) AM_RAM
235319   AM_RANGE(0x000a0000, 0x000bffff) AM_DEVREADWRITE8("vga", vga_device, mem_r, mem_w, 0xffffffff)
320   AM_RANGE(0x000c0000, 0x000c7fff) AM_ROM AM_REGION("video_bios", 0)
236321   AM_RANGE(0x000e0000, 0x000effff) AM_ROMBANK("bios_ext") AM_WRITE(bios_ext_ram_w)
237322   AM_RANGE(0x000f0000, 0x000fffff) AM_ROMBANK("bios_bank") AM_WRITE(bios_ram_w)
238   AM_RANGE(0x00100000, 0x01ffffff) AM_RAM
323   AM_RANGE(0x00100000, 0x07ffffff) AM_RAM // 128MB RAM
239324   AM_RANGE(0xfffc0000, 0xffffffff) AM_ROM AM_REGION("bios", 0)    /* System BIOS */
240325ADDRESS_MAP_END
241326
r249148r249149
260345   m_bios_ext_ram = auto_alloc_array(machine(), UINT32, 0x10000/4);
261346
262347   intel82439tx_init();
348   pci_vga_init();
263349}
264350
265351void queen_state::machine_reset()
r249148r249149
281367   MCFG_PCI_BUS_LEGACY_ADD("pcibus", 0)
282368   MCFG_PCI_BUS_LEGACY_DEVICE(0, NULL, intel82439tx_pci_r, intel82439tx_pci_w)
283369   MCFG_PCI_BUS_LEGACY_DEVICE(7, NULL, intel82371ab_pci_r, intel82371ab_pci_w)
370   MCFG_PCI_BUS_LEGACY_DEVICE(9, NULL, pci_vga_r, pci_vga_w)
284371
285372   MCFG_IDE_CONTROLLER_ADD("ide", ata_devices, "hdd", NULL, true)
286373   MCFG_ATA_INTERFACE_IRQ_HANDLER(DEVWRITELINE("pic8259_2", pic8259_device, ir6_w))
r249148r249149
289376   MCFG_ATA_INTERFACE_IRQ_HANDLER(DEVWRITELINE("pic8259_2", pic8259_device, ir7_w))
290377
291378   /* video hardware */
292   MCFG_FRAGMENT_ADD( pcvideo_vga )
379   MCFG_FRAGMENT_ADD( pcvideo_trident_vga )
293380MACHINE_CONFIG_END
294381
295382
r249148r249149
299386   ROM_REGION( 0x40000, "bios", 0 )
300387   ROM_LOAD( "bios-original.bin", 0x00000, 0x40000, CRC(feb542d4) SHA1(3cc5d8aeb0e3b7d9ed33248a4f3dc507d29debd9) )
301388
302   ROM_REGION( 0x8000, "video_bios", ROMREGION_ERASEFF ) // TODO: no VGA card is hooked up, to be removed
303//  ROM_LOAD16_BYTE( "trident_tgui9680_bios.bin", 0x0000, 0x4000, BAD_DUMP CRC(1eebde64) SHA1(67896a854d43a575037613b3506aea6dae5d6a19) )
304//  ROM_CONTINUE(                                 0x0001, 0x4000 )
389   ROM_REGION( 0x8000, "video_bios", 0 )
390   ROM_LOAD16_BYTE( "trident_tgui9680_bios.bin", 0x0000, 0x4000, BAD_DUMP CRC(1eebde64) SHA1(67896a854d43a575037613b3506aea6dae5d6a19) )
391   ROM_CONTINUE(                                 0x0001, 0x4000 )
305392
306393   DISK_REGION( "ide:0:hdd:image" )
307394   DISK_IMAGE( "pqiidediskonmodule", 0,SHA1(a56efcc711b1c5a2e63160b3088001a8c4fb56c2) )
trunk/src/mess/drivers/apple2.c
r249148r249149
743743
744744   // machine state switches
745745   //
746   Hires    = m_video->m_hires ? 1 : 0;
746   Hires    = (m_video->m_hires && m_video->m_graphics) ? 1 : 0;
747747   Mixed    = m_video->m_mix ? 1 : 0;
748748   Page2    = m_page2 ? 1 : 0;
749749   _80Store = 0;


Previous 199869 Revisions Next


© 1997-2024 The MAME Team