diff options
author | 2013-02-22 11:49:43 +0000 | |
---|---|---|
committer | 2013-02-22 11:49:43 +0000 | |
commit | bdb76fda6ee1fe48758b7dfbb3c82ea9863b31ec (patch) | |
tree | f841624edbc98394a98b6449f7bea7cfdc59c3c5 /src/mess/machine/super80.c | |
parent | 6370e160b60e310e7109eebd8b594e5b67125512 (diff) |
Finished moving quicload/snapshot formats into machine folder (nw)
Diffstat (limited to 'src/mess/machine/super80.c')
-rw-r--r-- | src/mess/machine/super80.c | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/src/mess/machine/super80.c b/src/mess/machine/super80.c index 2fa5d5dd5ce..a694b932ee9 100644 --- a/src/mess/machine/super80.c +++ b/src/mess/machine/super80.c @@ -1,7 +1,7 @@ /* Super80.c written by Robbbert, 2005-2009. See driver source for documentation. */ #include "includes/super80.h" - +#include "machine/z80bin.h" /**************************** PIO ******************************************************************************/ @@ -228,3 +228,29 @@ DRIVER_INIT_MEMBER(super80_state,super80v) { driver_init_common(machine()); } + +/*------------------------------------------------- + QUICKLOAD_LOAD( super80 ) +-------------------------------------------------*/ + +QUICKLOAD_LOAD( super80 ) +{ + UINT16 exec_addr, start_addr, end_addr; + int autorun; + + /* load the binary into memory */ + if (z80bin_load_file(&image, file_type, &exec_addr, &start_addr, &end_addr) == IMAGE_INIT_FAIL) + return IMAGE_INIT_FAIL; + + /* is this file executable? */ + if (exec_addr != 0xffff) + { + /* check to see if autorun is on (I hate how this works) */ + autorun = image.device().machine().root_device().ioport("CONFIG")->read_safe(0xFF) & 1; + + if (autorun) + image.device().machine().device("maincpu")->state().set_pc(exec_addr); + } + + return IMAGE_INIT_PASS; +}
\ No newline at end of file |