mirror of
https://github.com/mamedev/mame.git
synced 2024-11-16 07:48:32 +01:00
hyperscan: added quickload support.
This commit is contained in:
parent
74fa8ec158
commit
c25246cd26
3 changed files with 24 additions and 1 deletions
|
@ -285,7 +285,7 @@ Arch Linux
|
|||
|
||||
You’ll need a few prerequisites from your distro::
|
||||
|
||||
sudo pacman -S base-devel git sdl2 gconf sdl2_ttf gcc qt5
|
||||
sudo pacman -S base-devel git sdl2_ttf python libxinerama libpulse alsa-lib qt5-base
|
||||
|
||||
Compilation is exactly as described above in All Platforms.
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@ DEFINE_DEVICE_TYPE(SPG290_TIMER, spg290_timer_device, "spg290_timer", "SPG290 Ti
|
|||
spg290_timer_device::spg290_timer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: device_t(mconfig, SPG290_TIMER, tag, owner, clock)
|
||||
, m_irq_cb(*this)
|
||||
, m_enabled(false)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -71,6 +71,7 @@
|
|||
|
||||
#include "emu.h"
|
||||
#include "cpu/score/score.h"
|
||||
#include "imagedev/snapquik.h"
|
||||
#include "machine/spg290_cdservo.h"
|
||||
#include "machine/spg290_i2c.h"
|
||||
#include "machine/spg290_ppu.h"
|
||||
|
@ -110,6 +111,8 @@ private:
|
|||
|
||||
uint32_t spg290_screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
|
||||
DECLARE_QUICKLOAD_LOAD_MEMBER(quickload_hyper_exe);
|
||||
|
||||
void spg290_mem(address_map &map);
|
||||
void spg290_bios_mem(address_map &map);
|
||||
|
||||
|
@ -426,6 +429,23 @@ void spg29x_zone3d_game_state::machine_reset()
|
|||
}
|
||||
|
||||
|
||||
QUICKLOAD_LOAD_MEMBER(spg29x_game_state::quickload_hyper_exe)
|
||||
{
|
||||
const uint32_t length = image.length();
|
||||
|
||||
std::unique_ptr<u8 []> ptr;
|
||||
if (image.fread(ptr, length) != length)
|
||||
return image_init_result::FAIL;
|
||||
|
||||
auto &space = m_maincpu->space(AS_PROGRAM);
|
||||
for (uint32_t i = 0; i < length; i++)
|
||||
space.write_byte(0xa00901fc + i, ptr[i]);
|
||||
|
||||
m_maincpu->set_state_int(SCORE_PC, 0xa0091000); // Game entry point
|
||||
|
||||
return image_init_result::PASS;
|
||||
}
|
||||
|
||||
void spg29x_game_state::spg29x(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
|
@ -472,6 +492,8 @@ void spg29x_game_state::hyperscan(machine_config &config)
|
|||
|
||||
SOFTWARE_LIST(config, "cd_list").set_original("hyperscan");
|
||||
SOFTWARE_LIST(config, "card_list").set_original("hyperscan_card");
|
||||
|
||||
QUICKLOAD(config, "quickload", "exe").set_load_callback(FUNC(spg29x_game_state::quickload_hyper_exe));
|
||||
}
|
||||
|
||||
void spg29x_nand_game_state::nand_init(int blocksize, int blocksize_stripped)
|
||||
|
|
Loading…
Reference in a new issue