Also fix up swap parameters in config.h
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
#define CONFIG_BANKS 1
/* And swapping */
#define SWAPDEV 2049 /* DriveWire drive 1 */
-#define SWAP_SIZE 0x80 /* 64K blocks */
-#define SWAPBASE 0x8000 /* We swap the lot in one, include the */
-#define SWAPTOP 0xFF00 /* uarea so its a round number of sectors */
+#define SWAP_SIZE 0x40 /* 32K in 512 byte blocks */
+#define SWAPBASE 0x8000 /* We swap the lot, including stashed uarea */
+#define SWAPTOP 0xFF00 /* so it's a round number of 256 byte sectors */
#define MAX_SWAPS 32
/* Permit large I/O requests to bypass cache and go direct to userspace */
cmpa U_DATA__U_PAGE+1
beq nostash
+ ; process was swapped out?
+ cmpa #0
+ bne not_swapped
+ jsr _swapper ; void swapper(ptptr p)
+ ldx _swapstack
+ lda P_TAB__P_PAGE_OFFSET+1,x
+
+not_swapped:
jsr map_process_a
; fetch uarea from process memory
lda #P_RUNNING
sta P_TAB__P_STATUS_OFFSET,x
+ ; fix any moved page pointers
+ lda P_TAB__P_PAGE_OFFSET+1,x
+ sta U_DATA__U_PAGE+1
+
ldx #0
stx _runticks