diff options
author | Happy <Happy-yappH@users.noreply.github.com> | 2015-03-24 18:17:25 -0600 |
---|---|---|
committer | Happy <Happy-yappH@users.noreply.github.com> | 2015-03-24 18:17:25 -0600 |
commit | d84c5cadac443473fe2e7e9897072a60fd2ae9b8 (patch) | |
tree | ca1d26abf98f493c337e5232d9fe1032b074d65e /src/mess/drivers/n64.c | |
parent | 5366e265b659f56409747aed207ddbc6e59548c8 (diff) |
Adding support for the N64DD. Currently use: mess n64dd -quickload disk -cart cart
Disk images need to be in head/track format. See https://github.com/Happy-yappH/ddconvert.git for format.
Currently does not support disk swapping or disk saving. Writes work to the copy in memory, but are not saved to the file.
Diffstat (limited to 'src/mess/drivers/n64.c')
-rw-r--r-- | src/mess/drivers/n64.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/src/mess/drivers/n64.c b/src/mess/drivers/n64.c index a25a2780689..fd0f65cb425 100644 --- a/src/mess/drivers/n64.c +++ b/src/mess/drivers/n64.c @@ -16,6 +16,7 @@ #include "includes/n64.h" #include "bus/generic/slot.h" #include "bus/generic/carts.h" +#include "imagedev/snapquik.h" class n64_mess_state : public n64_state { @@ -29,6 +30,8 @@ public: INTERRUPT_GEN_MEMBER(n64_reset_poll); DECLARE_DEVICE_IMAGE_LOAD_MEMBER(n64_cart); void mempak_format(UINT8* pak); + int quickload(device_image_interface &image, const char *file_type, int quickload_size); + DECLARE_QUICKLOAD_LOAD_MEMBER( n64dd ); }; READ32_MEMBER(n64_mess_state::dd_null_r) @@ -254,7 +257,7 @@ DEVICE_IMAGE_LOAD_MEMBER(n64_mess_state,n64_cart) MACHINE_START_MEMBER(n64_mess_state,n64dd) { machine_start(); - + machine().device<n64_periphs>("rcp")->dd_present = true; UINT8 *ipl = memregion("ddipl")->base(); for (int i = 0; i < 0x400000; i += 4) @@ -270,6 +273,20 @@ MACHINE_START_MEMBER(n64_mess_state,n64dd) } } +QUICKLOAD_LOAD_MEMBER(n64_mess_state,n64dd) +{ + return quickload(image, file_type, quickload_size); +} + +int n64_mess_state::quickload(device_image_interface &image, const char *file_type, int quickload_size) +{ + image.fseek(0, SEEK_SET); + image.fread(memregion("disk")->base(), quickload_size); + machine().device<n64_periphs>("rcp")->disk_present = true; + return IMAGE_INIT_PASS; +} + + INTERRUPT_GEN_MEMBER(n64_mess_state::n64_reset_poll) { n64_periphs *periphs = machine().device<n64_periphs>("rcp"); @@ -336,6 +353,7 @@ static MACHINE_CONFIG_DERIVED( n64dd, n64 ) MCFG_GENERIC_EXTENSIONS("v64,z64,rom,n64,bin") MCFG_GENERIC_LOAD(n64_mess_state, n64_cart) + MCFG_QUICKLOAD_ADD("quickload", n64_mess_state, n64dd, "bin,dsk", 0) MACHINE_CONFIG_END ROM_START( n64 ) @@ -364,6 +382,8 @@ ROM_START( n64dd ) ROM_REGION32_BE( 0x400000, "ddipl", ROMREGION_ERASEFF) ROM_LOAD( "64ddipl.bin", 0x000000, 0x400000, CRC(7f933ce2) SHA1(bf861922dcb78c316360e3e742f4f70ff63c9bc3) ) + ROM_REGION32_LE( 0x4400000, "disk", ROMREGION_ERASEFF) + ROM_REGION16_BE( 0x80, "normpoint", 0 ) ROM_LOAD( "normpnt.rom", 0x00, 0x80, CRC(e7f2a005) SHA1(c27b4a364a24daeee6e99fd286753fd6216362b4) ) |