summaryrefslogtreecommitdiffstatshomepage
path: root/src/mess/machine/sorcerer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mess/machine/sorcerer.c')
-rw-r--r--src/mess/machine/sorcerer.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/mess/machine/sorcerer.c b/src/mess/machine/sorcerer.c
index ea3d70dfbc5..25fb66015e3 100644
--- a/src/mess/machine/sorcerer.c
+++ b/src/mess/machine/sorcerer.c
@@ -284,15 +284,12 @@ READ8_MEMBER(sorcerer_state::sorcerer_fe_r)
- tied high, allowing PARIN and PAROUT bios routines to run */
UINT8 data = 0xc0;
- char kbdrow[6];
-
- sprintf(kbdrow,"X%X",m_keyboard_line);
/* bit 5 - vsync */
data |= m_iop_vs->read();
/* bits 4..0 - keyboard data */
- data |= ioport(kbdrow)->read();
+ data |= m_iop_x[m_keyboard_line]->read();
return data;
}
@@ -435,17 +432,17 @@ QUICKLOAD_LOAD_MEMBER( sorcerer_state, sorcerer )
{
UINT16 execute_address, start_address, end_address;
int autorun;
+ address_space &space = m_maincpu->space(AS_PROGRAM);
+
/* load the binary into memory */
- if (z80bin_load_file(&image, file_type, &execute_address, &start_address, &end_address) == IMAGE_INIT_FAIL)
+ if (z80bin_load_file(&image, space, file_type, &execute_address, &start_address, &end_address) == IMAGE_INIT_FAIL)
return IMAGE_INIT_FAIL;
/* is this file executable? */
if (execute_address != 0xffff)
{
/* check to see if autorun is on (I hate how this works) */
- autorun = ioport("CONFIG")->read_safe(0xFF) & 1;
-
- address_space &space = m_maincpu->space(AS_PROGRAM);
+ autorun = m_iop_config->read() & 1;
if ((execute_address >= 0xc000) && (execute_address <= 0xdfff) && (space.read_byte(0xdffa) != 0xc3))
return IMAGE_INIT_FAIL; /* can't run a program if the cartridge isn't in */