mirror of
https://github.com/holub/mame
synced 2025-05-23 22:20:01 +03:00
![]() machine/device handlers. Unfortunately, the implementation relies on sentinel values to distinguish a port tag versus a pointer to function code. However, since this is a very common situation, it will hopefully be worth the slight grossness. New macros are defined in inptport.h: DEVICE8_PORT(name) - use this to specify the name of a port to read wherever a read8_device_func would normally be used MACHINE8_PORT(name) - same as DEVICE8_PORT except it can be used wherever a read8_machine_func would normally be used IS_HANDLER_PORT(ptr) - accepts a read8_device_func or read8_machine_func and determines if it is an actual function or a reference to a port; intended for use by devices that accept DEVICE8_PORT-style functions CALL_DEVICE8_READ(ptr,device,offset) - either calls through the given read8_device_func, or calls input_port_read with the appropriate tag, depending on the result of IS_HANDLER_PORT; intended for use by devices that accept DEVICE8_PORT-style functions CALL_MACHINE8_READ(ptr,machine,offset) - same as CALL_DEVICE8_READ except for read8_machine_func Note that in order for these to be useful, the consumer of the function pointer must be enhanced to use the CALL_* macros above instead of directly calling through the function. So far, only the 8255 PPI is set up to do this, as part of the cleanup below. Also note that the sentinel value is currently 4 consecutive 0 bytes; this may need to change in the future, in either length or value, so it is important to stick to the macros above. 8255 PPI interface cleanup: - added MDRV_PPI8255_ADD, MDRV_PPI8255_RECONFIG and MDRV_PPI8255_REMOVE macros; updated all drivers to use them - changed callbacks to device read/write handlers intead of machine read/write handlers; updated all drivers accordingly - normalized function and variable names to be lower_under - removed a number of redundant interfaces from the galaxian/ scamble line of games LD-V1000: added some (compile-time removed) information about the ROM and memory map |
||
---|---|---|
docs | ||
src | ||
.gitattributes | ||
makefile |