aboutsummaryrefslogtreecommitdiff
path: root/sim/m68hc11/dv-m68hc11.c
diff options
context:
space:
mode:
Diffstat (limited to 'sim/m68hc11/dv-m68hc11.c')
-rw-r--r--sim/m68hc11/dv-m68hc11.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sim/m68hc11/dv-m68hc11.c b/sim/m68hc11/dv-m68hc11.c
index 669a045..cad100a 100644
--- a/sim/m68hc11/dv-m68hc11.c
+++ b/sim/m68hc11/dv-m68hc11.c
@@ -1,5 +1,5 @@
/* dv-m68hc11.c -- CPU 68HC11&68HC12 as a device.
- Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
Written by Stephane Carrez (stcarrez@nerim.fr)
(From a driver model Contributed by Cygnus Solutions.)
@@ -324,8 +324,8 @@ attach_m68hc11_regs (struct hw *me,
if (hw_find_property (me, "use_bank") != NULL)
hw_attach_address (hw_parent (me), 0,
exec_map,
- 0x08000,
- 0x04000,
+ cpu->bank_start,
+ cpu->bank_end - cpu->bank_start,
me);
cpu_mode = "expanded";
@@ -843,7 +843,7 @@ m68hc11cpu_io_read_buffer (struct hw *me,
sd = hw_system (me);
cpu = STATE_CPU (sd, 0);
- if (base >= 0x8000 && base < 0xc000)
+ if (base >= cpu->bank_start && base < cpu->bank_end)
{
address_word virt_addr = phys_to_virt (cpu, base);
if (virt_addr != base)
@@ -864,7 +864,7 @@ m68hc11cpu_io_read_buffer (struct hw *me,
break;
memcpy (dest, &cpu->ios[base], 1);
- dest++;
+ dest = (char*) dest + 1;
base++;
byte++;
nr_bytes--;
@@ -1091,7 +1091,7 @@ m68hc11cpu_io_write_buffer (struct hw *me,
sd = hw_system (me);
cpu = STATE_CPU (sd, 0);
- if (base >= 0x8000 && base < 0xc000)
+ if (base >= cpu->bank_start && base < cpu->bank_end)
{
address_word virt_addr = phys_to_virt (cpu, base);
if (virt_addr != base)
@@ -1113,7 +1113,7 @@ m68hc11cpu_io_write_buffer (struct hw *me,
val = *((uint8*) source);
m68hc11cpu_io_write (me, cpu, base, val);
- source++;
+ source = (char*) source + 1;
base++;
byte++;
nr_bytes--;