Commit Graph

53 Commits

Author SHA1 Message Date
Oliver Stöneberg
616f0c7039 added resources and icon for UME / added UME support to verinfo and updated the usage string (no whatsnew) 2012-09-20 23:18:34 +00:00
Oliver Stöneberg
6bc58a69ab (MESS) fixed resource data of Windows executable [Oliver Stöneberg] 2012-09-17 19:49:37 +00:00
Aaron Giles
ab97dc30ef First pass at modernizing struct definitions. 2012-09-15 21:47:30 +00:00
smf-
85aa24b036 oops, looks like it needs to be before the qsort or "bad things happen". but it still can be done after the driver count is checked and output. 2012-08-16 21:04:07 +00:00
smf-
9d36bc6a60 add ___empty after sorting, the count is correct now and the check for no drivers can also work. 2012-08-16 20:49:08 +00:00
Aaron Giles
3e575ad6b9 Move driver list/enumerator to new file drivenum.c/.h.
Move game_driver definition and constants to new header gamedrv.h.
2012-04-06 19:59:27 +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
49f15acb7d tagmap is just a C++ template now. Added iterators to it as
well. Updated a few outlying uses.
2012-01-17 19:06:55 +00:00
Aaron Giles
e4238fb654 Major bitmap-related changes throughout the system. There are
almost certainly some regressions lurking. Let me know if
something seems busted.

Bitmaps are now strongly typed based on format. bitmap_t still
exists as an abstract base class, but it is almost never used.
Instead, format-specific bitmap classes are provided:

   bitmap_ind8 == 8bpp indexed
   bitmap_ind16 == 16bpp indexed
   bitmap_ind32 == 32bpp indexed
   bitmap_ind64 == 64bpp indexed
   bitmap_rgb32 == 32bpp RGB
   bitmap_argb32 == 32bpp ARGB
   bitmap_yuy16 == 16bpp YUY

For each format, a generic pix() method is provided which
references pixels of the correct type. The old pix8/pix16/pix32/
pix64 methods still exist in the short term, but the only one
available is the one that matches the bitmap's pixel size. Note
also that the old RGB15 format bitmaps are no longer supported
at all.

Converted model1, megadriv, and stv drivers away from the RGB15
format bitmaps.

New auto_bitmap_<type>_alloc() macros are provided for allocating
the appropriate type of bitmap.

Screen update functions now must specify the correct bitmap type
as their input parameters. For static update functions the
SCREEN_UPDATE macro is now replaced with SCREEN_UPDATE_RGB32 and
SCREEN_UPDATE_IND16 macros. All existing drivers have been 
updated to use the correct macros. 

Screen update functions are now required for all screens; there
is no longer any default behavior of copying a "default" bitmap
to the screen (in fact the default bitmap has been deprecated).
Use one of the following to specify your screen_update callback:

   MCFG_SCREEN_UPDATE_STATIC(name) - static functions
   MCFG_SCREEN_UPDATE_DRIVER(class, func) - driver members
   MCFG_SCREEN_UPDATE_DEVICE(tag, class, func) - device members

Because the target bitmap format can now be deduced from the
screen update function itself, the MCFG_SCREEN_FORMAT macro is
no longer necessary, and has been removed. If you specify a
screen update callback that takes a bitmap_ind16, then the screen
will be configured to use a 16bpp indexed bitmap, and if you
specify a callback that takes a bitmap_rgb32, then a 32bpp RGB
bitmap will be provided.

Extended the bitmap classes to support wrapping a subregion of
another bitmap, and cleaner allocation/resetting. The preferred
use of bitmaps now is to define them directly in drivers/devices
and use allocate() or wrap() to set them up, rather than 
allocating them via auto_bitmap_*_alloc().

Several common devices needed overhauls or changes as a result
of the above changes:

 * Reorganized the laserdisc base driver and all the laserdisc 
    drivers as modern C++ devices, cleaning the code up 
    considerably. Merged ldsound device into the laserdsc
    device since modern devices are flexible enough to handle
    it.

 * Reorganized the v9938 device as a modern C++ device. Removed
    v9938mod.c in favor of template functions in v9938.c directly.

 * Added independent ind16 and rgb32 callbacks for TMS340x0 devices.

 * All video devices are now hard-coded to either ind16 or rgb32
    bitmaps. The most notable is the mc6845 which is rgb32, and
    required changes to a number of consumers.

 * Added screen_update methods to most video devices so they can be
    directly called via MCFG_SCREEN_UPDATE_DEVICE instead of creating
    tons of stub functions.
2012-01-12 21:19:49 +00:00
Aaron Giles
64f1231c63 Removed old C-based interface to astrings. astring exists only as
a class now. Updated all stragglers (mostly tools) to use the class
form. [Aaron Giles]
2012-01-03 00:21:13 +00:00
Aaron Giles
80cd316a2a Bulk conversion of bitmap_t * to bitmap_t & . With this change the
parameters for the global SCREEN_UPDATE callback match the parameters
for the driver_device version. Added allocate() and deallocate()
methods to bitmap_t to permit cleaner handling of bitmaps in drivers
and modern devices. [Aaron Giles]
2012-01-02 04:59:11 +00:00
Aaron Giles
9cae38e0d8 Converted bitmap_t and rectangle into proper classes. Replaced BITMAP_ADDR*
macros with bitmap->pix* functions, and moved bitmap_fill() to bitmap->fill()
among other similar changes. Bitmap fields now only available via accessors.
Replaced sect_rect with &= and union_rect with |= operators for rectangle
classes. Some general cleanup as a result of these changes. [Aaron Giles]
2011-12-31 07:52:26 +00:00
Miodrag Milanovic
4234c6f993 Support for ignoring item in lst files (no whatsnew) 2011-11-30 11:51:46 +00:00
Angelo Salese
fd97e3da4c Clean-ups and version bump 2011-08-14 23:01:08 +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
Miodrag Milanovic
8449a9cbdc - Removing MD5 support in ROMLOAD_* [Oliver Stoneberg]
- Various core and tools memory leaks fixes [Oliver Stoneberg]
2011-07-31 15:46:18 +00:00
R. Belmont
6ca8f8a8c3 Fixes for variable shadowing [Oliver Stöneberg] 2011-07-21 13:19:08 +00:00
Angelo Salese
a449c766a2 Cleanups and version bump 2011-06-05 22:35:20 +00:00
Aaron Giles
665d213ee4 (Finally found the time to finish this....)
Low-level input upgrade. Classes now exist for input_codes, input_items,
input_devices, and input_seqs. Also created an input_manager class to
hold machine-global state and made it accessible via machine.input().
Expanded the device index range (0-255, up from 0-16), and the OSD can
now specify the device index explicitly if they can better keep the 
indexes from varying run-to-run. [Aaron Giles]

Note that I've built and run SDL on Windows, but not all the code paths
were exercised. If you use mice/joysticks extensively double-check them
to be sure it all still works as expected.

This is mainly an OSD and core change. The only thing impacting drivers
is if they query for specific keys for debugging. The following S&Rs
took care of most of that:

S: input_code_pressed( *)\(( *)([^, ]+) *, *
R: \3\.input\(\)\.code_pressed\1\(\2

S: input_code_pressed_once( *)\(( *)([^, ]+) *, *
R: \3\.input\(\)\.code_pressed_once\1\(\2
2011-05-30 19:07:19 +00:00
Angelo Salese
23955bb721 Fixed Sega Saturn / ST-V start-up crash that was happening on some ends [Oliver Stöneberg] Fixed a use-after-free bug in build/verinfo.c [Oliver Stöneberg] 2011-05-26 13:32:45 +00:00
Angelo Salese
95f06e11a8 Cleanups and version bump 2011-05-24 00:13:27 +00:00
Miodrag Milanovic
71b9b2b1cc Updated makelist to be able to import list items from more files (no whatsnew) 2011-05-13 10:42:39 +00:00
Angelo Salese
486fbfa555 Cleanups again 2011-04-18 00:06:50 +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
Couriersud
7f400e7393 Fix a bug in makedep which will caused includes on the first line of the file like in skyraid.h to be ignored. [Couriersud] 2011-01-18 23:05:21 +00:00
Couriersud
b4d803c875 makedep now ignores "-include" which is used by sdlmame to include sdlprefix.h before all other includes. [Couriersud] 2011-01-03 20:37:57 +00:00
Aaron Giles
7a4744d31d Cleanups and version bump. 2010-09-19 05:09:00 +00:00
Scott Stone
51cb201642 Compile fix for makedep.c 2010-09-14 02:39:25 +00:00
Aaron Giles
db797ba791 New build tool makedep.c, derived from src2html.c (really!).
Does basic dependency analysis and supports excluding paths.

Makefile now supports a depend target which will run makedep
on the src/$(TARGET) tree and create dependencies. It deliberately
excludes the root of src/emu as well as the osd directories in
order to keep the dependency file down to a reasonable size, so
if a core header file changes, you still need to clean and build
all.
2010-09-14 01:15:26 +00:00
Fabio Priuli
9b618d63ee png2bdc.c: When the usage is printed, the name displayed was
"png2bdf" instead of "png2bdc"; this changes it by retrieving 
the name of the executable at runtime, so it will always 
be correct now. [Christophe Jaillet]
2010-03-17 10:18:14 +00:00
Aaron Giles
bd24fb23c1 Results of running the latest srcclean. 2009-12-28 09:04:00 +00:00
Aaron Giles
e692918b34 Added casts to ensure proper values are passed to the ctype.h functions.
[Juergen Buchmueller]
2009-06-25 08:04:39 +00:00
Aaron Giles
03302fd9b9 From: Oliver Stoeneberg [mailto:oliverst@online.de]
Sent: Wednesday, May 27, 2009 11:50 PM
To: submit@mamedev.org
Subject: Memory Leaks

This patch fixes a few potential memory leaks detected by cppcheck 
and also adds an errormessage to verinfo.
2009-05-28 15:19:27 +00:00
Aaron Giles
9eb86548bb Added missing casts and made other tweaks. The entire project
can now be optionally compiled with the C++ compiler (mingw g++
only for the moment; MSVC still has issues).
2009-04-27 09:18:17 +00:00
Aaron Giles
eb539cce9d Many casts added to the core files, and various other tweaks
to make them compile as either C or C++.
2009-03-12 07:43:03 +00:00
Aaron Giles
ba2fb8554b From: Atari Ace [mailto:atari_ace@verizon.net]
Subject: [patch] make MSVC_BUILD=1 -j<n> build fix

Hi mamedev,

The following build tweak fixes make MSVC_BUILD=1 -j2.  It also fixes
an oversight in the cross-build support.

~aa
2008-06-26 15:27:12 +00:00
Laurent Desnogues
a97ec0a587 - revert commit 1566 2008-05-13 10:22:16 +00:00
Laurent Desnogues
45e055c624 - don't use $(LIBS) for linking where it's not needed (hope I did not break
Windows or cross builds)
2008-05-13 08:34:03 +00:00
Aaron Giles
fb26ec7c01 Cleanups and version bump. 2008-03-06 07:31:20 +00:00
Aaron Giles
b8a64773fd Added macros to define device functions. Updated existing devices
to use the macros.

Added the concept of device classes. Devices specify their class
in their get_info function. Classes can be used to walk through
devices at a more general level than their type. Functions have
been added to iterate through devices by class just as you can
by type.

Removed some unused fields from device_config.
2008-03-01 08:41:56 +00:00
Aaron Giles
b96aa2fb5c Spacing and version bump. 2008-02-28 06:20:19 +00:00
Couriersud
9c460a6248 Makefile & build system update:
* verinfo: New syntax.
	verinfo now uses the following syntax: verinfo.exe -b windows|winui|mess. 
	Does not depend on compile time defines any longer.

* makefile will include - if it exists - src/osd/$(CROSS_BUILD_OSD)/build.mak.
	This was necessary to enable cross builds for winui. winui adds mkhelp to build tools and the rules for mkhelp thus had to be moved outside src/osd/winui/winui.mak

* Tested on Linux 64bit, Linux 32bit, Windows 32bit mingw, Windows 32bit MSVC

* Cross build environment to be posted to the list
2008-02-21 23:53:29 +00:00
Zsolt Vasvari
3d5cdeaf8c From Atari Ace:
Hi mamedev,

Here's my periodic batch of code cleanups.  The usual batch of adding static/const plus some include fixes.  In addition, I reverted some of the changes to build.mak from u1 which made some MSVC builds fail, and adjusted/optimized an m10.c gfx_layout.  I also added some missing cores to cpuintrf.c, sndintrf.c and added some missing #if's to 5220intf.c.

~aa
2008-02-18 01:30:05 +00:00
R. Belmont
aad7c9abf4 Fix build with external zlib. 2008-02-15 03:56:17 +00:00
Aaron Giles
74015ed586 Changed VERINFO to build always. All tools in build should build for all platforms.
Fixed dependency problem in windows.mak due to the VERINFO move. Windows builds now work the first time.
2008-02-13 07:40:12 +00:00
Aaron Giles
abdb58671b Split timer_adjust() into timer_adjust_oneshot() and timer_adjust_periodic().
Updated all call sites.
Fixed recent build breaks.
2008-02-06 15:33:04 +00:00
Couriersud
17d5bc279b png2bdc.c:
* remove osdcore.h
build.mak:
* remove expat from libs
2008-02-05 23:18:52 +00:00
Couriersud
2c6acf1988 src/build:
* removes osdcore.h from file2str.c and verinfo.c
* removes LIBOCORE from link stage for file2str and verinfo
2008-02-05 23:05:55 +00:00
Couriersud
88940550a1 makefiles:
* move verinfo.c to src/build
* move rules for verinfo to src/build/build.mak
2008-02-05 22:32:11 +00:00
Aaron Giles
4c5cebc661 From: Atari Ace [mailto:atari_ace@verizon.net]
Subject: [patch] Fix some comments

Hi mamedev,

The following patch updates the initialization comments at the top of
mame.c and corrects/adds a few filename declarations at the top of a
handful of files.

~aa
2008-02-03 00:56:06 +00:00