summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/machine/microtch.c
Commit message (Collapse)AuthorAgeFilesLines
* Move all devices into separate part of src tree (nw) Miodrag Milanovic2015-09-131-307/+0
|
* more pedantic fixes (NW) Cowering2015-07-081-1/+1
|
* update for Mariusz Wojcieszek (nw) Miodrag Milanovic2015-05-111-2/+2
|
* Added dummy license headers for EMU section (nw) Miodrag Milanovic2015-05-071-0/+2
|
* microtch: remove non-serial device (nw) cracyc2014-05-261-62/+28
|
* reverting, sorry for this vconv needs to be updated (nw) Miodrag Milanovic2014-03-311-1/+1
|
* VS2013 x64 is little bit more anal about signed/unsigned comparison (nw) Miodrag Milanovic2014-03-311-1/+1
|
* Changed parity & stop bits to an enum (you can now pass in 1.5). I've ↵ smf-2014-01-131-1/+1
| | | | updated the uarts that were testing for 1.5 stop bits to pass that in, but there are probably others & 1.5 stop bits is converted to 2 by diserial. However the 68681 requires stop bits to be specified in clocks, so this will change in the future. Replaced synchronous flag with start bit count, as some uarts can use a start bit in synchronous mode & that whether there is a start bit is all the flag is currently controlling. Updated rs232 terminal to allow startbits, stop bits 1.5 to be specified (although that is currently not supported by diserial) and individual transmit and receive baud rates. [smf]
* diserial: Remove defines, cleanup clocks/timers, add sync support [O. Galibert] Olivier Galibert2013-11-181-1/+9
|
* changed rest of devices (except cpu cores) to have shortname and sourcefile (nw) Miodrag Milanovic2013-06-211-3/+3
|
* firebeat: split midi keyboard to separate device [Carl] cracyc2013-06-051-2/+2
| | | pc16552d: kill it (nw)
* microtch: convert to devcb2 (nw) cracyc2013-06-021-34/+18
| | | | | meritm: convert to use ns16550 (nw) -- Only remaining user of pc16552d.c is firebeat.c.
* Cleanups and version bumpmame0148 Miodrag Milanovic2013-01-111-7/+7
|
* Since nobody checks for NULLs anyway, make Aaron Giles2012-09-191-1/+1
| | | | | | | | | | | | device_memory_interface::space() assert against NULL and return a reference, and pushed references throughout all address space usage in the system. Added a has_space() method to check for those rare case when it is ambiguous. [Aaron Giles] Also reinstated the generic space and added fatal error handlers if anyone tries to actually read/write from it.
* ioport.c C++ conversion. Mostly internal changes, with no Aaron Giles2012-05-031-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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")
* Converted memory_private to memory_manager and moved global memory Aaron Giles2012-04-051-1/+1
| | | | | | operations into methods on it. Converted the less-popular cases over in drivers that used them, leaving the bank management APIs global for now.
* One more to fix cmpsb (dir /s works now) and remove unused variables. [Carl] Miodrag Milanovic2012-02-201-2/+0
|
* mc146818 - Set period even if timer is disabled, required for windows nt [Carl] Miodrag Milanovic2012-02-201-21/+22
| | | | | | | diserial - added optinal rx and tx timers and callbacks [Carl] ins8250 - serial rx line high on start and fix for msr register [Carl] bitbanger - added 19200bps (no whatsnew)
* Rewrite INS8250 to use diserial, updated Microtouch to modern and made it ↵ Miodrag Milanovic2012-02-191-146/+203
| | | | serial device, updated connected drivers [Carl]
* Hooked up touch screen to Odeon Twister 2 [Mariusz Wojcieszek] mariuszw12011-10-041-44/+81
|
* BIG update. Aaron Giles2011-03-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 *)
* As promised, the bulk update of timer calls: Aaron Giles2011-02-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | timer_adjust_oneshot(t,...) => t->adjust(...) timer_adjust_periodic(t,...) => t->adjust(...) timer_reset(t,...) => t->reset(...) timer_enable(t,...) => t->enable(...) timer_enabled(t) => t->enabled() timer_get_param(t) => t->param() timer_get_ptr(t) => t->ptr() timer_set_param(t,...) => t->set_param(...) timer_set_ptr(t) => t->set_ptr(...) timer_timeelapsed(t) => t->elapsed() timer_timeleft(t) => t->remaining() timer_starttime(t) => t->start() timer_firetime(t) => t->expire() Also remove some stray legacy cpuexec* macros that were lurking in schedule.h): cpuexec_describe_context(m) => m->describe_context() cpuexec_boost_interleave(m,...) => m->scheduler().boot_interleave(...) cpuexec_trigger(m,...) => m->scheduler().trigger(...) cpuexec_triggertime(m,...) => m->scheduler().trigger(...) Specific regex'es used: timer_adjust_oneshot( *)\(( *)([^,;]+), * \3->adjust\1\(\2 timer_adjust_periodic( *)\(( *)([^,;]+), * \3->adjust\1\(\2 (->adjust.*), *0( *)\) \1\2\) timer_reset( *)\(( *)([^,;]+), * \3->reset\1\(\2 (->reset *\(.*)attotime::never \1 timer_enable( *)\(( *)([^,;]+), * \3->enable\1\(\2 timer_enabled( *)\(( *)([^,;)]+)\) \3->enabled\1\(\2\) timer_get_param( *)\(( *)([^,;)]+)\) \3->param\1\(\2\) timer_get_ptr( *)\(( *)([^,;)]+)\) \3->ptr\1\(\2\) timer_timeelapsed( *)\(( *)([^,;)]+)\) \3->elapsed\1\(\2\) timer_timeleft( *)\(( *)([^,;)]+)\) \3->remaining\1\(\2\) timer_starttime( *)\(( *)([^,;)]+)\) \3->start\1\(\2\) timer_firetime( *)\(( *)([^,;)]+)\) \3->expire\1\(\2\) timer_set_param( *)\(( *)([^,;]+), * \3->set_param\1\(\2 timer_set_ptr( *)\(( *)([^,;]+), * \3->set_ptr\1\(\2 cpuexec_describe_context( *)\(( *)([^,;)]+)\) \3->describe_context\1\(\2\) \&m_machine->describe_context m_machine.describe_context cpuexec_boost_interleave( *)\(( *)([^,;]+), * \3->scheduler().boost_interleave\1\(\2 cpuexec_trigger( *)\(( *)([^,;]+), * \3->scheduler().trigger\1\(\2 cpuexec_triggertime( *)\(( *)([^,;]+), * \3->scheduler().trigger\1\(\2
* Convert emu_timers to objects. Move implementation and management of Aaron Giles2011-02-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | timers into the scheduler. Retain TIMER devices as a separate wrapper in timer.c/.h. Inline wrappers are currently provided for all timer operations; a future update will bulk clean these up. Rather than using macros which hide generation of a string-ified name for callback functions, the new methods require passing both a function pointer plus a name string. A new macro FUNC() can be used to output both, and another macro MFUNC() can be used to output a stub-wrapped class member as a callback. Also added a time() method on the machine, so that machine->time() gives the current emulated time. A wrapper for timer_get_time is currently provided but will be bulk replaced in the future. For this update, convert all classic timer_alloc, timer_set, timer_pulse, and timer_call_after_resynch calls into method calls on the scheduler. For new device timers, added methods to the device_t class that make creating and managing these much simpler. Modern devices were updated to use these. Here are the regexes used; some manual cleanup (compiler-caught) will be needed since regex doesn't handle nested parentheses cleanly 1. Convert timer_call_after_resynch calls timer_call_after_resynch( *)\(( *)([^,;]+), *([^,;]+), *([^,;]+), *([^);]+)\) \3->scheduler().synchronize\1\(\2FUNC(\6), \5, \4\) 2. Clean up trailing 0, NULL parameters (synchronize[^;]+), 0, NULL\) \1) 3. Clean up trailing NULL parameters (synchronize[^;]+), NULL\) \1) 4. Clean up completely empty parameter lists synchronize\(FUNC\(NULL\)\) synchronize() 5. Convert timer_set calls timer_set( *)\(( *)([^,;]+), *([^,;]+), *([^,;]+), *([^,;]+), *([^);]+)\) \3->scheduler().timer_set\1\(\2\4, FUNC(\7), \6, \5\) 6. Clean up trailing 0, NULL parameters (timer_set[^;]+), 0, NULL\) \1) 7. Clean up trailing NULL parameters (timer_set[^;]+), NULL\) \1) 8. Convert timer_set calls timer_pulse( *)\(( *)([^,;]+), *([^,;]+), *([^,;]+), *([^,;]+), *([^);]+)\) \3->scheduler().timer_pulse\1\(\2\4, FUNC(\7), \6, \5\) 9. Clean up trailing 0, NULL parameters (timer_pulse[^;]+), 0, NULL\) \1) 10. Clean up trailing NULL parameters (timer_pulse[^;]+), NULL\) \1) 11. Convert timer_alloc calls timer_alloc( *)\(( *)([^,;]+), *([^,;]+), *([^);]+)\) \3->scheduler().timer_alloc\1\(\2FUNC(\4), \5\) 12. Clean up trailing NULL parameters (timer_alloc[^;]+), NULL\) \1) 13. Clean up trailing 0 parameters (timer_alloc[^;]+), 0\) \1) 14. Fix oddities introduced \&m_machine->scheduler() m_machine.scheduler()
* 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
* New games marked as NOT_WORKING mariuszw12010-10-141-0/+14
| | | | | ------------------------------- Magical Touch [Siftware, Mariusz Wojcieszek]
* pcat_nit.c update [Mariusz Wojcieszek] mariuszw12010-06-051-4/+60
| | | | | | | - added VGA emulation from MESS - added INS8250 emulation from MESS - added format decimal support to Microtouch - added rom banking and inputs to pcat_nit games - streetg(2) now boot properly
* Bulk driver.h -> emu.h switch. Aaron Giles2010-01-101-1/+1
|
* 2009/5/16 Mike Green <mikedx@gmail.com>: Aaron Giles2009-05-251-1/+1
| | | | | | | | | | | | | | | | > Here is a small patch for the touchmaster driver > > This removes the pulse input on the touchscreen for the touchmaster > drivers, making centipede returns (tm4k), breakout3k (tm3k), > wordsearch (tm8k) and possibly other games playable do to the need for > "dragging" the screen. An example of this is the word search game > where it is necessary to drag from the start letter to the end to > highlight the selection, which is not possible with a pulse input. > > Best regards > > Mike
* New games added or promoted from NOT_WORKING status mariuszw12009-04-291-2/+2
| | | | --------------------------------------------------- Pit Boss Supertouch 30 [Mariusz Wojcieszek]
* From: Atari Ace [mailto:atari_ace@verizon.net] Aaron Giles2008-12-211-5/+4
| | | | | | | | | | | | | | | | | | Sent: Friday, December 19, 2008 8:50 PM To: submit@mamedev.org Cc: atariace@hotmail.com Subject: [patch] Add machine/space to some callbacks Hi mamedev, This patch widens some machine callbacks to include an object (either machine or space). I didn't convert these earlier since MAME didn't explicitly need them, but some of these will be needed by MESS now that Machine is gone and in general all callbacks need to pass an object. ~aa
* This update is the below two patches, plus the remaining changes Aaron Giles2008-12-191-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | necessary to remove 12 of the final 14 references to the global Machine. The remaining 2 are in fatalerror() and logerror(), which are both local to mame.c, so Machine is now fully static. -- From: Atari Ace [mailto:atari_ace@verizon.net] Sent: Thursday, December 18, 2008 5:47 PM To: submit@mamedev.org Cc: atariace@hotmail.com Subject: [patch] Make Machine static followup Hi mamedev, This incremental patch to my last patch undoes the change that caches the ppu2c0x videorom. I changed the code back to how it behaved originally, using an existing machine on the chip struct to eliminate the one troublesome Machine reference. ~aa -- From: Atari Ace [mailto:atari_ace@verizon.net] Sent: Thursday, December 18, 2008 2:54 PM To: submit@mamedev.org Cc: atariace@hotmail.com Subject: [patch] Make Machine static! Hi mamedev, This large patch completes the removal of the use of Machine throughout MAME. It does so primarily by adding machine, device or space to various apis and modifying the callers, but for some remaining cases it adds a new api, mame_get_running_machine(), which will be called instead. There are only 14 uses of this api currently, and that number should drop over time. There are a few changes of note: 1. 6821pia.c. I attached machine to the 'device' structure. I'm working on converting this to a proper device, but that change isn't ready. 2. fddebug.c. I added a proper header so that the apis won't get accidentally converted to static again. 3. scsi.c. I added a machine to SCSIInstance. 4. system16.c. I modified sys16_patch_code to take an array of patches. 4. custom.h. I added the owning sound device to the reset/stop routines as well as the token. Note that passing only the device would require exposing the internals of custom_sound, as the token passed is not the device token, but the token returned from the CUSTOM_START routine. Better ideas here are welcome. 4. ppc2c0x.c. To avoid changing more interfaces, the init routine saves the videorom location rather than looks it up each time. I tried to choose what I felt was the natural parameter for an api, rather than always pass machine, but in some cases I used machine to limit the number of additional changes. Some additional cleanup here is probably warranted, I'll look into that later once I'm recovered from this two-week project. ~aa
* From: Atari Ace [atari_ace@verizon.net] Aaron Giles2008-12-111-3/+1
| | | | | | | | | | | | | | | | | | | Sent: Wednesday, December 10, 2008 9:27 AM To: submit@mamedev.org Cc: atariace@hotmail.com Subject: [patch] Add machine to some emu/machine init methods Hi mamedev, This patch widens some machine init interfaces to pass the machine parameter, allowing more Machine global references to be eliminated. Eventually most of these need to be converted to devices, but this change reduces the deprecation surface in the meantime. I also attached the script I used to do the initial changes to the drivers, which handled about 90% of the cases without further editing. ~aa
* Hi mamedev, Aaron Giles2008-12-081-13/+14
| | | | | | | | | | | | | | | | | | | | | | | This is a reworked/expanded version of the patch I sent yesterday. This one is split into three parts: 1. This introduces function macros for SAMPLES_START, CUSTOM_{START,STOP,RESET}, and ANTIC_RENDERER. 2. This introduces running_machine *machine throughout MAME. Principally it adds running_machine *machine = Machine to the top of functions, but in some static functions the parameter is added directly. Some similar changes in 99xxcore.h, v9938.c, v9938mod.c, galaxold.c, psx.c, taito_l.c are also made to eliminate Machine params. No global API is changed. 3. This changes the APIs introduced in the first part to pass device or space as appropriate. A few similar changes in some other global apis are made as well. The net result of this sequence of patches is to remove 40% of the Machine references and 27 deprecat.h includes. ~aa
* Changed save state system to accept machine parameters where Aaron Giles2008-12-051-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | appropriate, and to keep all global variables hanging off the machine structure. Once again, this means all state registration call sites have been touched: - state_save_register_global* now takes a machine parameter - state_save_register_item* now takes a machine parameter - added new state_save_register_device_item* which now uses the device name and tag to generate the base name Extended the fake sound devices to have more populated fields. Modified sound cores to use tags from the devices and simplified the start function. Renumbered CPU and sound get/set info constants to align with the device constants, and shared values where they were perfectly aligned. Set the type field in the fake device_configs for CPU and sound chips to a get_info stub which calls through to the CPU and sound specific get_info functions. This means the device_get_info() functions work for CPU and sound cores, even in their fake state. Changed device information getters from device_info() to device_get_info() to match the CPU and sound macros.
* Changed timer_alloc, timer_set, timer_pulse, timer_call_after_resynch, Aaron Giles2008-11-261-1/+2
| | | | | and timer_get_time to pass the machine parameter. Moved timer globals to hang off of the running_machine.
* Added "tag" parameter to state_save_register_item_* calls. Removed Aaron Giles2008-11-171-12/+12
| | | | | | state_save_combine_module_and_tag() function in favor of passing the tag when registering. Revisited all save state item registrations and changed them to use the tag where appropriate.
* NOTE: with this change, I have also removed PORT_START and renamed Aaron Giles2008-08-061-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | PORT_START_TAG to PORT_START. From: Fabio Priuli [mailto:doge.fabio@gmail.com] Subject: let's say goodbye to untagged input ports ;) Hi, enclosed please find a few patches against 126u3 source * port01.diff -> port09.diff : these patches continues the cleanup of inputs in drivers starting with C (the remaining ones), D and E. No ambiguous situations this time, so I guess there should be no problem with the changes. Improvements include conditional dips added to dynduke and diplocations for chinagat, chqflag, circus, citycon, cloak, contra and dynduke * tag01.diff -> tag09.diff : these patches add tag to EVERY input port in drivers starting with F->Z. Notice that only tags are added, no AM_READ_PORT, nor PORT_INCLUDE (and I saw a lot of drivers would need it ;) ), nor other cleanups contained in the patches above. I'll keep cleaning input next week, probably, but at least we can definitely remove the untagged version of PORT_START :) Notice I was able to compile the source commenting out the definition of PORT_START, so I guess every occurrence is covered...
* Cleanups for 0.124u4. Aaron Giles2008-04-241-6/+6
|
* (from Mariusz Wojcieszek) Aaron Giles2008-04-211-0/+185
Attached is diff which makes Touchmaster games playable. General changes: - Added preliminary 68681 DUART (machine\68681.c) - Moved Microtouch touch screen controller emulation to separate module (machine\microtch.c) New games added or promoted from NOT_WORKING status --------------------------------------------------- Touchmaster [Mariusz Wojcieszek] Touchmaster 3000 [Mariusz Wojcieszek] Touchmaster 4000 [Mariusz Wojcieszek] Touchmaster 5000 [Mariusz Wojcieszek] Touchmaster 7000 [Mariusz Wojcieszek]