Skip to content

Commit 30c61d6

Browse files
committed
Merge branch 'i8256_clock' of https://github.com/stonedDiscord/mame into i8256_clock
2 parents d7c3d57 + 48a137f commit 30c61d6

File tree

576 files changed

+31225
-22292
lines changed

Some content is hidden

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

576 files changed

+31225
-22292
lines changed

dist.mak

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -7,39 +7,30 @@
77
###########################################################################
88

99
ifeq ($(OS),Windows_NT)
10-
OS := windows
10+
OS := windows
1111
else
12-
UNAME := $(shell uname -mps)
13-
ifeq ($(firstword $(filter Linux,$(UNAME))),Linux)
14-
OS := linux
15-
endif
16-
ifeq ($(firstword $(filter Solaris,$(UNAME))),Solaris)
17-
OS := solaris
18-
endif
19-
ifeq ($(firstword $(filter SunOS,$(UNAME))),SunOS)
20-
OS := solaris
21-
endif
22-
ifeq ($(firstword $(filter FreeBSD,$(UNAME))),FreeBSD)
23-
OS := freebsd
24-
endif
25-
ifeq ($(firstword $(filter GNU/kFreeBSD,$(UNAME))),GNU/kFreeBSD)
26-
OS := freebsd
27-
endif
28-
ifeq ($(firstword $(filter NetBSD,$(UNAME))),NetBSD)
29-
OS := netbsd
30-
endif
31-
ifeq ($(firstword $(filter OpenBSD,$(UNAME))),OpenBSD)
32-
OS := openbsd
33-
endif
34-
ifeq ($(firstword $(filter Darwin,$(UNAME))),Darwin)
35-
OS := osx
36-
endif
37-
ifeq ($(firstword $(filter Haiku,$(UNAME))),Haiku)
38-
OS := haiku
39-
endif
40-
ifndef OS
41-
$(error Unable to detect OS from uname -a: $(UNAME))
42-
endif
12+
UNAME := $(shell uname -mps)
13+
ifeq ($(firstword $(filter Linux,$(UNAME))),Linux)
14+
OS := linux
15+
else ifeq ($(firstword $(filter Solaris,$(UNAME))),Solaris)
16+
OS := solaris
17+
else ifeq ($(firstword $(filter SunOS,$(UNAME))),SunOS)
18+
OS := solaris
19+
else ifeq ($(firstword $(filter FreeBSD,$(UNAME))),FreeBSD)
20+
OS := freebsd
21+
else ifeq ($(firstword $(filter GNU/kFreeBSD,$(UNAME))),GNU/kFreeBSD)
22+
OS := freebsd
23+
else ifeq ($(firstword $(filter NetBSD,$(UNAME))),NetBSD)
24+
OS := netbsd
25+
else ifeq ($(firstword $(filter OpenBSD,$(UNAME))),OpenBSD)
26+
OS := openbsd
27+
else ifeq ($(firstword $(filter Darwin,$(UNAME))),Darwin)
28+
OS := osx
29+
else ifeq ($(firstword $(filter Haiku,$(UNAME))),Haiku)
30+
OS := haiku
31+
else ifndef OS
32+
$(error Unable to detect OS from uname -a: $(UNAME))
33+
endif
4334
endif
4435

4536
ifndef TARGETOS
@@ -48,14 +39,16 @@ endif
4839

4940
EXE :=
5041
ifeq ($(OS),windows)
51-
EXE := .exe
52-
PROJECTTYPE := mingw-gcc
42+
EXE := .exe
43+
ifeq ($(MSYSTEM),CLANGARM64)
44+
PROJECTTYPE := mingw-clang
45+
else
46+
PROJECTTYPE := mingw-gcc
47+
endif
48+
else ifeq ($(OS),osx)
49+
PROJECTTYPE := osx_clang
5350
else
54-
ifeq ($(OS),osx)
55-
PROJECTTYPE := osx_clang
56-
else
57-
PROJECTTYPE := $(OS)_gcc
58-
endif
51+
PROJECTTYPE := $(OS)_gcc
5952
endif
6053

6154
ifeq ($(DEBUG),1)
@@ -75,11 +68,9 @@ endif
7568
SHELLTYPE := msdos
7669
ifeq (,$(ComSpec)$(COMSPEC))
7770
SHELLTYPE := posix
78-
endif
79-
ifeq (/bin,$(findstring /bin,$(SHELL)))
71+
else ifeq (/bin,$(findstring /bin,$(SHELL)))
8072
SHELLTYPE := posix
81-
endif
82-
ifeq (/bin,$(findstring /bin,$(MAKESHELL)))
73+
else ifeq (/bin,$(findstring /bin,$(MAKESHELL)))
8374
SHELLTYPE := posix
8475
endif
8576

@@ -99,14 +90,20 @@ MAINBIN := $(TARGET)$(MAINBINVARIANT)
9990
BINDIR := build/$(PROJECTTYPE)/bin/$(BUILDARCH)/$(BUILDVARIANT)
10091
STAGEDIR := build/release/$(BUILDARCH)/$(BUILDVARIANT)/$(TARGET)
10192

93+
ifeq ($(OS),windows)
94+
SYMFILE := $(addsuffix .sym,$(MAINBIN))
95+
else
96+
SYMFILE :=
97+
endif
98+
10299
BINARIES = $(MAINBIN) castool chdman floptool imgtool jedutil ldresample ldverify nltool nlwav romcmp unidasm
103100
SIMPLE_DIRS := ctrlr docs/legal docs/man docs/swlist hash ini/examples ini/presets
104101
LOCALISATIONS := $(wildcard language/*/*.mo)
105102
COPIED_FILES := COPYING uismall.bdf roms/dir.txt $(foreach DIR,$(SIMPLE_DIRS),$(wildcard $(DIR)/*)) language/LICENSE language/README.md $(LOCALISATIONS)
106103
CREATED_DIRS := docs ini roms $(SIMPLE_DIRS) language $(dir $(LOCALISATIONS))
107104

108105
GEN_FOLDERS := $(addprefix $(STAGEDIR)/,$(CREATED_DIRS))
109-
COPY_BINARIES := $(addprefix $(STAGEDIR)/,$(addsuffix $(EXE),$(BINARIES)))
106+
COPY_BINARIES := $(addprefix $(STAGEDIR)/,$(addsuffix $(EXE),$(BINARIES)) $(SYMFILE))
110107
COPY_FILES := $(addprefix $(STAGEDIR)/,$(COPIED_FILES))
111108

112109
all: $(COPY_BINARIES) $(COPY_FILES) $(STAGEDIR)/docs/MAME.pdf
@@ -117,10 +114,13 @@ clean:
117114
$(GEN_FOLDERS):
118115
$(call MKDIR,$@)
119116

120-
$(STAGEDIR)/%: $(BINDIR)/% | $(GEN_FOLDERS)
117+
$(STAGEDIR)/%$(EXE): $(BINDIR)/%$(EXE) | $(GEN_FOLDERS)
121118
$(call COPY,$<,$@)
122119
$(SILENT) strip $@
123120

121+
$(STAGEDIR)/%.sym: $(BINDIR)/%.sym | $(GEN_FOLDERS)
122+
$(call COPY,$<,$@)
123+
124124
$(STAGEDIR)/%: % | $(GEN_FOLDERS)
125125
$(call COPY,$<,$@)
126126

docs/man/mame.6

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -745,7 +745,7 @@ Default is OFF (\-nosyncrefresh).
745745
.\" SDL specific
746746
.\" +++++++++++++++++++++++++++++++++++++++++++++++++++++++
747747
.B NOTE:
748-
All the options in this group are available only with softare video
748+
All the options in this group are available only with software video
749749
rendering subsystem, i.e \fB\-video soft\fR.
750750
.TP
751751
.B \-prescale\fR [\fIvalue\fR]
@@ -959,7 +959,7 @@ pick a sane duration.
959959
.\" *******************************************************
960960
.TP
961961
.B \-[no]coin_lockout, \-[no]coinlock
962-
Enables simulation of the "coin lockout" feature that is implmeneted
962+
Enables simulation of the "coin lockout" feature that is implemented
963963
on a number of game PCBs. It was up to the operator whether or not
964964
the coin lockout outputs were actually connected to the coin
965965
mechanisms. If this feature is enabled, then attempts to enter a coin
@@ -1168,7 +1168,7 @@ information. The default is OFF (\-noverbose).
11681168
.TP
11691169
.B \-[no]update_in_pause
11701170
Enables updating the screen bitmap while the game is paused. This is
1171-
useful for debuggin in some scenarios (and gets in the way in others).
1171+
useful for debugging in some scenarios (and gets in the way in others).
11721172
Default is OFF (\-noupdate_in_pause).
11731173
.TP
11741174
.B \-[no]debug, \-[no]d

docs/source/commandline/commandline-all.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1354,7 +1354,7 @@ Core Search Path Options
13541354
13551355
Specifies the default path from which to load loose software image files.
13561356
1357-
The default is ``sofware`` (that is, a directory ``software`` in the current
1357+
The default is ``software`` (that is, a directory ``software`` in the current
13581358
working directory).
13591359
13601360
Example:
@@ -1811,7 +1811,7 @@ Core State/Playback Options
18111811
All save states will be stored inside sta\c64\robby\
18121812
18131813
.. Tip:: Note that even on Microsoft Windows, you should use ``/`` as your
1814-
path seperator for **-statename**
1814+
path separator for **-statename**
18151815
18161816
18171817
.. _mame-commandline-noburnin:

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@
264264
#texinfo_show_urls = 'footnote'
265265

266266
# Add download links at bottom left when the MAMEDEV environment
267-
# varaible is set. See versions.html in the _template folder.
267+
# variable is set. See versions.html in the _template folder.
268268
try:
269269
html_context
270270
except NameError:

docs/source/initialsetup/compilingmame.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ Including subsets of supported systems
577577
SUBTARGET
578578
Set emulator subtarget to build. Some pre-defined subtargets are provided,
579579
using Lua scripts in *scripts/target/mame* and system driver filter files in
580-
*src/mame*. User-defined substargets can be created using the **SOURCES**
580+
*src/mame*. User-defined subtargets can be created using the **SOURCES**
581581
or **SOURCEFILTER** option.
582582
SOURCES
583583
Specify system driver source files and/or folders to include. Usually used
@@ -762,7 +762,7 @@ the ``_FORTIFY_SOURCE`` macro is set in the RPM build environment, and not by
762762
distributing a modified version of GCC.)
763763

764764
If you get compilation errors in ``bits/string_fortified.h`` you should first
765-
ensure that the ``_FORTIY_SOURCE`` macro is defined via the environment (e.g.
765+
ensure that the ``_FORTIFY_SOURCE`` macro is defined via the environment (e.g.
766766
a **CFLAGS** or **CXXFLAGS** environment variable). You can check to see
767767
whether the ``_FORTIFY_SOURCE`` macro is a built-in macro with your version of
768768
GCC with a command like this:

docs/source/luascript/ref-input.rst

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -333,18 +333,12 @@ field.is_digital_joystick (read-only)
333333
switch.
334334
field.enabled (read-only)
335335
A Boolean indicating whether the field is enabled.
336-
field.optional (read-only)
337-
A Boolean indicating whether the field is optional and not required to use
338-
the emulated system.
339336
field.cocktail (read-only)
340337
A Boolean indicating whether the field is only used when the system is
341338
configured for a cocktail table cabinet.
342339
field.toggle (read-only)
343340
A Boolean indicating whether the field corresponds to a hardware toggle
344341
switch or push-on, push-off button.
345-
field.rotated (read-only)
346-
A Boolean indicating whether the field corresponds to a control that is
347-
rotated relative its standard orientation.
348342
field.analog_reverse (read-only)
349343
A Boolean indicating whether the field corresponds to an analog control that
350344
increases in the opposite direction to the convention (e.g. larger values

docs/source/techspecs/cpu_device.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,5 +225,5 @@ will retry the access.
225225

226226
At this point, interruptibility and DRC are entirely incompatible. We
227227
do not have a method to quit the generated code before or after an
228-
access. It's theorically possible but definitely non-trivial.
228+
access. It's theoretically possible but definitely non-trivial.
229229

docs/source/techspecs/device_sound_interface.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ stored output value.
230230
``start`` tells where to start (default index 0), ``count`` how many
231231
(default up to the end of the buffer).
232232

233-
``copy`` does the same as fill but gets its value from the indentical
233+
``copy`` does the same as fill but gets its value from the identical
234234
position in an input channel.
235235

236236
Note that clamping should not be used unless it actually happens in

docs/source/techspecs/floppy.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ The data is structured at two levels: how individual bits (or nibbles, or bytes)
6666

6767
All floppy controllers, even the wonkiest like the Apple II one, start by dividing the track in equally-sized cells. They're angular sections in the middle of which a magnetic orientation inversion may be present. From a hardware point of view the cells are seen as durations, which combined with the floppy rotation give the section. For instance the standard MFM cell size for a 3" double-density floppy is 2us, which combined with the also standard 300 rpm rotational speed gives an angular size of 1/100000th of a turn. Another way of saying it is that there are 100K cells in a 3" DD track.
6868

69-
In every cell there may or may not be a magnetic orientation transition, e.g. a pulse coming from (reading) or going to (writing) the floppy drive. A cell with a pulse is traditionally noted '1', and one without '0'. Two constraints apply to the cell contents though. First, pulses must not be too close together or they'll blur each-other and/or be filtered out. The limit is slightly better than 1/50000th of a turn for single and double density floppies, half that for HD floppys, and half that again for ED floppies with perpendicular recording. Second, they must not be too away from each other or either the AGC is going to get wonky and introduce phantom pulses or the controller is going to lose sync and get a wrong timing on the cells on reading. Conservative rule of thumb is not to have more than three consecutive '0' cells.
69+
In every cell there may or may not be a magnetic orientation transition, e.g. a pulse coming from (reading) or going to (writing) the floppy drive. A cell with a pulse is traditionally noted '1', and one without '0'. Two constraints apply to the cell contents though. First, pulses must not be too close together or they'll blur each-other and/or be filtered out. The limit is slightly better than 1/50000th of a turn for single and double density floppies, half that for HD floppies, and half that again for ED floppies with perpendicular recording. Second, they must not be too away from each other or either the AGC is going to get wonky and introduce phantom pulses or the controller is going to lose sync and get a wrong timing on the cells on reading. Conservative rule of thumb is not to have more than three consecutive '0' cells.
7070

7171
Of course protections play with that to make formats not reproducible by the system controller, either breaking the three-zeroes rule or playing with the cells durations/sizes.
7272

@@ -108,7 +108,7 @@ Other encodings exist, like M2FM, but they're very rare and system-specific.
108108
2.3.1.6. Reading back encoded data
109109
``````````````````````````````````
110110

111-
Writing encoded data is easy: you only need a clock at the appropriate frequency and send or not a pulse on the clock edges. Reading back the data is where the fun is. Cells are a logical construct and not a physical measurable entity. Rotational speeds very around the defined one (±2% is not rare), and local perturbations (air turbulence, surface distance…) make the instantaneous speed very variable in general. So to extract the cell values stream, the controller must dynamically synchronize with the pulse train that the floppy head picks up. The principle is simple: a cell-sized duration window is built within which the presence of at least one pulse indicates the cell is a '1', and the absence of any a '0'. After reaching the end of the window, the starting time is moved appropriately to try to keep the observed pulse at the exact middle of the window. This allows the phase to be corrected on every '1' cell, making the synchronization work if the rotational speed is not too off. Subsequent generations of controllers used Phase-Locked Loops (PLLs) which vary both phase and window duration to adapt better to inaccuarate rotational speeds, usually with a tolerance of ±15%.
111+
Writing encoded data is easy: you only need a clock at the appropriate frequency and send or not a pulse on the clock edges. Reading back the data is where the fun is. Cells are a logical construct and not a physical measurable entity. Rotational speeds very around the defined one (±2% is not rare), and local perturbations (air turbulence, surface distance…) make the instantaneous speed very variable in general. So to extract the cell values stream, the controller must dynamically synchronize with the pulse train that the floppy head picks up. The principle is simple: a cell-sized duration window is built within which the presence of at least one pulse indicates the cell is a '1', and the absence of any a '0'. After reaching the end of the window, the starting time is moved appropriately to try to keep the observed pulse at the exact middle of the window. This allows the phase to be corrected on every '1' cell, making the synchronization work if the rotational speed is not too off. Subsequent generations of controllers used Phase-Locked Loops (PLLs) which vary both phase and window duration to adapt better to inaccurate rotational speeds, usually with a tolerance of ±15%.
112112

113113
Once the cell data stream is extracted, decoding depends on the encoding. In the FM and MFM case the only question is to recognize data bits from clock bits, while in GCR the start position of the first group should be found. That second level of synchronization is handled at a higher level using patterns not found in a normal stream.
114114

docs/source/techspecs/layout_files.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1496,5 +1496,5 @@ internal layouts included in MAME.
14961496
Effectively using groups as a procedural programming language to build up an
14971497
image of a trainer board.
14981498
`beena.lay <https://git.redump.net/mame/tree/src/mame/layout/beena.lay?h=mame0261>`_
1499-
Using event-based scripting to dynamically position elements and draw elemnt
1499+
Using event-based scripting to dynamically position elements and draw element
15001500
content programmatically.

0 commit comments

Comments
 (0)