AGEMAME (formerly MAGE)

0.22 Preview

All change for this release, as we change name, location and license.
You may notice a slight change to our source delivery system, this is to remove excess strain from our server, and to 
highlight our derivative status. Essentially, the new source ZIPs must be applied over a normal MAME source, and to compile,
type mingw32-make -f makefile.age at the command prompt, rather than just mingw32-make.

During the transition period Peter Trauner contacted the old site offering an old MESS driver which ran the Fun World
video poker games (All those previously in the intgames.c driver). This has been merged with the work by Curt Coder to make
a working driver for all the games running on this hardware, bar igpoker, which appears to be a slightly different PCB type.

Unfortunately, we have no colour references to correct the palette handling, but the games do appear to be playable.

In order to use them, and to remove the false bug reports we are likely to receive, please read the following notes 
before playing:
	
	- It takes 48 seconds for the Fun World (bonuscrd/poker4/poker8) games to boot up
	  after the initial screen is displayed!!!
	- The default DIP switch settings MUST be used when first booting up the games
	  to allow them to complete the NVRAM initialization.
	- jollycrd/jollypkr: To initialise the NVRAM, Start game, press and hold Service1 & Service2, press
	  reset (F3), release Service1 & 2 and press reset (F3) again. Now the NVRAM
	  has been initialized.

Some ROMsets have had minor changes, these are:
bfmqtnd, gcr, oldtimer, paradice, pokio, ponttehk, sltbgpo, starspnr.

The use of a tool such as ClrMAME Pro can fix these (mostly name and case related), but magiccrd has been totally rebuilt,
and is therefore not fixable.


Version numbers relate to the documentation drivers (marked as MAGE)

0.21

Updated to 95 core, including improved CD image support.
Readded the missing YM2413 Reset in Scorpion 2 - should fix any hanging synth notes on any games in that driver.
Miscellaneous input cleanups, and reclassification of some games as not working (El Condor)
Removed SEGA pontoon, due to extreme likelihood of never being able to get it running, ponttehk name remains unchanged 
though.
barquest.c merged in with mpu4.c, but still crashes on execution.

0.20

Curt Coder and Tomasz Slanina cleaned up lvpoker.c and vroulet.c respectively.
This was merged with the total sound and input rewrite to make MAGE 0.20.

NOTE: The new sound core is experimental - if any games are broken, I need to know so I can fix them.
Apparently the YM2413 in Scorpion 2 is broken, but I don't know why.
EC's ADDENDUM: After an input error was discovered, 0.20 was rereleased - this amended version had a fixed YM2413, as
the problem was traced to a direct YM2413 call, which worked before, but really shouldn't have.

0.19u1

Added neogeo support - not working perfectly, but a start (Thanks Shin Emu Kikaku!).
More Scorpion 2 Video games added, namely two Belgian versions of Slots, that pay tokens and coins (Re-Animator)
Re-Animator has also improved mpu4 support, but there are still issues with IRQs and display timing (sdrawkcab deyalpsid 
gnieb si gnihtyreve, or to put it another way, everything is being displayed backwards)


0.19

Added Merlin's Money Maze, as it is a UK SWP.
At present, there are no plans to include Mahjong gambling games, as this simply duplicates the effort of others, and would
pose problems under the current maintenance schedule.
Other generic cleanups to match current core.

0.18u1

This has the potential to be one of the biggest releases we've put together - Re-Animator has been able to obtain
more BFM Scorpion 2 Video ROMs for inclusion, and has reworked the relevant drivers to fit.
The roll-call of games will make interesting reading, but ideally we need to find more ROM dumps from this hardware
to complete the set. Supported as a result of this release are:

Club Public Enemy No.1 (Not Working) (cpeno1)
Every Second Counts (Not Working) (Based on the semi-popular BBC Quiz hosted by Paul Daniels, it could do with a lot of 
magic to get it going)
Golden Crown (gcr)(A fruit machine where you pick what symbols appear on each reel)
Paradice (paradice) (An interesting Dutch puzzler, based on the 'Magic Square' maths problem)
Pokio (pokio)(A dutch poker game with a Quintoon style twist)
Pyramid (pyramid) (match pairs and move up the pyramid)
Quintoon (bfmqntn, bfmqtnd and bfmqtnd2) (UK SWP with revised sound and Dutch, non-gambling rules)
Slots (slotsnl) (Like gcr, only more complex)

The driver also supports other prototypes, but at the request of the companies involved we have disabled them. Without 
their support, very little of this release would have been possible so please, respect their wishes and do not reenable 
the games.

You will notice that the majority of these games do not appear to pay out, and have a high score table instead.
However, given the nature of the Scorpion 2 emulation,it is unlikely that these games will be considered for MAME,
as most sets have payout hardware attached, even if it's unused.

0.18

Managed to finally get together the new tools, and get them working reliably enough to process MAGE code.
In the process, I found a few minor issues in MAGE-specific drivers, which I've managed to shut up for now.
Adding new games has proven problematic in recent times (I can't do this alone!), but a SEGA title arrived just on deadline.
It probably will never work, as it requires more than one machine connected, but since when did MAGE games have to work ;).
It's another pontoon title, and it means that the current game 'pontoon' has been renamed to 'ponttekh', representing
Pontoon (Tekhan).

0.17cvs

As part of the bid to optimise the program, MAGE is planning to switch to a new, more common set of Windows-based compile 
tools (other OS's should continue as per their maintainer's wishes). There isn't much space to deal with the changes here,
but the files in question are listed on an external site, in the downloads section of MAGENET, under 'Compile Utilities'.

In the interim, some error messages have been turned off (they've actually been off in MAGE compiles for some time), but
eventually the fixes should come in and stabilise the program (the drivers which fail full compilation have been fixed in 
some way, but the corrected functions may not give the correct results (it's difficult to tell, since said functions are 
unused).

It should also be noted that the Visual C extension support has been radically reworked, in order to be fully compliant
with the new compiler regime. Things should still be fairly self-explanatory however.

Keeping things up to date with MAME core, not much else to report.
Some friendly soul (Lawrence Gold) has reworked the core to allow an easier fork from MAME source.
As it stands, it means I can now update the source from a basic diff, rather than manually, which should lower 
turnaround time.

Generic CPU updates of little concern to the project in the short term, but useful nonetheless.

Windows Debugger Updates
------------------------

Fixed some compile errors [Nathan Woods]

Misc updates [Aaron Giles]
* Added a "PC" register to the I386 core so that it should work in the new debugger
* Cleaned up stepping code
* Now refresh the display and all debugger windows after each step while stepping
* When running with the debugger window open (F5 or 'go'), now update the debugger views
4 times per second
* Can now break into the debugger even if you are focused on a debugger window
* Memory/disasm windows now come up with the currently active CPU selected by default
* added a new command: focus <cpunum>, which is equivalent to ignoring all 
other CPUs
* changed ignore and observe to support multiple parameters so you can say "ignore 2,3,4"
* changed ignore so that you are not allowed to ignore the last CPU
* fixed ignore behavior so that other CPUs are truly ignored
* fixed register window so that change hilights are maintained during scrolling and updates
* changed debug memory accessors so they don't log on invalid memory accesses
* tweaked the help text to indicate that help <command> works
* added a new text attribute DCA_CURRENT, which is separate from DCA_SELECTED -- the main
visible difference is that the memory view editing cursor is now hilighted red instead of
yellow

In-line memory editing is now supported. To do this, I added a generic 
cursor concept to the view system. Each view can handle it however they 
want. Right now only the memory view supports a cursor. [Aaron Giles]

Click in the memory view to place the cursor. Type over nibbles with 0-F, or 
use the arrow keys to navigate around. Tab cycles between the edit box and 
the memory editor. [Aaron Giles]

updated psx core to show more registers [smf]


0.16u1
MAGE is now a PinMAME licensed work - this allows for better compatibility with future MAME work (see below)

New Windows Debugger from MAME - developers, please test.

[Curt Coder]
cherrym.c
- use the original PRG512 program rom, as the board really has a 64k eprom 
for it
- I have a screenshot of the original game but can't work out how to use the 
color proms correctly :( background should be black etc.
- some dip switches figured out

lucky8.c
- fix startup crashing
- some dip switches figured out
- added the two proms that were mistakenly commented out


0.16
Updated core (MAME 88), should fix some compiler hangups.
Slightly better graphics system has been inherited.

Barquest (Crystal Maze) gfx are improved, but not perfect by any means.

Core specific details:

Discrete sound changes [Derrick Renaud]

	Discrete Sound Changes
	======================
	* Continued cleanup of code to make it more readable

	New Discrete Modules Added
	==========================
	* DISCRETE_NOTE - counter circuit used to create tones/music.
	* DISCRETE_INTEGRATE - various op amp integration (ramp) circuits.
	* DISCRETE_OP_AMP_TRIG_VCA - Did not know what to call this. :-)  Basically it
	is a programable voltage controlled amp.  But uses only an on/off trigger.  It
	has resistors to select the rise/fall times.  Also it is not a true VCA.  It
	actually adjusts amplitude by clipping more/less off the bottom of the input
	signal.  But it is a common circuit.
	
	Game Driver Changes
	===================
	* polaris - complete sound rewrite to use new component value code.  Hooked up
	watchdog timer.

New watchdog functionality [Derrick Renaud]
	
	Core Changes
	============
	Changed watchdog to allow it to start at machine run start.  If not used, the
	previous watchdog functionality is retained.  Only define 1 of the 2 watchdogs
	per game.  If both are defined then  MDRV_WATCHDOG_VBLANK_INIT will be used
	only.
	
	* MDRV_WATCHDOG_VBLANK_INIT(watch_count)- Initializes the watchdog in
	MACHINE_DRIVER_.  watch_count is the # of vertical blanking intervals before a
	forced reset.  If the time is unkown then you can use these defaults:
	DEFAULT_60HZ_3S_VBLANK_WATCHDOG or DEFAULT_30HZ_3S_VBLANK_WATCHDOG
	
	* MDRV_WATCHDOG_TIME_INIT(time)- Initializes the watchdog in MACHINE_DRIVER_.
	time is the time in seconds before a forced reset.
	
	New function to enable/disable the watchdog in game.
	watchdog_enable(0 or 1) - used to 0=disable or !0=enable.
	
	Made a macro that calculates the pulse time of a 74LS122 or LS123.
	TIME_OF_74LS123(r,c)
	r is in Ohms.  c is in Farads.
	c must be greater then 1000pF to use this function


Added runtime option to disable validity checks [Derrick Renaud]

	Added run time option:
	-[no]skip_validitychecks
	    Forces MAGE to skip doing the code validity checks. The default is
	    OFF (-noskip_validitychecks).
	This new option will default to doing the test and force you to confirm you
	do not want to use it.  This way users can test their submissions easily and
	then speed things up when confirmed ok.
	
	NOTE: DO NOT disable the checks when submitting code, or incure the wrath of the maintainer.

Input Port System Update [Aaron Giles]
	PORT_INCLUDE() works the same as before.

	PORT_MODIFY("tag") allows you to modify any given input port by specifying 
	its tag.

	Any PORT_BIT() entries that you put after a PORT_MODIFY will nuke any 
	matching entries in the previous definition, allowing you to overwrite them 
	with new stuff.
	
	I also added a few new functions:
	
	readinputportbytag_safe() takes a tag and a default value. If the tag is not 
	found, the default value is returned.
	
	port_tag_to_handler8()
	port_tag_to_handler16()
	port_tag_to_handler32() -- these 3 new functions take a tag string, find the 
	input port, and return the appropriate handler. They can be used in AM_READ, 
	so instead of:
	
	  AM_RANGE(0x00, 0x00) AM_READ(input_port_1_r)
	
	You can use
	
	  AM_RANGE(0x00, 0x00) AM_READ(port_tag_to_handler8("MyPortName"))

Memory system changes / fixes [Aaron Giles]
	* added explicit casting to the memory handler width when computing the 
	shifted data/mask values for read/write handlers -- this should in theory 
	fix R. Belmont's 64-bit issues

	* added memory_install_read/write8/16/32/64_matchmask_handler functions to 
	allow dynamic installation of match/mask (AM_SPACE-style) memory ranges --  
	this should satisfy Frank P's request for the astrocade driver
	
	* changed masking behavior for match/mask pairs so that an AM_SPACE with an 
	AM_MASK does not expand the explicitly-specified mask value -- this should 
	fix dwidel's problem getting Pac-Man accurate
	
	* changed dynamic bank assignment to always assign a bank if you have 
	explicitly specified a mask value via AM_MASK -- this should allow mirroring 
	via AM_MASK if you want to, though AM_MIRROR is still preferred.
	

More changes [Derrick Renaud]

	Core Changes
	============
	Fixed some last remaining issues with the new watchdog.  The watchdog would
	not remain disabled after a watchdog_enable(0) in some conditions.

	Added a new function to change CPU clock speed in game.  The current scaling
	factor will still apply.  eg. If you force the CPU to change clock to 1MHz
	while the scaling is at 50%, the effective CPU speed will be 500kHz.  Then
	reading the clock speed will give 1MHz, because clock scaling is transparent
	to the driver.

	/* Returns the current CPU's actual unscaled running clock speed */
	int cpunum_get_clock(int cpunum);

	/* Sets the current CPU's clock speed and then adjusts for scaling */
	void cpunum_set_clock(int cpunum, int clock);


0.15u2

Fixed ROMsets in the new games.
Patched version: merged Curt Coder's Tehkan tilemap fix to enable correct graphics in lvpoker.

0.15u1

Drivers now support MAME 0.86 architecture.
With the build maintainer off MAME duty for the forseeable future, MAGE work goes on in earnest.
Another line-by-line check revealed a few glitches, which have been corrected.
Added a large number of preliminary drivers by Curt Coder (everything new is his), who has also tidied up the lvpoker 
driver, so it can use the tilemap system.

Note that anyone wishing to continue working on the barquest hardware, should change the game name 'cmazeswp3'to 'cmzeswp3', 
there is a maximum of 8 characters per internal name.

Also, it is now looking likely that Quintoon is using the wrong sample ROMs, and that the Troutman audit set does not 
include them either. If anyone is in possession of a Quintoon PCB, or knows where to find the real sample ROMs, contact me.
Our project is soon to opt in to the Sourceforge donation program, we intend to use any money collected to purchase 
technical documents to assist with further work.

0.15

Drivers added to MAME 0.85u1
As a result of recent developments with the core, MAGE will now be distributed as a single compressed program (no DLL)
This is because of a source rewrite, which should enable porting to other formats, such as Mac OS and Unix (Please email 
El Condor if you wish to assist with this, as all current developers use Windows).

MPU4 has been reintroduced, after advice to the effect that the MPU4 has been declared 'dead' by the original manufacturer,
and that no actual boards have been produced for a considerable time.
However, care will still be taken to avoid damaging any remaining industries using second-hand units.

MAGE is proud to announce a major breakthrough - The BFM 'Adder' video board is now working with near-perfect CPU 
synchronisation. This video hardware was used for a number of games, but again, many are being sold/developed by BFM
satellite operations - discussions are taking place with contacts to determine future availability (Don't hold your breath).

Re-Animator has made many further changes (his descriptions are included):

drivers:
    - bfm_dm01.c,    small cleanup, this driver is not used anyway, it will
probaly move to video hardware once working
    - bfm_sc1.c,    - the watchdog timer is now emulated, so if the
'backdoor' is closed, the machine will reset instead of crashing
                           - the roms are now decoded in the emulator, so you
have to use different roms (the same as on a real machine)

    - bfm_sc2.c,    - updated multiplexed inputs
                            - added watchdog timer emulation, same as in
bfm_sc1.c
                            - adder hopper simulation (needed for future
belgian games)
                            - added some logging for electro mechanical
meters
                            - updated NEC sound chip interface code, uPD7759
now works including bank switching !!
                            - emulated coin lockouts
                            - emulated pay slides
                            - the roms are now decoded in the emulator, so
you have to use different roms (the same as on a real machine)
                            - added communication with 'adder2' video board
                            new game: bfmqntn BFM quintoon is now working !!
(Not two versions after all, the stake is changed via a DIP switch.)

    - bfm_sc4.c,    - small update started with SIM07 emulation
    - starspnr.c    - new driver for ACE starspinner
                            doesn't work.
                            I don't have a lot of experience with Z80 maybe
someone else can take this over.
                            I tried to decode the GFX roms, but it looks
like the the gfx hardware is NOT character based.
                            because the charset changes from
resolution(format) at a weird address.
                            So the video hardware is probaly pixel based.
machine:
    - mmtr.c    - 'int Mechmtr_update(int id, long cycles, int state)' now
returns 1 if a the meter ticked
vidhrdw:
    - bfm_adder2.c    , BFM adder2 video board emulation

Recoded all the drivers to use the new input system - should be fun in future, as all the INI files are now XML.
Incidentally, this means that any existing .cfg files should be deleted.
This has tightened up the inputs in Tehkan hardware games (pontoon, lvpoker).

New Games supported or promoted from GAME_NOT_WORKING status:
-------------------------------------------------------------
bfmqntn BFM Quintoon (Re-Animator)

New Non-Working games / clones supported:
----------------------------------------
starspnr ACE Starspinner (Re-Animator)
bfmfocus Focus (Re-Animator)

Games removed:
--------------
stablkjk Status Blackjack (Current driver is totally incompatible with new core, needs a total rewrite)

0.14
Continued to build Barquest driver, based on new information and a known good dump. The SAA1099 problem was traced to
an incorrect bus connection, which will be solved once emulation is more complete.

Also, renamed vidhrdw/pontoon.c to vidhrdw/lvpoker.c , and cleaned up lvpoker driver to include more options and better
input arrangements.

Moved distribution to Sourceforge.

0.13u2
Barquest hardware test driver (Dox) - at the moment all it does is dump the video ram (Every time sound is added, it 
crashes - there must be something odd about SAA1099)
Added Royal Casino (Curt Coder, input cleanups by El Condor)

0.13u1
MPU4 deleted on legal advice
0.13
Some new features added this time round, namely that all of Re-Animator's drivers have been updated in some form or another.
   bfm_sc1.c
	- fixed compiler warnings
	- merged separate read and write memorymaps to one single memorymap
   bfm_sc2.c
	- merged separate read and write memorymaps to one single memorymap
other Scorpion work too
   bfm_sys85.c 
	- merged separate read and write memorymaps to one single memorymap
   mpu4.c
	- update comment on memory map
	- added PSG AY8910 interface
	- added PTM6840 interface (PTM6840 emulation is not finished)
	- connected the emulated alpha display control lines to the 
	  display emulation.
          The display is now working !!
	- started with LAMP and LED multiplexers
          this can only work if the timer interrupts are working
          which needs the PTM6840 emulation !!
	- gamecard pia now uses the alternate mapping
          (probably wrong, but otherwise the software locks up waiting for the 
           unemulated OKI soundchip
	- added 50Hz signal.
machine:
  added a new module ptm6840, for emulating the motorola MC6840 PTM
  this does not work yet, 
  This module is very important for MPU4 emulation !!!
      ptm6840.c 
      ptm6840.h  

The main DLL is now compressed with UPX , to reduce footprints, if there are any load problems, let us know.

0.12u3
Another mini overhaul, updated to MAME Plus! 0.81u9, and fixed the graphics scaling features.

0.12u2
Experimental dev-sync release, everything in a state of flux.

0.12u1
As I sorted through yet another breakage due to a core change, I realised that there was an easier way of doing this.
BUT has assisted me greatly in an overhaul of MAME Plus! and MAGE to automate everything.
As a consequence, everything is now built automatically depending on the target definition. Config.def now contains all
the extras.

0.12
Switched to the MAME Plus compilation system, described in the html page provided. Note that warnings are to be expected,
and do not constitute a problem - MAME code is not actually designed to be studied at the level of pedantry I use.

Lovely Cards has been removed - it is not a gambling game (If you still want it, it's in MAME), its gambling equivalent 
Lovely Poker is still present as the new parent.
Basically this has been a housekeeping release, with all the new MAME code (including CD support) added. New features 
have been added

0.11
Everything up to date, core at version 0.80u1, new MAME Plus code in place.
You may have noticed a slight change in distribution, namely that every part of the main MAGE code is in one dll, with the 
different builds available as two interfaces. This is designed to reduce the amount of time needed to build a new 
distribution, and also to reduce the amount of bandwidth and disk space needed for either version - you can run both 
versions in the same directory, from the same dll.

The UI code is now a modified MAME Plus core, with the graphical touches added back in - and some new ones too - everything
is made that little bit more bulletproof.
Meanwhile, the preliminary drivers are still being constructed, with MPU4 now part of the selection (not working).

0.10u2
(It should be pointed out that the statement below regarding MAME32FX is incorrect, the core was available if modified - in
the end, it was decided to use an alternative. The misunderstanding was down to a mistranslation, and I apologise for any 
intimations about the legality of MAME32FX, implied or otherwise.)

Deleted new core, as apparently it can't be used by other projects (couldn't see that anywhere on the site though)
However, I can use the old core, which is almost as good, but doesnt use the fancy graphical features.
As a way of saying sorry, now the build contains the new coinmaster driver too, though like I say, it doesn't work properly.


0.10u1 

Now things get interesting... MAGE now starts to move away from the normal MAME core.
The internal user interface is the more advanced FX version (with VFD coloured text), the core is now at MAME .80, and 
there's more...
Thanks to Re-Animator, a preliminary simulation system is now included, for lamps, displays and reels.
No games work fully with it yet, but eventually BFM support will be added (I've tried to add MPU4 to the same system, 
but it still needs lots of testing).
Working drivers now have their memory maps merged, non working drivers remain in the old manner.
Also, pontoon.c games (pontoon,lvcards,lvpoker) have been reanalysed, it appears that lvcards may not be a gambling game 
- this will be checked in due course.
NOTE to porters - all drivers with bfm in their filenames, the new machines and coinmstr.c and mpu4.c are part of the new
system, all of them are considered unstable, and are included here solely for the benefit of the developers.

0.10

After a series of pre-releases, this should be considered the first stable version. After double checking the license. the 
build can be named without the MAME version number, so this has been adopted.
A full audit of every file was completed, and now SHA1 values are computed for all games, not just those from the 
non-updated drivers.
ROM sizes and names were also altered to match their logical equivalents, it is recommended that you check your files 
against the DAT issued prior to this release.
The frequencies of the Z80 processors in the IGS games have been amended to closer match their apparent original values
(The games ran on 1989 Konami boards, through the 'audio' CPU).
Pontoon now has a more realistic hopper setting, and will now pay out semi-automatically.
The MAGE code now uses the entirety of the MAME 0.79u4 library, with the timer improvements that that implies.
The team are currently having troubles with Playmark Roulette, it is believed that either the dump, or the hardware 
information is incorrect - we would be pleased if anyone possessing the board contacts us with more information.


0.7902
Fixed minor Lucky Poker ROM loading bug, still doesn't display correct tiles though, so the most likely culprit has been 
flagged.
Also corrected ROM naming of Lucky Today PROM, so that the best known dump is included.

0.7901

MAGE project started, source forked from MAME v79, and comprised of all the existing gambling drivers permitted under the
MAME license. In order to stabilise the build, some drivers have been merged/updated by El Condor.
Two new games have been partially coded, but have some severe issues,
described below.

New Games supported or promoted from GAME_NOT_WORKING status:
-------------------------------------------------------------

Champion Skill (with Ability)[Mirko Buffoni]
Golden Star[Mirko Buffoni]
Pontoon (Tehkan) [Zsolt Vasvari]
Lucky Cards [Uki, merged with Pontoon]
Super Derby [Haze]
Lucky Today [Unknown, converted to non-clone status]

New Clones supported or promoted from GAME_NOT_WORKING status:
--------------------------------------------------------------
Champion Skill (with Ability, Poker and Symbols)[Mirko Buffoni]
Golden Star (Blue Version)[Mirko Buffoni]
Lucky Poker [Uki, merged with Pontoon]

New Non-Working games / clones supported
----------------------------------------
Roulette (Playmark) [El Condor, based on Super Derby] (Graphics loading issues)
Blackjack (Status) [El Condor, hooked up to Status Triv II] (Should be Triv I or earlier, but shows some graphics, documentation only)

