summaryrefslogtreecommitdiffstats
path: root/docs/release/scripts/src/osd/osdmini.lua
blob: b05839e7873307fa3ea5ae66e21964513e8795ad (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
-- license:BSD-3-Clause
-- copyright-holders:MAMEdev Team

---------------------------------------------------------------------------
--
--   osdmini.lua
--
--   Rules for the building of osdmini
--
---------------------------------------------------------------------------

function maintargetosdoptions(_target,_subtarget)
end

project ("qtdbg_" .. _OPTIONS["osd"])
	uuid (os.uuid("qtdbg_" .. _OPTIONS["osd"]))
	kind (LIBTYPE)

	dofile("osdmini_cfg.lua")
	includedirs {
		MAME_DIR .. "src/emu",
		MAME_DIR .. "src/devices", -- accessing imagedev from debugger
		MAME_DIR .. "src/osd",
		MAME_DIR .. "src/lib",
		MAME_DIR .. "src/lib/util",
		MAME_DIR .. "src/osd/modules/render",
		MAME_DIR .. "3rdparty",
	}
	removeflags {
		"SingleOutputDir",
	}

	files {
		MAME_DIR .. "src/osd/modules/debugger/debugqt.cpp",
	}

project ("osd_" .. _OPTIONS["osd"])
	uuid (os.uuid("osd_" .. _OPTIONS["osd"]))
	kind (LIBTYPE)

	removeflags {
		"SingleOutputDir",
	}
	
	dofile("osdmini_cfg.lua")
	
	includedirs {
		MAME_DIR .. "src/emu",
		MAME_DIR .. "src/osd",
		MAME_DIR .. "src/lib",
		MAME_DIR .. "src/lib/util",
		MAME_DIR .. "src/osd/sdl",
		MAME_DIR .. "src/osd/modules/render",
		MAME_DIR .. "3rdparty",
		MAME_DIR .. "3rdparty/winpcap/Include",
		MAME_DIR .. "3rdparty/bgfx/include",
		MAME_DIR .. "3rdparty/bx/include",
	}

	files {
		MAME_DIR .. "src/osd/osdnet.cpp",
		MAME_DIR .. "src/osd/osdnet.h",
		MAME_DIR .. "src/osd/osdmini/minimain.cpp",
		MAME_DIR .. "src/osd/osdmini/osdmini.h",
		MAME_DIR .. "src/osd/osdepend.h",
		MAME_DIR .. "src/osd/modules/lib/osdobj_common.cpp",
		MAME_DIR .. "src/osd/modules/lib/osdobj_common.h",
		MAME_DIR .. "src/osd/modules/font/font_sdl.cpp",
		MAME_DIR .. "src/osd/modules/font/font_windows.cpp",
		MAME_DIR .. "src/osd/modules/font/font_osx.cpp",
		MAME_DIR .. "src/osd/modules/font/font_none.cpp",
		MAME_DIR .. "src/osd/modules/netdev/taptun.cpp",
		MAME_DIR .. "src/osd/modules/netdev/pcap.cpp",
		MAME_DIR .. "src/osd/modules/netdev/none.cpp",
		MAME_DIR .. "src/osd/modules/midi/portmidi.cpp",
		MAME_DIR .. "src/osd/modules/midi/none.cpp",
		MAME_DIR .. "src/osd/modules/sound/js_sound.cpp",
		MAME_DIR .. "src/osd/modules/sound/direct_sound.cpp",
		MAME_DIR .. "src/osd/modules/sound/coreaudio_sound.cpp",		
		MAME_DIR .. "src/osd/modules/sound/sdl_sound.cpp",
		MAME_DIR .. "src/osd/modules/sound/none.cpp",
		MAME_DIR .. "src/osd/modules/sound/xaudio2_sound.cpp",
	}
	
project ("ocore_" .. _OPTIONS["osd"])
	uuid (os.uuid("ocore_" .. _OPTIONS["osd"]))
	kind (LIBTYPE)

	removeflags {
		"SingleOutputDir",	
	}

	dofile("osdmini_cfg.lua")
	
	includedirs {
		MAME_DIR .. "src/emu",
		MAME_DIR .. "src/osd",
		MAME_DIR .. "src/lib",
		MAME_DIR .. "src/lib/util",
	}

	if _OPTIONS["targetos"]=="linux" then
		BASE_TARGETOS = "unix"
		SDLOS_TARGETOS = "unix"
		SYNC_IMPLEMENTATION = "tc"
	end

	if _OPTIONS["targetos"]=="windows" then
		BASE_TARGETOS = "win32"
		SDLOS_TARGETOS = "win32"
		SYNC_IMPLEMENTATION = "windows"
	end

	if _OPTIONS["targetos"]=="macosx" then
		BASE_TARGETOS = "unix"
		SDLOS_TARGETOS = "macosx"
		SYNC_IMPLEMENTATION = "ntc"
	end

	files {
		MAME_DIR .. "src/osd/osdcore.cpp",
		MAME_DIR .. "src/osd/osdcore.h",
		MAME_DIR .. "src/osd/modules/osdmodule.cpp",
		MAME_DIR .. "src/osd/modules/osdmodule.h",		
		MAME_DIR .. "src/osd/osdmini/minidir.cpp",
		MAME_DIR .. "src/osd/osdmini/minifile.cpp",
		MAME_DIR .. "src/osd/osdmini/minimisc.cpp",
		MAME_DIR .. "src/osd/osdmini/minitime.cpp",
		MAME_DIR .. "src/osd/modules/sync/work_mini.cpp",
	}
map_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. * Bulk conversion of bitmap_t * to bitmap_t & . With this change the Aaron Giles2012-01-021-1/+1 | | | | | | | | 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] * Converted bitmap_t and rectangle into proper classes. Replaced BITMAP_ADDR* Aaron Giles2011-12-311-1/+1 | | | | | | | | 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] * Change 'screen' parameter in SCREEN_UPDATE and SCREEN_EOF callbacks to a Aaron Giles2011-12-291-1/+1 | | | | | | | | | reference. Remove redundant machine parameter from SCREEN_EOF. Remove old vestiges of driver_device video_eof override since it wasn't being used. Update all multi-screen games to use separate functions for each screen (calling into common code where appropriate). [Aaron Giles] (nw: equivalent MESS changes are ready, will send along shortly) * "English doesn't borrow from other languages. English follows other ↵ Scott Stone2011-08-231-1/+1 | | | | | | languages down dark alleys, knocks them over and goes through their pockets for loose grammar!" Hand-checked the most popular English word misspellings and made the appropriate changes. Nearly all of the changes made were in commented areas. (no whatsnew) * Collapsed device_config and device_t into one class. Updated all Aaron Giles2011-04-271-2/+2 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | existing modern devices and the legacy wrappers to work in this environment. This in general greatly simplifies writing a modern device. [Aaron Giles] General notes: * some more cleanup probably needs to happen behind this change, but I needed to get it in before the next device modernization or import from MESS :) * new template function device_creator which automatically defines the static function that creates the device; use this instead of creating a static_alloc_device_config function * added device_stop() method which is called at around the time the previous device_t's destructor was called; if you auto_free anything, do it here because the machine is gone when the destructor is called * changed the static_set_* calls to pass a device_t & instead of a device_config * * for many devices, the static config structure member names over- lapped the device's names for devcb_* functions; in these cases the members in the interface were renamed to have a _cb suffix * changed the driver_enumerator to only cache 100 machine_configs because caching them all took a ton of memory; fortunately this implementation detail is completely hidden behind the driver_enumerator interface * got rid of the macros for creating derived classes; doing it manually is now clean enough that it isn't worth hiding the details in a macro * Final bulk rename for 0.142: ensure that all members of Aaron Giles2011-04-011-38/+38 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | driver_device classes have an m_ prefix on them. When we eventually move functions using these into member functions, we will be able to remove the state-> pointers, and having the member variables prefixed will allow them to be distinguished from local variables. Some regex'es used (plus manually fixing the remaining stuff): In src/mame/... state->([a-zA-Z_][^_][a-zA-Z0-9_]*) state->m_\1 state->([^m]_[a-zA-Z0-9_]*) state->m_\1 state->m_save_item state->save_item state->m_save_pointer state->save_pointer (AM_BASE_MEMBER *\( *[a-zA-Z0-9_]+ *, *)([a-zA-Z_][^_]) \1m_\2 (AM_BASE_SIZE_MEMBER *\( *[a-zA-Z0-9_]+ *, *)([a-zA-Z_][^_][a-zA-Z0-9_]* *, *)([a-zA-Z_][^_]) \1m_\2m_\3 (AM_SIZE_MEMBER *\( *[a-zA-Z0-9_]+ *, *)([a-zA-Z_][^_]) \1m_\2 m__ m_ In src/mame/includes/... (\t[a-zA-Z0-9_<>]+[ \t]+[&*]*[ \t]*)([a-zA-Z_][^_][][a-zA-Z0-9_]*;)$ \1m_\2 (\t[a-zA-Z0-9_<>]+[ \t]*[&*]*[ \t]+)([a-zA-Z_][^_][][a-zA-Z0-9_]*;)$ \1m_\2 * BIG update. Aaron Giles2011-03-291-17/+17 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove redundant machine items from address_space and device_t. Neither machine nor m_machine are directly accessible anymore. Instead a new getter machine() is available which returns a machine reference. So: space->machine->xxx ==> space->machine().xxx device->machine->yyy ==> device->machine().yyy Globally changed all running_machine pointers to running_machine references. Any function/method that takes a running_machine takes it as a required parameter (1 or 2 exceptions). Being consistent here gets rid of a lot of odd &machine or *machine, but it does mean a very large bulk change across the project. Structs which have a running_machine * now have that variable renamed to m_machine, and now have a shiny new machine() method that works like the space and device methods above. Since most of these are things that should eventually be devices anyway, consider this a step in that direction. 98% of the update was done with regex searches. The changes are architected such that the compiler will catch the remaining errors: // find things that use an embedded machine directly and replace // with a machine() getter call S: ->machine-> R: ->machine\(\)\. // do the same if via a reference S: \.machine-> R: \.machine\(\)\. // convert function parameters to running_machine & S: running_machine \*machine([^;]) R: running_machine \&machine\1 // replace machine-> with machine. S: machine-> R: machine\. // replace &machine() with machine() S: \&([()->a-z0-9_]+machine\(\)) R: \1 // sanity check: look for this used as a cast (running_machine &) // and change to this: *(running_machine *) * Created new enum type address_spacenum for specifying an address Aaron Giles2011-03-271-3/+3 | | | | | | | | | | | | space by index. Update functions and methods that accepted an address space index to take an address_spacenum instead. Note that this means you can't use a raw integer in ADDRESS_SPACE macros, so instead of 0 use the enumerated AS_0. Standardized the project on the shortened constants AS_* over the older ADDRESS_SPACE_*. Removed the latter to prevent confusion. Also centralized the location of these definitions to memory.h. * Continuation of static/global cleanup. [Atari Ace] Aaron Giles2011-03-171-42/+60 | * (game descriptions consistency: "Set" -> "set") Michaël Banaan Ananas2011-03-131-2/+2 | * Modified video update system. [Miodrag Milanovic] Miodrag Milanovic2011-02-241-2/+2 | | | | | | | | | | | | | | | | | | | | Screen update function is now per screen device (it was before but was attached to machine driver) MCFG_VIDEO_UPDATE -> MCFG_SCREEN_UPDATE MCFG_VIDEO_EOF -> MCFG_SCREEN_EOF EOF is now executed for all screens, so for all existing it is defined just for one screen. This part will be updated in future. Note that there are now screen_update and screen_eof virtual functions for "modern" drivers which are called same as they did before. All drivers are updated and in places where update function was separated per screen I did name separate function. This change will enable us to put screen definition fully into device. * Attotime bulk conversion step: Aaron Giles2011-02-031-1/+1 | | | | | | | | | | | | | | | | | | attotime_zero => attotime::zero attotime_never => attotime::never ATTOTIME_IN_SEC(s) => attotime::from_seconds(s) ATTOTIME_IN_MSEC(m) => attotime::from_msec(m) ATTOTIME_IN_USEC(u) => attotime::from_usec(u) ATTOTIME_IN_NSEC(n) => attotime::from_nsec(n) ATTOTIME_IN_HZ(h) => attotime::from_hz(h) Also, changed the following MCFG macros to require a full attotime specification: MCFG_TIMER_ADD_PERIODIC MCFG_QUANTUM_TIME MCFG_WATCHDOG_TIME_INIT * Ok, last major rename for this round: Aaron Giles2011-01-011-1/+1 | | | | | | | | | | | | | | | | memory_region() == machine->region()->base() memory_region_length() == machine->region()->bytes() region_info -> memory_region Regex searches: S: memory_region( *)\(( *)([^,&]+), *([^)]+)\) R: \3->region\1\(\2\4\)->base\(\) S: memory_region_length( *)\(( *)([^,&]+), *([^)]+)\) R: \3->region\1\(\2\4\)->bytes\(\) * MDRV_* -> MCFG_* Aaron Giles2010-12-311-26/+26 | | | | | There hasn't been a machine driver for many years. * Added templates required_shared_ptr<> and optional_shared_ptr<> which