Previous 15994 Revisions Next

r15483 Tuesday 19th June, 2012 at 14:38:02 UTC by Miodrag Milanović
added northbridge (no whatsnew)
[src/mess]mess.mak
[src/mess/drivers]at.c
[src/mess/machine]northbridge.c* northbridge.h* southbridge.c southbridge.h

src/mess/machine/northbridge.c
r0r15483
1/***************************************************************************
2
3  Northbridge implementation
4
5***************************************************************************/
6
7#include "emu.h"
8#include "machine/northbridge.h"
9
10//**************************************************************************
11//  GLOBAL VARIABLES
12//**************************************************************************
13
14const device_type NORTHBRIDGE = &device_creator<northbridge_device>;
15
16northbridge_device::northbridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
17   : device_t(mconfig, NORTHBRIDGE, "Northbridge", tag, owner, clock),
18   m_maincpu(*this, ":maincpu"),
19   m_ram(*this, ":" RAM_TAG)
20{
21}
22
23//-------------------------------------------------
24//  device_start - device-specific startup
25//-------------------------------------------------
26
27void northbridge_device::device_start()
28{
29   address_space* space = machine().device(":maincpu")->memory().space(AS_PROGRAM);
30
31   machine().root_device().membank("bank10")->set_base(m_ram->pointer());
32
33   if (m_ram->size() > 0x0a0000)
34   {
35      offs_t ram_limit = 0x100000 + m_ram->size() - 0x0a0000;
36      space->install_read_bank(0x100000,  ram_limit - 1, "bank1");
37      space->install_write_bank(0x100000,  ram_limit - 1, "bank1");
38      machine().root_device().membank("bank1")->set_base(m_ram->pointer() + 0xa0000);
39   }
40}
41
42//-------------------------------------------------
43//  device_reset - device-specific reset
44//-------------------------------------------------
45
46void northbridge_device::device_reset()
47{
48}
src/mess/machine/northbridge.h
r0r15483
1#pragma once
2
3#ifndef __NORTHBRIDGE_H__
4#define __NORTHBRIDGE_H__
5
6#include "emu.h"
7
8#include "machine/ram.h"
9
10//**************************************************************************
11//  TYPE DEFINITIONS
12//**************************************************************************
13
14// ======================> northbridge_device
15
16class northbridge_device :
17       public device_t
18{
19public:
20      // construction/destruction
21        northbridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
22
23protected:
24        // device-level overrides
25        virtual void device_start();
26        virtual void device_reset();
27public:
28      required_device<cpu_device> m_maincpu;
29      required_device<ram_device> m_ram;
30
31};
32
33
34// device type definition
35extern const device_type NORTHBRIDGE;
36
37#endif  /* __NORTHBRIDGE_H__ */
No newline at end of file
src/mess/machine/southbridge.c
r15482r15483
201201   m_keybc(*this, "keybc"),
202202   m_isabus(*this, "isabus"),
203203   m_speaker(*this, SPEAKER_TAG),
204   m_ram(*this, ":" RAM_TAG),
205204   m_mc146818(*this, "rtc"),
206205   m_pc_kbdc(*this, "pc_kbdc")
207206{
r15482r15483
225224
226225void southbridge_device::device_start()
227226{
228   address_space* space = machine().device(":maincpu")->memory().space(AS_PROGRAM);
229
230   machine().root_device().membank("bank10")->set_base(m_ram->pointer());
231
232   if (m_ram->size() > 0x0a0000)
233   {
234      offs_t ram_limit = 0x100000 + m_ram->size() - 0x0a0000;
235      space->install_read_bank(0x100000,  ram_limit - 1, "bank1");
236      space->install_write_bank(0x100000,  ram_limit - 1, "bank1");
237      machine().root_device().membank("bank1")->set_base(m_ram->pointer() + 0xa0000);
238   }
239227   address_space* spaceio = machine().device(":maincpu")->memory().space(AS_IO);
240228   
241229   spaceio->install_legacy_readwrite_handler(*m_dma8237_1, 0x0000, 0x001f, FUNC(i8237_r), FUNC(i8237_w), 0xffffffff);
src/mess/machine/southbridge.h
r15482r15483
8484      required_device<at_keyboard_controller_device> m_keybc;
8585      required_device<isa16_device> m_isabus;
8686      required_device<device_t> m_speaker;
87      required_device<ram_device> m_ram;
8887      required_device<mc146818_device> m_mc146818;
8988      required_device<pc_kbdc_device> m_pc_kbdc;
9089      DECLARE_READ8_MEMBER(at_page8_r);
src/mess/drivers/at.c
r15482r15483
1212
1313#include "includes/at.h"
1414#include "machine/pc_keyboards.h"
15#include "machine/northbridge.h"
1516#include "machine/southbridge.h"
1617
1718
r15482r15483
628629   MCFG_RAM_DEFAULT_SIZE("4M")
629630   MCFG_RAM_EXTRA_OPTIONS("1M,2M,8M,16M,32M,64M")
630631
631   MCFG_DEVICE_ADD("sb",SOUTHBRIDGE,0);   
632   MCFG_DEVICE_ADD("nb",NORTHBRIDGE,0)
633   MCFG_DEVICE_ADD("sb",SOUTHBRIDGE,0)
632634
633635   MCFG_PCI_BUS_ADD("pcibus", 0)   
634636   MCFG_PCI_BUS_DEVICE("pcibus:0", pci_devices, "i82439tx", NULL, &tx_config, 0, true)
r15482r15483
651653   MCFG_RAM_DEFAULT_SIZE("4M")
652654   MCFG_RAM_EXTRA_OPTIONS("1M,2M,8M,16M,32M,64M")
653655
654   MCFG_DEVICE_ADD("sb",SOUTHBRIDGE,0);
656   MCFG_DEVICE_ADD("nb",NORTHBRIDGE,0)
657   MCFG_DEVICE_ADD("sb",SOUTHBRIDGE,0)
655658   
656659   MCFG_PCI_BUS_ADD("pcibus", 0)
657660   MCFG_PCI_BUS_DEVICE("pcibus:0", pci_devices, "i82439tx", NULL, &tx_config, 0, true)
src/mess/mess.mak
r15482r15483
722722   $(MESS_MACHINE)/cs8221.o   \
723723   $(MESS_MACHINE)/at.o      \
724724   $(MESS_DRIVERS)/at.o      \
725   $(MESS_MACHINE)/northbridge.o \
725726   $(MESS_MACHINE)/southbridge.o \
726727
727728$(MESSOBJ)/atari.a:            \

Previous 15994 Revisions Next


© 1998-2018 The MESS Team