Skip to content

Commit 06e032a

Browse files
authored
Merge branch 'mamedev:master' into 140426
2 parents 5259b74 + 90bcce5 commit 06e032a

67 files changed

Lines changed: 2683 additions & 2072 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/source/initialsetup/compilingmame.rst

Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -111,23 +111,6 @@ These instructions assume you have some familiarity with MSYS2 and the
111111
* Install packages necessary to build MAME. At the very least, you’ll need
112112
``bash``, ``git`` and ``make``.
113113
* For debugging you may want to install ``gdb``.
114-
* To build the HTML user/developer documentation, you’ll need
115-
``mingw-w64-clang-x86_64-librsvg``, ``mingw-w64-clang-x86_64-python-sphinx``,
116-
``mingw-w64-clang-x86_64-python-sphinx_rtd_theme`` and
117-
``mingw-w64-clang-x86_64-python-sphinxcontrib-svg2pdfconverter`` for a CLANG64
118-
environment (or alternatively ``mingw-w64-clang-aarch64-librsvg``,
119-
``mingw-w64-clang-aarch64-python-sphinx``,
120-
``mingw-w64-clang-aarch64-python-sphinx_rtd_theme`` and
121-
``mingw-w64-clang-aarch64-python-sphinxcontrib-svg2pdfconverter`` a CLANGARM64
122-
environment).
123-
* To build the PDF documentation, you’ll additionally need
124-
``mingw-w64-ucrt-x86_64-texlive-latex-extra`` and
125-
``mingw-w64-ucrt-x86_64-texlive-fonts-recommended`` for a UCRT64 environment,
126-
or ``mingw-w64-clang-x86_64-texlive-latex-extra`` and
127-
``mingw-w64-clang-x86_64-texlive-fonts-recommended`` for a CLANG64
128-
environment. You must build the PDF documentation using the UCRT64 or CLANG64
129-
environment as the TeX Live tools currently do not work with the CLANGARM64
130-
environment.
131114
* To generate API documentation from source, you’ll need ``doxygen``.
132115
* If you plan to rebuild bgfx shaders and you want to rebuild the GLSL parser,
133116
you’ll need ``bison``.
@@ -148,6 +131,13 @@ building for.
148131
* To build against the portable SDL interfaces, you’ll need
149132
``mingw-w64-ucrt-x86_64-SDL2`` and ``mingw-w64-ucrt-x86_64-SDL2_ttf``.
150133
* To build the Qt debugger, you’ll need ``mingw-w64-ucrt-x86_64-qt6-base``.
134+
* To build the HTML user/developer documentation, you’ll need
135+
``mingw-w64-ucrt-x86_64-librsvg``, ``mingw-w64-ucrt-x86_64-python-sphinx``,
136+
``mingw-w64-ucrt-x86_64-python-sphinx_rtd_theme`` and
137+
``mingw-w64-ucrt-x86_64-python-sphinxcontrib-svg2pdfconverter``.
138+
* To build the PDF documentation, you’ll additionally need
139+
``mingw-w64-ucrt-x86_64-texlive-latex-extra`` and
140+
``mingw-w64-ucrt-x86_64-texlive-fonts-recommended``.
151141
* Open the **ucrt64.exe** helper from the **msys64** installation folder or the
152142
**MSYS2 UCRT64** shortcut from the start menu to start a Bash shell configured
153143
with the correct paths and environment variables.
@@ -163,6 +153,13 @@ building for.
163153
* To build against the portable SDL interfaces, you’ll need
164154
``mingw-w64-clang-x86_64-SDL2`` and ``mingw-w64-clang-x86_64-SDL2_ttf``.
165155
* To build the Qt debugger, you’ll need ``mingw-w64-clang-x86_64-qt6-base``.
156+
* To build the HTML user/developer documentation, you’ll need
157+
``mingw-w64-clang-x86_64-librsvg``, ``mingw-w64-clang-x86_64-python-sphinx``,
158+
``mingw-w64-clang-x86_64-python-sphinx_rtd_theme`` and
159+
``mingw-w64-clang-x86_64-python-sphinxcontrib-svg2pdfconverter``.
160+
* To build the PDF documentation, you’ll additionally need
161+
``mingw-w64-clang-x86_64-texlive-latex-extra`` and
162+
``mingw-w64-clang-x86_64-texlive-fonts-recommended``.
166163
* Open the **clang64.exe** helper from the **msys64** installation folder or use
167164
the **MSYS2 CLANG64** shortcut to start a Bash shell configured with the
168165
correct paths and environment variables.
@@ -178,6 +175,15 @@ building for.
178175
* To build against the portable SDL interfaces, you’ll need
179176
``mingw-w64-clang-aarch64-SDL2`` and ``mingw-w64-clang-aarch64-SDL2_ttf``.
180177
* To build the Qt debugger, you’ll need ``mingw-w64-clang-aarch64-qt6-base``.
178+
* To build the HTML user/developer documentation, you’ll need
179+
``mingw-w64-clangarm64-x86_64-librsvg``,
180+
``mingw-w64-clangarm64-x86_64-python-sphinx``,
181+
``mingw-w64-clangarm64-x86_64-python-sphinx_rtd_theme`` and
182+
``mingw-w64-clangarm64-x86_64-python-sphinxcontrib-svg2pdfconverter``.
183+
* It is not currently possible to build the PDF documentation using the
184+
CLANGARM64 environment as the TeX Live tools do not work. You may be able
185+
to use the UCRT64 or CLANG64 environment to build the PDF documentation on a
186+
64-bit ARM system.
181187
* Open the **clangarm64.exe** helper from the **msys64** installation folder or
182188
use the **MSYS2 CLANGARM64** shortcut to start a Bash shell configured with
183189
the correct paths and environment variables.
@@ -457,7 +463,7 @@ can install these packages with
457463
pacman -S mingw-w64-x86_64-librsvg mingw-w64-x86_64-python-sphinx mingw-w64-x86_64-python-sphinxcontrib-svg2pdfconverter
458464
459465
If you intend to make a PDF via LaTeX, you’ll need to install a LaTeX
460-
distribution such as TeX Live:
466+
distribution such as TeX Live:
461467

462468
.. code-block:: bash
463469
@@ -483,7 +489,7 @@ On Debian, you’ll need to install the **librsvg2-bin** package:
483489
sudo apt-get install librsvg2-bin
484490
485491
If you intend to make a PDF via LaTeX, you’ll need to install a LaTeX
486-
distribution such as TeX Live:
492+
distribution such as TeX Live:
487493

488494
.. code-block:: bash
489495

src/devices/bus/cbmiec/c1526.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
//**************************************************************************
2525

2626
DEFINE_DEVICE_TYPE(C1526, c1526_device, "c1526", "Commodore 1526/MPS-802 Dot Matrix Printer")
27-
DEFINE_DEVICE_TYPE(C4023, c4023_device, "c4023", "Commodore 4023 Printer")
27+
DEFINE_DEVICE_TYPE(GPIB_C4023, c4023_device, "c4023", "Commodore 4023 Printer")
2828

2929

3030
//-------------------------------------------------
@@ -173,7 +173,7 @@ c1526_device::c1526_device(const machine_config &mconfig, const char *tag, devic
173173
//-------------------------------------------------
174174

175175
c4023_device::c4023_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
176-
c1526_device_base(mconfig, C4023, tag, owner, clock),
176+
c1526_device_base(mconfig, GPIB_C4023, tag, owner, clock),
177177
device_ieee488_interface(mconfig, *this)
178178
{
179179
}

src/devices/bus/cbmiec/c1526.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class c4023_device : public c1526_device_base, public device_ieee488_interface
7979

8080
// device type definition
8181
DECLARE_DEVICE_TYPE(C1526, c1526_device)
82-
DECLARE_DEVICE_TYPE(C4023, c4023_device)
82+
DECLARE_DEVICE_TYPE(GPIB_C4023, c4023_device)
8383

8484

8585
#endif // MAME_BUS_CBMIEC_C1526_H

src/devices/bus/ieee488/c2031.cpp

Lines changed: 78 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,22 @@
99
#include "emu.h"
1010
#include "c2031.h"
1111

12+
#include "cpu/m6502/m6502.h"
13+
#include "imagedev/floppy.h"
14+
#include "machine/64h156.h"
15+
#include "machine/6522via.h"
16+
1217
#include "formats/d64_dsk.h"
1318
#include "formats/g64_dsk.h"
1419

1520

21+
namespace {
22+
1623
//**************************************************************************
1724
// MACROS / CONSTANTS
1825
//**************************************************************************
1926

2027
#define M6502_TAG "ucd5"
21-
#define M6522_0_TAG "uab1"
22-
#define M6522_1_TAG "ucd4"
2328
#define C64H156_TAG "64h156"
2429

2530

@@ -32,10 +37,65 @@ enum
3237

3338

3439
//**************************************************************************
35-
// DEVICE DEFINITIONS
40+
// TYPE DEFINITIONS
3641
//**************************************************************************
3742

38-
DEFINE_DEVICE_TYPE(C2031, c2031_device, "c2031", "Commodore 2031")
43+
// ======================> c2031_device
44+
45+
class c2031_device : public device_t,
46+
public device_ieee488_interface
47+
{
48+
public:
49+
// construction/destruction
50+
c2031_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
51+
52+
protected:
53+
// device_t implementation
54+
virtual void device_start() override ATTR_COLD;
55+
virtual void device_reset() override ATTR_COLD;
56+
virtual const tiny_rom_entry *device_rom_region() const override ATTR_COLD;
57+
virtual void device_add_mconfig(machine_config &config) override ATTR_COLD;
58+
virtual ioport_constructor device_input_ports() const override ATTR_COLD;
59+
60+
// device_ieee488_interface implementation
61+
virtual void ieee488_atn(int state) override;
62+
virtual void ieee488_ifc(int state) override;
63+
64+
private:
65+
inline int get_device_number();
66+
67+
void via0_irq_w(int state);
68+
uint8_t via0_pa_r();
69+
void via0_pa_w(uint8_t data);
70+
uint8_t via0_pb_r();
71+
void via0_pb_w(uint8_t data);
72+
void via1_irq_w(int state);
73+
uint8_t via1_pb_r();
74+
void via1_pb_w(uint8_t data);
75+
void byte_w(int state);
76+
77+
void c2031_mem(address_map &map) ATTR_COLD;
78+
79+
static void floppy_formats(format_registration &fr);
80+
81+
required_device<m6502_device> m_maincpu;
82+
required_device<via6522_device> m_via0;
83+
required_device<via6522_device> m_via1;
84+
required_device<c64h156_device> m_ga;
85+
required_device<floppy_image_device> m_floppy;
86+
required_ioport m_address;
87+
output_finder<2> m_leds;
88+
89+
// IEEE-488 bus
90+
int m_nrfd_out; // not ready for data
91+
int m_ndac_out; // not data accepted
92+
int m_atna; // attention acknowledge
93+
int m_ifc;
94+
95+
// interrupts
96+
int m_via0_irq; // VIA #0 interrupt request
97+
int m_via1_irq; // VIA #1 interrupt request
98+
};
3999

40100

41101
//-------------------------------------------------
@@ -66,8 +126,8 @@ const tiny_rom_entry *c2031_device::device_rom_region() const
66126
void c2031_device::c2031_mem(address_map &map)
67127
{
68128
map(0x0000, 0x07ff).mirror(0x6000).ram();
69-
map(0x1800, 0x180f).mirror(0x63f0).m(M6522_0_TAG, FUNC(via6522_device::map));
70-
map(0x1c00, 0x1c0f).mirror(0x63f0).m(M6522_1_TAG, FUNC(via6522_device::map));
129+
map(0x1800, 0x180f).mirror(0x63f0).m(m_via0, FUNC(via6522_device::map));
130+
map(0x1c00, 0x1c0f).mirror(0x63f0).m(m_via1, FUNC(via6522_device::map));
71131
map(0x8000, 0xbfff).mirror(0x4000).rom().region(M6502_TAG, 0);
72132
}
73133

@@ -388,11 +448,11 @@ inline int c2031_device::get_device_number()
388448
//-------------------------------------------------
389449

390450
c2031_device::c2031_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
391-
: device_t(mconfig, C2031, tag, owner, clock)
451+
: device_t(mconfig, GPIB_C2031, tag, owner, clock)
392452
, device_ieee488_interface(mconfig, *this)
393453
, m_maincpu(*this, M6502_TAG)
394-
, m_via0(*this, M6522_0_TAG)
395-
, m_via1(*this, M6522_1_TAG)
454+
, m_via0(*this, "uab1")
455+
, m_via1(*this, "ucd4")
396456
, m_ga(*this, C64H156_TAG)
397457
, m_floppy(*this, C64H156_TAG":0:525ssqd")
398458
, m_address(*this, "ADDRESS")
@@ -473,3 +533,12 @@ void c2031_device::ieee488_ifc(int state)
473533

474534
m_ifc = state;
475535
}
536+
537+
} // anonymous namespace
538+
539+
540+
//**************************************************************************
541+
// DEVICE DEFINITIONS
542+
//**************************************************************************
543+
544+
DEFINE_DEVICE_TYPE_PRIVATE(GPIB_C2031, device_ieee488_interface, c2031_device, "c2031", "Commodore 2031 single disk drive")

src/devices/bus/ieee488/c2031.h

Lines changed: 1 addition & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -12,79 +12,10 @@
1212
#pragma once
1313

1414
#include "ieee488.h"
15-
#include "cpu/m6502/m6502.h"
16-
#include "imagedev/floppy.h"
17-
#include "machine/64h156.h"
18-
#include "machine/6522via.h"
1915

2016

2117

22-
//**************************************************************************
23-
// TYPE DEFINITIONS
24-
//**************************************************************************
25-
26-
// ======================> c2031_device
27-
28-
class c2031_device : public device_t,
29-
public device_ieee488_interface
30-
{
31-
public:
32-
// construction/destruction
33-
c2031_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
34-
35-
protected:
36-
// device-level overrides
37-
virtual void device_start() override ATTR_COLD;
38-
virtual void device_reset() override ATTR_COLD;
39-
40-
// optional information overrides
41-
virtual const tiny_rom_entry *device_rom_region() const override ATTR_COLD;
42-
virtual void device_add_mconfig(machine_config &config) override ATTR_COLD;
43-
virtual ioport_constructor device_input_ports() const override ATTR_COLD;
44-
45-
// device_ieee488_interface overrides
46-
virtual void ieee488_atn(int state) override;
47-
virtual void ieee488_ifc(int state) override;
48-
49-
private:
50-
inline int get_device_number();
51-
52-
void via0_irq_w(int state);
53-
uint8_t via0_pa_r();
54-
void via0_pa_w(uint8_t data);
55-
uint8_t via0_pb_r();
56-
void via0_pb_w(uint8_t data);
57-
void via1_irq_w(int state);
58-
uint8_t via1_pb_r();
59-
void via1_pb_w(uint8_t data);
60-
void byte_w(int state);
61-
62-
void c2031_mem(address_map &map) ATTR_COLD;
63-
64-
static void floppy_formats(format_registration &fr);
65-
66-
required_device<m6502_device> m_maincpu;
67-
required_device<via6522_device> m_via0;
68-
required_device<via6522_device> m_via1;
69-
required_device<c64h156_device> m_ga;
70-
required_device<floppy_image_device> m_floppy;
71-
required_ioport m_address;
72-
output_finder<2> m_leds;
73-
74-
// IEEE-488 bus
75-
int m_nrfd_out; // not ready for data
76-
int m_ndac_out; // not data accepted
77-
int m_atna; // attention acknowledge
78-
int m_ifc;
79-
80-
// interrupts
81-
int m_via0_irq; // VIA #0 interrupt request
82-
int m_via1_irq; // VIA #1 interrupt request
83-
};
84-
85-
86-
// device type definition
87-
DECLARE_DEVICE_TYPE(C2031, c2031_device)
18+
DECLARE_DEVICE_TYPE(GPIB_C2031, device_ieee488_interface)
8819

8920

9021
#endif // MAME_BUS_IEEE488_C2031_H

0 commit comments

Comments
 (0)