# CS5: OE RAM Expansion
# at 020000, size 128K, async, upper&lower, read, as, 1 waitstate, U/S
w 0xfffa60 0x0204	2
w 0xfffa62 0x6870	2
# CS8: /WE MSB = upper = even
# at 020000, size 128K, async, lower, write, as, 0 waitstate, U/S
w 0xfffa6c 0x0204 2
w 0xfffa6e 0x3030 2
# CS9: /WE MSB = lower = odd
# at 020000, size 128K, async, higher, write, as, 0 waitstate, U/S
w 0xfffa70 0x0204 2
w 0xfffa72 0x5030 2
# CS6, CS7, CS10: disabled
w 0xfffa66 0000  2
w 0xfffa6a 0000 2
w 0xfffa76 0000 2
#
# now we have 64K at 0x0 (BCC onboard ram) and
# 128K at 0x20000 from mem expansion 
# Note: we need to put 128K before 64K, otherwise we will have a gap of
# 64K. So we have to copy the local variables of 332bug (vector table,
# local variables, etc) from 0x0 (=64K) to 0x20000 (=128k).
# The 128K block will be mapped after this to 0x0 and the 64K block to
# 0x20000, so we have a contiguous ram block from 0x0 to 0x2ffff.
#
# clean buffer
z 0x20000 00 0x1000
z 0x21000 00 0x1000
z 0x22000 00 0x1000
# copy from 0x0 to 0x20000 len 0x2fff Bytes
# this is the parameter area of 332Bug
c 0x0000 0x20000 0x1000
c 0x1000 0x21000 0x1000
c 0x2000 0x22000 0x1000
# CS5, CS7, CS8: 128K at 0x0
w 0xfffa60 0x0004 2
w 0xfffa6c 0x0004 2
w 0xfffa70 0x0004 2
# CS0, CS1, CS2: BCC-RAM 64K at 0x020000
#	async, upper, write, as, 0 wait
w 0xfffa4c 0x0203 2
w 0xfffa4e 0x503e 2
w 0xfffa50 0x0203 2
w 0xfffa52 0x303e 2
w 0xfffa54 0x0203 2
w 0xfffa56 0x683e 2
