Commit graph

103 commits

Author SHA1 Message Date
Curt Coder
50f5a58821 Delete dependency makefiles on clean. (nw) 2013-02-09 16:32:21 +00:00
Oliver Stöneberg
bbfb99e515 removed additional DEBUG flags again - they are causing too much problems (nw) 2013-02-01 22:24:03 +00:00
Oliver Stöneberg
582ec9dce4 fixed typo in previous commit / fixed DEBUG compilation of pmwinmm.c and zlib 2013-02-01 08:31:09 +00:00
Oliver Stöneberg
55c4155a19 set proper DEBUG defines in makefile (nw) 2013-02-01 08:00:12 +00:00
Oliver Stöneberg
4a3e6c608c disabled some clang warning for now to improve out-of-the-box experience (nw) 2013-01-17 11:36:58 +00:00
Oliver Stöneberg
0c33249b57 fixed tests target for non-Windows platforms (nw) 2013-01-09 19:46:18 +00:00
Oliver Stöneberg
57c86b0b3f optimized tests target (nw) 2013-01-09 05:52:17 +00:00
Oliver Stöneberg
585ecc7c2e first version of chdman unit test / fixed dependies of tests target (nw) 2013-01-05 16:17:42 +00:00
Oliver Stöneberg
e18a790e69 added a "tests" target to the makefile / added chdman unittest placeholders (nw) 2013-01-05 14:20:15 +00:00
Oliver Stöneberg
85568b3f92 added CPPCHECK makefile define - it contains the path to the cppcheck binary (nw) 2013-01-05 12:37:58 +00:00
Oliver Stöneberg
ef2a555302 forgot to change library name in makefile (nw) 2013-01-01 21:01:14 +00:00
R. Belmont
13c3e056aa Enable compiling PortMidi (nw)
Tested on: Linux x64, Mac OS X 10.8, Windows 8 x64 w/latest toolchain for both OSD=windows and OSD=sdl.  MIDI should auto-disable on other OSes (*BSD) but there may be problems.  Works fine on Linux when set to use the system's copy of the library as well, which many distros prefer.
2013-01-01 16:58:48 +00:00
Oliver Stöneberg
ab9137d652 reverted makefile change (nw) 2012-12-26 14:15:59 +00:00
Oliver Stöneberg
d8929ea694 removed duplicated build rule from makefile (nw) 2012-12-26 14:00:42 +00:00
R. Belmont
a9116a7973 SDL: Experimental Qt-based debugger [Andrew Gardner, R. Belmont] 2012-12-25 03:51:20 +00:00
Jonathan Gevaryahu
a73b2224f3 Fixed python to use env variable as described in root makefile; fixes builds on windows with spaces in the path. [Balrog, Lord Nightmare] 2012-12-06 22:12:59 +00:00
Miodrag Milanovic
fc20796818 Fix to make "make depend" work if on empty obj tree (no whatsnew) 2012-09-08 13:58:11 +00:00
Miodrag Milanovic
1f77747f86 made make depend to be defined per target to support special cases (no whatsnew) 2012-09-07 13:03:46 +00:00
Miodrag Milanovic
5f995d42a4 Added proper name of generated mak (no whatsnew) 2012-08-23 12:59:09 +00:00
Miodrag Milanovic
fc915eb2ff Made "make depend" to create files per target, also added "make depend_ume" as new target in case ume is used, since then it becomes complicated (no whatsnew) 2012-08-23 12:56:20 +00:00
Angelo Salese
2db7d3c1a9 A small unused code regarding ext i/o (not hooked because it then talks with the SCSI a lot) 2012-08-23 03:18:14 +00:00
Angelo Salese
5f1eb8b0bb Fixed Pad latch 2012-08-23 02:47:53 +00:00
smf-
68ba08589d swapped order of version.o linking for consistency 2012-06-11 18:55:35 +00:00
smf-
a2fa173090 stop repeated make all runs from toggling between building chdman & mame due to both being dependent on version.o, which is always recreated when either exe is built. 2012-06-11 18:11:48 +00:00
R. Belmont
c394be2133 Always miss a file (nw) 2012-05-28 18:16:17 +00:00
Miodrag Milanovic
07ee4afaba objdump doesn't work with VS binaries, so do not run it by Firewave (no whatsnew)
fixed uninitialized field in ioport_field.m_chars (fixes stack 
corruption with three PORT_CHAR definitions) / added some sanity 
checks for PORT_CHAR adding and lookup by Firewave

Intel 28F320J3D flash support by Lukasz Markowski

snapquik.c  fixed uninitialized variable that causes random assertion 
failure by Sandro Ronco
2012-05-15 06:56:17 +00:00
Aaron Giles
2a88e54278 ioport.c C++ conversion. Mostly internal changes, with no
intended differences from previous behavior. For drivers,
the main change is that input_port_read() no longer exists.
Instead, the port must be fetched from the appropriate device,
and then read() is called.

For member functions, this is actually simpler/cleaner:

  value = ioport("tag")->read()

For legacy functions which have a driver_data state, it goes:

  value = state->ioport("tag")->read()

For other legacy functions, they need to fetch the root device:

  value = machine.root_device().ioport("tag")->read()

The other big change for drivers is that IPT_VBLANK is gone.
Instead, it has been replaced by a device line callback on the
screen device. There's a new macro PORT_VBLANK("tag") which
automatically points things to the right spot.

Here's a set of imperfect search & replace strings to convert
the input_port_read calls and fix up IPT_VBLANK:

input_port_read( *\( *)(machine\(\)) *, *([^)]+ *\))
ioport\1\3->read\(\)

input_port_read( *\( *)(.*machine[()]*) *, *([^)]+ *\))
\2\.root_device\(\)\.ioport\1\3->read\(\)

(state = .*driver_data[^}]+)space->machine\(\)\.root_device\(\)\.
\1state->

(state = .*driver_data[^}]+)device->machine\(\)\.root_device\(\)\.
\1state->

input_port_read_safe( *\( *)(machine\(\)) *, *([^,]+), *([^)]+\))
ioport\1\3->read_safe\(\4\)

IPT_VBLANK( *\))
IPT_CUSTOM\1 PORT_VBLANK("screen")
2012-05-03 09:00:08 +00:00
Michaël Banaan Ananas
651da72fe8 optimized optimization options :p 2012-04-29 21:47:31 +00:00
R. Belmont
647311cde1 Allow compilation with compatible system-installed versions of libjpeg and libflac [wallyweek, R. Belmont] 2012-03-29 21:56:18 +00:00
Miodrag Milanovic
97c3d0cb39 - removed need for *_dev.lst files [Miodrag Milanovic]
- enforced short names for slot card devices
- updated validation, romverify and listxml output accordingly
- slotoptions now also contain shortnames so it's possible to link
  slot option and device
2012-02-23 14:19:37 +00:00
Aaron Giles
f0823886a6 Major CHD/chdman update. The CHD version number has been increased
from 4 to 5. This means any diff CHDs will no longer work. If you
absolutely need to keep the data for any existing ones you have,
find both the diff CHD and the original CHD for the game in question 
and upgrade using these commands:

  rename diff\game.dif diff\game-old.dif
  chdman copy -i diff\game-old.dif -ip roms\game.chd -o diff\game.dif -op roms\game.chd -c none

Specifics regarding this change:

Defined a new CHD version 5. New features/behaviors of this version:
  - support for up to 4 codecs; each block can use 1 of the 4
  - new LZMA codec, which tends to do better than zlib overall
  - new FLAC codec, primarily used for CDs (but can be applied anywhere)
  - upgraded AVHuff codec now uses FLAC for encoding audio
  - new Huffman codec, used to catch more nearly-uncompressable blocks
  - compressed CHDs now use a compressed map for significant savings
  - CHDs now are aware of a "unit" size; each hunk holds 1 or more units
     (in general units map to sectors for hard disks/CDs)
  - diff'ing against a parent now diffs at the unit level, greatly
     improving compression

Rewrote and modernized chd.c. CHD versions prior to 3 are unsupported,
and version 3/4 CHDs are only supported for reading. Creating a new
CHD now leaves the file open.  Added methods to read and write at the 
unit and byte level, removing the need to handle this manually. Added
metadata access methods that pass astrings and dynamic_buffers to
simplify the interfaces. A companion class chd_compressor now
implements full multithreaded compression, analyzing and compressing
multiple hunks independently in parallel. Split the codec 
implementations out into a separate file chdcodec.*

Updated harddisk.c and cdrom.c to rely on the caching/byte-level read/
write capabilities of the chd_file class. cdrom.c (and chdman) now also 
pad CDs to 4-frame boundaries instead of hunk boundaries, ensuring that
the same SHA1 hashes are produced regardless of the hunk size.

Rewrote chdman.exe entirely, switching from positional parameters to
proper options. Use "chdman help" to get a list of commands, and
"chdman help <command>" to get help for any particular command. Many 
redundant commands were removed now that additional flexibility is
available. Some basic mappings:

  Old: chdman -createblankhd <out.chd> <cyls> <heads> <secs>
  New: chdman createhd -o <out.chd> -chs <cyls>,<heads>,<secs>

  Old: chdman -createuncomphd <in.raw> <out.chd> ....
  New: chdman createhd -i <in.raw> -o <out.chd> -c none ....

  Old: chdman -verifyfix <in.chd>
  New: chdman verify -i <in.chd> -f

  Old: chdman -merge <parent.chd> <diff.chd> <out.chd>
  New: chdman copy -i <diff.chd> -ip <parent.chd> -o <out.chd>

  Old: chdman -diff <parent.chd> <compare.chd> <diff.chd>
  New: chdman copy -i <compare.chd> -o <diff.chd> -op <parent.chd>

  Old: chdman -update <in.chd> <out.chd>
  New: chdman copy -i <in.chd> -o <out.chd>

Added new core file coretmpl.h to hold core template classes. For now
just one class, dynamic_array<> is defined, which acts like an array
of a given object but which can be appended to and/or resized. Also
defines dynamic_buffer as dynamic_array<UINT8> for holding an 
arbitrary buffer of bytes. Expect to see these used a lot.

Added new core helper hashing.c/.h which defines classes for each of
the common hashing methods and creator classes to wrap the 
computation of these hashes. A future work item is to reimplement
the core emulator hashing code using these.

Split bit buffer helpers out into C++ classes and into their own
public header in bitstream.h.

Updated huffman.c/.h to C++, and changed the interface to make it
more flexible to use in nonstandard ways. Also added huffman compression
of the static tree for slightly better compression rates.

Created flac.c/.h as simplified C++ wrappers around the FLAC interface.
A future work item is to convert the samples sound device to a modern
device and leverage this for reading FLAC files.

Renamed avcomp.* to avhuff.*, updated to C++, and added support for
FLAC as the audio encoding mechanism. The old huffman audio is still
supported for decode only.

Added a variant of core_fload that loads to a dynamic_buffer.

Tweaked winwork.c a bit to not limit the maximum number of processors
unless the work queue was created with the WORK_QUEUE_FLAG_HIGH_FREQ
option. Further adjustments here are likely going to be necessary.

Fixed bug in aviio.c which caused errors when reading some AVI files.
2012-02-16 09:47:18 +00:00
R. Belmont
d75dbab0de Add LZMA codec and .7z container support [David Haywood, R. Belmont] 2012-02-12 17:55:51 +00:00
Angelo Salese
39e3b5398b Doesn't compile, red card for ya 2012-02-05 16:54:00 +00:00
Aaron Giles
d60015dc9d Add -Woverloaded-virtual to catch mismatched overloaded
function signatures.
2012-01-25 05:11:03 +00:00
Aaron Giles
ed0207f126 Move devices into a proper hierarchy and handle naming
and paths consistently for devices, I/O ports, memory
regions, memory banks, and memory shares. [Aaron Giles]

NOTE: there are likely regressions lurking here, mostly
due to devices not being properly found. I have temporarily
added more logging to -verbose to help understand what's
going on. Please let me know ASAP if anything that is being
actively worked on got broken.

As before, the driver device is the root device and all 
other devices are owned by it. Previously all devices
were kept in a single master list, and the hierarchy was
purely logical. With this change, each device owns its
own list of subdevices, and the hierarchy is explicitly
manifest. This means when a device is removed, all of its
subdevices are automatically removed as well.

A side effect of this is that walking the device list is
no longer simple. To address this, a new set of iterator
classes is provided, which walks the device tree in a depth
first manner. There is a general device_iterator class for
walking all devices, plus templates for a device_type_iterator
and a device_interface_iterator which are used to build
iterators for identifying only devices of a given type or
with a given interface. Typedefs for commonly-used cases
(e.g., screen_device_iterator, memory_interface_iterator)
are provided. Iterators can also provide counts, and can
perform indexed lookups.

All device name lookups are now done relative to another 
device. The maching_config and running_machine classes now
have a root_device() method to get the root of the hierarchy. 
The  existing machine->device("name") is now equivalent to
machine->root_device().subdevice("name").

A proper and normalized device path structure is now
supported. Device names that start with a colon are
treated as absolute paths from the root device. Device
names can also use a caret (^) to refer to the owning
device. Querying the device's tag() returns the device's
full path from the root. A new method basetag() returns
just the final tag.

The new pathing system is built on top of the 
device_t::subtag() method, so anyone using that will 
automatically support the new pathing rules. Each device
has its own internal map to cache successful lookups so
that subsequent lookups should be very fast.

Updated every place I could find that referenced devices,
memory regions, I/O ports, memory banks and memory shares
to leverage subtag/subdevice (or siblingtag/siblingdevice
which are built on top).

Removed the device_list class, as it doesn't apply any
more. Moved some of its methods into running_machine
instead.

Simplified the device callback system since the new 
pathing can describe all of the special-case devices that
were previously handled manually.

Changed the core output function callbacks to be delegates.

Completely rewrote the validity checking mechanism. The
validity checker is now a proper C++ class, and temporarily
takes over the error and warning outputs. All errors and 
warnings are collected during a session, and then output in
a consistent manner, with an explicit driver and source file
listed for each one, as well as additional device and/or
I/O port contexts where appropriate. Validity checkers 
should no longer explicitly output this information, just
the error, assuming that the context is provided.

Rewrote the software_list_device as a modern device, getting
rid of the software_list_config abstraction and simplifying
things.

Changed the way FLAC compiles so that it works like other
external libraries, and also compiles successfully for MSVC
builds.
2012-01-24 20:18:55 +00:00
R. Belmont
8703f92910 Added FLAC (lossless audio) codec support plus experimental hooks in samples and chdman. Bumped up CHD-CD hunk size to get better compression ratios on both zlib and flac. [David Haywood, R. Belmont] 2012-01-22 18:38:22 +00:00
R. Belmont
f6b2c736c4 Add libjpeg; converted Sliver to decompress pictures on the fly [David Haywood, R. Belmont] 2012-01-16 17:06:42 +00:00
Miodrag Milanovic
cda1b4765c Commented (per Kale's request) not removed libcothread usage in core (requires clean build), (no whatsnew)
We can safely remove comments and cothread.* from /emu and /lib/cothread if it's confirmed way to go
2011-11-30 16:00:43 +00:00
Miodrag Milanovic
c9891545fd Changed makefile in order to make sequential compilation of MAME and MESS and their sub targets less resource demanding [Miodrag Milanovic] 2011-11-22 09:10:58 +00:00
Miodrag Milanovic
be8bd3552f Move per emulator constants info into separate class [Miodrag Milanovic]
out of log:
This way it is possible to link two or more separated executables with different 
copyright/xml out/name/... in one compilation, just one step closer...
2011-11-17 10:02:55 +00:00
Angelo Salese
ef6b961f2c Obviously makefile isn't supposed to change ... 2011-11-09 21:40:29 +00:00
Angelo Salese
28b51c152b Implemented FRC hook-up to Sega System 24 HW, fixes missing SFXs to Bonanza Bros. [Angelo Salese, Phil Bennett, Charles MacDonald] 2011-11-09 21:39:59 +00:00
R. Belmont
fd0be74ab4 SDL: Add TAP/TUN networking capability and shell script for configuration [Carl] 2011-10-31 01:30:24 +00:00
Miodrag Milanovic
3bdfb55b35 - Updated romload so devices are loaded from separate files [Miodrag Milanovic]
- Removed LOADBYNAME, since it is deprecated by using per device rom load_software_part_region

- Created makedev tool to generate array of devices, and created lst file according to current devices usage.

- Changed listxml command to output device roms too
2011-08-02 15:09:21 +00:00
Aaron Giles
f8adbd63fa Added byuu's cothread library, along with a wrapper class. Switched to
using one cothread for each executable device. This functionality is
strictly internal and should result in no changes in scheduling
behavior. However, it now becomes possible to exit out of a device's 
execution in the midst of an instruction by calling 
machine().scheduler().make_active(). Note that this is somewhat dangerous
for cores that have logic at the start of their execute loop to check for
interrupts or other conditions, as those checks will be skipped upon
resume, so consider this sort of early exiting to be highly experimental 
for now. [Aaron Giles, Miodrag Milanovic, byuu]
2011-06-25 07:03:07 +00:00
Scott Stone
dfa747f471 Removed duplicated includes from INCPATH. [Oliver Stoneberg] 2011-06-15 21:21:51 +00:00
Miodrag Milanovic
62d841c270 Moved format handling and all formats to separate library [Miodrag Milanovic] 2011-05-06 19:42:26 +00:00
Aaron Giles
00d745ca77 (Big tangle of changes that all happened as I was looking into the ROM
loader rewrite, which is still in progress....)

Replaced mamedriv.c with a new driver list mechanism that is generated
by the build tools. The emulator core now expects the presence of a
file called src/$(TARGET)/$(SUBTARGET).lst which is just a raw list of
driver names, one per line. C and C++ comments are still permitted.
This file is parsed by a new build tool makelist which extracts the
driver names, sorts them, and generates a file called drivlist.c, which
is consumed by the core. [Aaron Giles]

Added new osdcore function osd_malloc_array() which is identical to
osd_malloc() but obviously hints that the underlying allocation is for
an array. Updated all callers to use the appropriate form. Modified the
Windows allocator to only use guard pages for array-style allocations,
allowing us to enable them once again in debug builds. [Aaron Giles]

Created new static class driver_list to wrap accesses to the list of
available drivers. Improved speed of driver lookups by relying on the
presorting done by makelist. [Aaron Giles]

Created helper class driver_enumerator as a helper for iterating through 
the list of drivers. This class supports basic filtering and iteration,
and also serves as a temporary cache of machine_configs. [Aaron Giles]

Created cli_frontend object to wrap all the CLI handling code in
clifront.c. Updated/simplified all the code to take advantage of the
driver_enumerator. [Aaron Giles]

Created media_auditor object to wrap all the auditing functions in
audit.c. Updated all users to the new interface. Note that the new
auditing mechanism is slightly out of sync with the romload code in
terms of finding ROMs owned by devices, so it may mis-report some
issues until the new ROM loading code is in. [Aaron Giles]

Added concept of a per-device searchpath. For most devices, their 
searchpath is just the short name of the device. For driver_devices, the
searchpath is driver[;parent[;bios]]. This searchpath will eventually be
used by the rom loader to find ROMs. For now it is used by the media
auditor only. [Aaron Giles]

Created info_xml_creator object to wrap all the info generation functions
in info.c. Converted the file to C++ and cleaned up the input processing
code. [Aaron Giles]

(not for whatsnew ... Known issues: auditing of CHDs appears busted, and 
debug builds report unfreed memory if you use the built-in game picker)
2011-04-13 20:31:00 +00:00
Curt Coder
70efaaf040 Delete symbols file if defined when invoking clean target. [Curt Coder] 2011-02-12 22:17:46 +00:00
R. Belmont
28e34ea140 NetBSD support [Thomas Klausner]
Not for whatsnew: I added -Wno-conversion unconditionally to disable the 
warnings Thomas reported.  That setting is the default for GCC out-of-the-box 
but apparently not on NetBSD.  As far as I know it shouldn't cause a problem 
with any GCC version back to at least 4.0.0 so we're safe even on PPC OSX, 
but do let me know if hilarity ensues.
2011-02-02 03:29:54 +00:00