Browse Source

integrated GEOS 128 2.0

pull/7/head
Michael Steil 2 years ago
parent
commit
fd4d73a79d
100 changed files with 11600 additions and 6286 deletions
  1. 248
    38
      Makefile
  2. 5
    4
      README.md
  3. 23
    3
      config.inc
  4. 10
    0
      inc/c64.inc
  5. 43
    33
      inc/const.inc
  6. 66
    2
      inc/geosmac.inc
  7. 1
    1
      inc/jumptab.inc
  8. 111
    4
      inc/kernal.inc
  9. 53
    0
      kernal/128k/bank_jmptab_back.s
  10. 58
    0
      kernal/128k/bank_jmptab_front.s
  11. 105
    0
      kernal/128k/banking.s
  12. 81
    0
      kernal/128k/cache.s
  13. 60
    0
      kernal/128k/cbm_jmptab.s
  14. 80
    0
      kernal/128k/swapdiskdriver.s
  15. 71
    0
      kernal/640/bswfont80.s
  16. 25
    0
      kernal/bitmask/bitmask1.s
  17. 20
    0
      kernal/bitmask/bitmask2.s
  18. 3
    21
      kernal/bitmask/bitmask3.s
  19. 0
    213
      kernal/bswfont.s
  20. 158
    0
      kernal/bswfont/bswfont.s
  21. 59
    0
      kernal/c128/iojmptab.s
  22. 104
    0
      kernal/c128/iowrapper.s
  23. 31
    0
      kernal/c128/irq_back.s
  24. 31
    0
      kernal/c128/irq_front.s
  25. 62
    0
      kernal/c128/junk_back.s
  26. 43
    0
      kernal/c128/junk_front.s
  27. 25
    0
      kernal/c128/low_jmptab.s
  28. 21
    0
      kernal/c128/mouseproxy.s
  29. 735
    0
      kernal/c128/softsprites.s
  30. 404
    0
      kernal/c128/vdc.s
  31. 31
    0
      kernal/c128/vdc_base.s
  32. 40
    0
      kernal/c128/vdc_init.s
  33. 16
    0
      kernal/c128/vectors_back.s
  34. 26
    0
      kernal/c128/vectors_front.s
  35. 0
    624
      kernal/conio.s
  36. 222
    0
      kernal/conio/conio1.s
  37. 47
    0
      kernal/conio/conio2.s
  38. 28
    0
      kernal/conio/conio3a.s
  39. 97
    0
      kernal/conio/conio3b.s
  40. 192
    0
      kernal/conio/conio4.s
  41. 119
    0
      kernal/conio/conio5.s
  42. 124
    0
      kernal/conio/conio6.s
  43. 0
    1528
      kernal/dlgbox.s
  44. 96
    0
      kernal/dlgbox/dlgbox1a.s
  45. 55
    0
      kernal/dlgbox/dlgbox1b.s
  46. 233
    0
      kernal/dlgbox/dlgbox1c.s
  47. 235
    0
      kernal/dlgbox/dlgbox1d.s
  48. 71
    0
      kernal/dlgbox/dlgbox1e1.s
  49. 146
    0
      kernal/dlgbox/dlgbox1e2.s
  50. 22
    0
      kernal/dlgbox/dlgbox1f.s
  51. 96
    0
      kernal/dlgbox/dlgbox1g.s
  52. 291
    0
      kernal/dlgbox/dlgbox1h.s
  53. 52
    0
      kernal/dlgbox/dlgbox1i.s
  54. 429
    0
      kernal/dlgbox/dlgbox1j.s
  55. 106
    0
      kernal/dlgbox/dlgbox1k.s
  56. 67
    0
      kernal/dlgbox/dlgbox2.s
  57. 25
    0
      kernal/files/compat.s
  58. 785
    0
      kernal/files/files10.s
  59. 32
    0
      kernal/files/files1a2a.s
  60. 252
    0
      kernal/files/files1a2b.s
  61. 225
    0
      kernal/files/files1b.s
  62. 23
    0
      kernal/files/files2.s
  63. 27
    0
      kernal/files/files3.s
  64. 298
    0
      kernal/files/files6a.s
  65. 30
    0
      kernal/files/files6b.s
  66. 341
    0
      kernal/files/files6c.s
  67. 32
    0
      kernal/files/files7.s
  68. 173
    0
      kernal/files/files8.s
  69. 97
    0
      kernal/files/files9.s
  70. 0
    1984
      kernal/filesys.s
  71. 34
    0
      kernal/fonts/fonts1.s
  72. 354
    239
      kernal/fonts/fonts2.s
  73. 187
    0
      kernal/fonts/fonts3.s
  74. 51
    0
      kernal/fonts/fonts4.s
  75. 20
    0
      kernal/fonts/fonts4a.s
  76. 109
    0
      kernal/fonts/fonts4b.s
  77. 0
    1475
      kernal/graph.s
  78. 127
    0
      kernal/graph/bitmapclip.s
  79. 257
    0
      kernal/graph/bitmapup.s
  80. 73
    0
      kernal/graph/clrscr.s
  81. 54
    0
      kernal/graph/graph2l1.s
  82. 47
    0
      kernal/graph/graph2p.s
  83. 189
    0
      kernal/graph/graphicsstring.s
  84. 55
    0
      kernal/graph/inline.s
  85. 147
    0
      kernal/graph/inlinefunc.s
  86. 785
    0
      kernal/graph/line.s
  87. 55
    0
      kernal/graph/mode.s
  88. 40
    0
      kernal/graph/normalize.s
  89. 40
    0
      kernal/graph/pattern.s
  90. 438
    0
      kernal/graph/point.s
  91. 153
    0
      kernal/graph/rect.s
  92. 186
    0
      kernal/graph/scanline.s
  93. 32
    1
      kernal/header/header.s
  94. 24
    0
      kernal/hw/hw1a.s
  95. 38
    42
      kernal/hw/hw1b.s
  96. 26
    0
      kernal/hw/hw2.s
  97. 27
    0
      kernal/hw/hw3.s
  98. 68
    0
      kernal/icon/icon1.s
  99. 67
    74
      kernal/icon/icon2.s
  100. 0
    0
      kernal/init.s

+ 248
- 38
Makefile View File

@@ -13,39 +13,199 @@ DESKTOP_CVT = desktop.cvt

ASFLAGS = -I inc -I .

# code that is in front bank of all variants
KERNAL_SOURCES= \
kernal/bitmask.s \
kernal/bswfont.s \
kernal/conio.s \
kernal/dlgbox.s \
kernal/filesys.s \
kernal/fonts.s \
kernal/graph.s \
kernal/header.s \
kernal/hw.s \
kernal/icon.s \
kernal/init.s \
kernal/irq.s \
kernal/jumptable.s \
kernal/keyboard.s \
kernal/load.s \
kernal/mainloop.s \
kernal/math.s \
kernal/memory.s \
kernal/menu.s \
kernal/misc.s \
kernal/mouse.s \
kernal/panic.s \
kernal/patterns.s \
kernal/process.s \
kernal/ramexp.s \
kernal/reu.s \
kernal/serial.s \
kernal/sprites.s \
kernal/start.s \
kernal/time.s \
kernal/tobasic.s \
kernal/vars.s \
kernal/bitmask/bitmask2.s \
kernal/conio/conio1.s \
kernal/conio/conio2.s \
kernal/conio/conio3a.s \
kernal/conio/conio4.s \
kernal/conio/conio6.s \
kernal/dlgbox/dlgbox1a.s \
kernal/dlgbox/dlgbox1b.s \
kernal/dlgbox/dlgbox1c.s \
kernal/dlgbox/dlgbox1d.s \
kernal/dlgbox/dlgbox1e1.s \
kernal/dlgbox/dlgbox1e2.s \
kernal/dlgbox/dlgbox1f.s \
kernal/dlgbox/dlgbox1g.s \
kernal/dlgbox/dlgbox1h.s \
kernal/dlgbox/dlgbox1i.s \
kernal/dlgbox/dlgbox1j.s \
kernal/dlgbox/dlgbox1k.s \
kernal/dlgbox/dlgbox2.s \
kernal/files/files10.s \
kernal/files/files1a2a.s \
kernal/files/files1a2b.s \
kernal/files/files1b.s \
kernal/files/files2.s \
kernal/files/files3.s \
kernal/files/files6a.s \
kernal/files/files6b.s \
kernal/files/files6c.s \
kernal/files/files7.s \
kernal/files/files8.s \
kernal/graph/clrscr.s \
kernal/graph/inlinefunc.s \
kernal/graph/graphicsstring.s \
kernal/graph/graph2l1.s \
kernal/graph/pattern.s \
kernal/graph/inline.s \
kernal/header/header.s \
kernal/hw/hw1a.s \
kernal/hw/hw1b.s \
kernal/hw/hw2.s \
kernal/hw/hw3.s \
kernal/icon/icon1.s \
kernal/icon/icon2.s \
kernal/init/init1.s \
kernal/init/init2.s \
kernal/init/init3.s \
kernal/init/init4.s \
kernal/irq/irq.s \
kernal/jumptab/jumptab.s \
kernal/keyboard/keyboard1.s \
kernal/keyboard/keyboard2.s \
kernal/keyboard/keyboard3.s \
kernal/load/deskacc.s \
kernal/load/load1a.s \
kernal/load/load1b.s \
kernal/load/load1c.s \
kernal/load/load2.s \
kernal/load/load3.s \
kernal/load/load4b.s \
kernal/mainloop/mainloop1.s \
kernal/mainloop/mainloop3.s \
kernal/math/shl.s \
kernal/math/shr.s \
kernal/math/muldiv.s \
kernal/math/neg.s \
kernal/math/dec.s \
kernal/math/random.s \
kernal/math/crc.s \
kernal/memory/memory1a.s \
kernal/memory/memory1b.s \
kernal/memory/memory2.s \
kernal/memory/memory3.s \
kernal/menu/menu1.s \
kernal/menu/menu2.s \
kernal/menu/menu3.s \
kernal/misc/misc.s \
kernal/mouse/mouse1.s \
kernal/mouse/mouse2.s \
kernal/mouse/mouse3.s \
kernal/mouse/mouse4.s \
kernal/mouse/mouseptr.s \
kernal/panic/panic.s \
kernal/patterns/patterns.s \
kernal/process/process1.s \
kernal/process/process2.s \
kernal/process/process3a.s \
kernal/process/process3aa.s \
kernal/process/process3b.s \
kernal/process/process3c.s \
kernal/reu/reu.s \
kernal/serial/serial1.s \
kernal/serial/serial2.s \
kernal/sprites/sprites.s \
kernal/time/time1.s \
kernal/time/time2.s \
kernal/tobasic/tobasic2.s \
kernal/vars/vars.s

# code that is in front bank of C64 only
ifneq ($(VARIANT), bsw128)
KERNAL_SOURCES += \
kernal/start/start64.s \
kernal/bitmask/bitmask1.s \
kernal/bitmask/bitmask3.s \
kernal/bswfont/bswfont.s \
kernal/conio/conio3b.s \
kernal/conio/conio5.s \
kernal/files/files9.s \
kernal/fonts/fonts1.s \
kernal/fonts/fonts2.s \
kernal/fonts/fonts3.s \
kernal/fonts/fonts4.s \
kernal/fonts/fonts4a.s \
kernal/fonts/fonts4b.s \
kernal/graph/bitmapclip.s \
kernal/graph/bitmapup.s \
kernal/graph/line.s \
kernal/graph/point.s \
kernal/graph/rect.s \
kernal/graph/scanline.s \
kernal/mainloop/mainloop2.s \
kernal/ramexp/ramexp1.s \
kernal/ramexp/ramexp2.s \
kernal/rename.s \
kernal/tobasic/tobasic1.s
endif

# code that is in front bank of C128 only
ifeq ($(VARIANT), bsw128)
KERNAL_SOURCES += \
kernal/start/start128.s \
kernal/128k/bank_jmptab_front.s \
kernal/128k/banking.s \
kernal/128k/cbm_jmptab.s \
kernal/c128/iojmptab.s \
kernal/c128/iowrapper.s \
kernal/c128/irq_front.s \
kernal/c128/junk_front.s \
kernal/c128/low_jmptab.s \
kernal/c128/mouseproxy.s \
kernal/c128/vdc_base.s \
kernal/c128/vdc_init.s \
kernal/c128/vectors_front.s \
kernal/files/compat.s \
kernal/graph/normalize.s \
kernal/graph/mode.s \
kernal/memory/memory_128.s
endif

# code that is in C128 back bank
KERNAL2_SOURCES= \
kernal/128k/bank_jmptab_back.s \
kernal/128k/cache.s \
kernal/128k/swapdiskdriver.s \
kernal/640/bswfont80.s \
kernal/bitmask/bitmask1.s \
kernal/bitmask/bitmask2.s \
kernal/bitmask/bitmask3.s \
kernal/bswfont/bswfont.s \
kernal/c128/irq_back.s \
kernal/c128/junk_back.s \
kernal/c128/softsprites.s \
kernal/c128/vdc.s \
kernal/c128/vdc_base.s \
kernal/c128/vectors_back.s \
kernal/conio/conio3b.s \
kernal/conio/conio5.s \
kernal/files/files1a2a.s \
kernal/files/files9.s \
kernal/fonts/fonts1.s \
kernal/fonts/fonts2.s \
kernal/fonts/fonts3.s \
kernal/fonts/fonts4.s \
kernal/fonts/fonts4a.s \
kernal/fonts/fonts4b.s \
kernal/graph/line.s \
kernal/graph/rect.s \
kernal/graph/scanline.s \
kernal/graph/graph2p.s \
kernal/graph/bitmapclip.s \
kernal/graph/bitmapup.s \
kernal/graph/point.s \
kernal/graph/normalize.s \
kernal/math/shl.s \
kernal/math/neg.s \
kernal/memory/backram.s \
kernal/tobasic/tobasic2_128.s

# code that is in Wheels front bank only
ifeq ($(VARIANT), wheels)
KERNAL_SOURCES += \
kernal/wheels/wheels.s \
kernal/wheels/ram.s \
kernal/wheels/devnum.s \
@@ -57,7 +217,13 @@ KERNAL_SOURCES= \
kernal/wheels/copyfile.s \
kernal/wheels/loadb.s \
kernal/wheels/tobasicb.s \
kernal/wheels/reux.s \
kernal/wheels/reux.s
endif

ifeq ($(VARIANT), bsw128)
RELOCATOR_SOURCES = \
kernal/start/relocator128.s
endif

DRIVER_SOURCES= \
drv/drv1541.bin \
@@ -83,12 +249,16 @@ DEPS= \
inc/printdrv.inc

KERNAL_OBJS=$(KERNAL_SOURCES:.s=.o)
KERNAL2_OBJS=$(KERNAL2_SOURCES:.s=.o)
RELOCATOR_OBJS=$(RELOCATOR_SOURCES:.s=.o)
DRIVER_OBJS=$(DRIVER_SOURCES:.s=.o)
ALL_OBJS=$(KERNAL_OBJS) $(DRIVER_OBJS)

BUILD_DIR=build/$(VARIANT)

PREFIXED_KERNAL_OBJS = $(addprefix $(BUILD_DIR)/, $(KERNAL_OBJS))
PREFIXED_KERNAL2_OBJS = $(addprefix $(BUILD_DIR)/, $(KERNAL2_OBJS))
PREFIXED_RELOCATOR_OBJS = $(addprefix $(BUILD_DIR)/, $(RELOCATOR_OBJS))

ALL_BINS= \
$(BUILD_DIR)/kernal/kernal.bin \
@@ -102,6 +272,11 @@ ALL_BINS= \
$(BUILD_DIR)/input/koalapad.bin \
$(BUILD_DIR)/input/pcanalog.bin

ifeq ($(VARIANT), bsw128)
ALL_BINS += \
$(BUILD_DIR)/kernal/kernal2.bin \
$(BUILD_DIR)/kernal/relocator.bin
endif

all: $(BUILD_DIR)/$(D64_RESULT)

@@ -131,16 +306,43 @@ $(BUILD_DIR)/$(D64_RESULT): $(BUILD_DIR)/kernal_compressed.prg

$(BUILD_DIR)/kernal_compressed.prg: $(BUILD_DIR)/kernal_combined.prg
@echo Creating $@
ifeq ($(VARIANT), bsw128)
# pucrunch can't compress for C128 :(
cp $< $@
else
$(PUCRUNCH) -f -c64 -x0x5000 $< $@ 2> /dev/null
endif

$(BUILD_DIR)/kernal_combined.prg: $(ALL_BINS)
ifeq ($(VARIANT), bsw128)
@echo Creating $@ from kernal.bin $(DRIVE).bin kernal2.bin relocator.bin $(INPUT).bin
printf "\x00\x48" > $(BUILD_DIR)/tmp.bin
# relocator.bin($4800) @ $4800-$4C00 -> $4800
cat $(BUILD_DIR)/kernal/relocator.bin /dev/zero | dd bs=1 count=1024 >> $(BUILD_DIR)/tmp.bin 2> /dev/null
# kernal.bin($5000) @ $5000-$5400 -> $4C00
cat $(BUILD_DIR)/kernal/kernal.bin /dev/zero | dd bs=1 count=1024 >> $(BUILD_DIR)/tmp.bin 2> /dev/null
# kernal.bin($5000) @ $C000-$0000 -> $5000
cat $(BUILD_DIR)/kernal/kernal.bin /dev/zero | dd bs=1 count=16384 skip=28672 >> $(BUILD_DIR)/tmp.bin 2> /dev/null
# drv*.bin($9000) @ $9000-$9D80 -> $9000
cat $(BUILD_DIR)/drv/$(DRIVE).bin /dev/zero | dd bs=1 count=3456 >> $(BUILD_DIR)/tmp.bin 2> /dev/null
# kernal.bin($5000) @ $9D80-$A000 -> $9D80
cat $(BUILD_DIR)/kernal/kernal.bin /dev/zero | dd bs=1 count=640 skip=19840 >> $(BUILD_DIR)/tmp.bin 2> /dev/null
# kernal2.bin($C000) @ $E000-$0000 -> $A000
cat $(BUILD_DIR)/kernal/kernal2.bin /dev/zero | dd bs=1 count=8192 skip=8192 >> $(BUILD_DIR)/tmp.bin 2> /dev/null
# kernal2.bin($C000) @ $C000-$E000 -> $C000
cat $(BUILD_DIR)/kernal/kernal2.bin /dev/zero | dd bs=1 count=8192 >> $(BUILD_DIR)/tmp.bin 2> /dev/null

@mv $(BUILD_DIR)/tmp.bin $(BUILD_DIR)/kernal_combined.prg

else
@echo Creating $@ from kernal.bin $(DRIVE).bin $(INPUT).bin
@printf "\x00\x50" > $(BUILD_DIR)/tmp.bin
@dd if=$(BUILD_DIR)/kernal/kernal.bin bs=1 count=16384 >> $(BUILD_DIR)/tmp.bin 2> /dev/null
@cat $(BUILD_DIR)/drv/$(DRIVE).bin /dev/zero | dd bs=1 count=3456 >> $(BUILD_DIR)/tmp.bin 2> /dev/null
@cat $(BUILD_DIR)/kernal/kernal.bin /dev/zero | dd bs=1 count=24832 skip=19840 >> $(BUILD_DIR)/tmp.bin 2> /dev/null
printf "\x00\x50" > $(BUILD_DIR)/tmp.bin
dd if=$(BUILD_DIR)/kernal/kernal.bin bs=1 count=16384 >> $(BUILD_DIR)/tmp.bin 2> /dev/null
cat $(BUILD_DIR)/drv/$(DRIVE).bin /dev/zero | dd bs=1 count=3456 >> $(BUILD_DIR)/tmp.bin 2> /dev/null
cat $(BUILD_DIR)/kernal/kernal.bin /dev/zero | dd bs=1 count=24832 skip=19840 >> $(BUILD_DIR)/tmp.bin 2> /dev/null
@cat $(BUILD_DIR)/input/$(INPUT).bin >> $(BUILD_DIR)/tmp.bin 2> /dev/null
@mv $(BUILD_DIR)/tmp.bin $(BUILD_DIR)/kernal_combined.prg
endif

$(BUILD_DIR)/drv/drv1541.bin: $(BUILD_DIR)/drv/drv1541.o drv/drv1541.cfg $(DEPS)
$(LD) -C drv/drv1541.cfg $(BUILD_DIR)/drv/drv1541.o -o $@
@@ -175,7 +377,15 @@ $(BUILD_DIR)/%.o: %.s

$(BUILD_DIR)/kernal/kernal.bin: $(PREFIXED_KERNAL_OBJS) kernal/kernal_$(VARIANT).cfg
@mkdir -p $$(dirname $@)
$(LD) -C kernal/kernal_$(VARIANT).cfg $(PREFIXED_KERNAL_OBJS) -o $@ -m $(BUILD_DIR)/kernal/kernal.map
$(LD) -C kernal/kernal_$(VARIANT).cfg $(PREFIXED_KERNAL_OBJS) -o $@ -m $(BUILD_DIR)/kernal/kernal.map -Ln $(BUILD_DIR)/kernal/kernal.lab

$(BUILD_DIR)/kernal/kernal2.bin: $(PREFIXED_KERNAL2_OBJS) kernal/kernal2_$(VARIANT).cfg
@mkdir -p $$(dirname $@)
$(LD) -C kernal/kernal2_$(VARIANT).cfg $(PREFIXED_KERNAL2_OBJS) -o $@ -m $(BUILD_DIR)/kernal/kernal2.map -Ln $(BUILD_DIR)/kernal/kernal2.lab

$(BUILD_DIR)/kernal/relocator.bin: $(PREFIXED_RELOCATOR_OBJS) kernal/relocator_$(VARIANT).cfg
@mkdir -p $$(dirname $@)
$(LD) -C kernal/relocator_$(VARIANT).cfg $(PREFIXED_RELOCATOR_OBJS) -o $@ -m $(BUILD_DIR)/kernal/relocator.map -Ln $(BUILD_DIR)/kernal/relocator.lab

# a must!
love:

+ 5
- 4
README.md View File

@@ -57,11 +57,11 @@ The [cc65](https://github.com/cc65/cc65) compiler suite allows writing GEOS appl

## Source

This is the reverse engineered source code of the KERNAL (plus disk and input drivers) of the English version of GEOS 2.0 for Commodore 64.
This is the reverse engineered source code of the KERNAL (plus disk and input drivers) of the English version of GEOS 2.0 for Commodore 64 and Commodore 128.

The source has been heavily reorganized and modularized, nevertheless, a standard compile will generate binaries that are identical with the GEOS 2.0 distribution binaries.
The source has been heavily reorganized and modularized, nevertheless, a standard compile will generate binaries that are identical with the GEOS 64 2.0 and GEOS 128 2.0 distribution binaries.

Optionally, the following features that were not part of the original GEOS 2.0 can be enabled:
Optionally, the following features that were not part of the original GEOS 2.0 can be enabled for GEOS64:

* gateWay 2.51 KERNAL patches
* +60K RAM support
@@ -78,7 +78,7 @@ Without pucrunch/c1541, you can still build an uncompressed KERNAL binary image.

## Building

Run `make` to build the original "BSW" "GEOS. This will create the following files in directory `build/bsw`:
Run `make` to build the original "BSW" GEOS for C64. This will create the following files in directory `build/bsw`:

* raw KERNAL components: `kernal.bin`, `lokernal.bin`, `init.bin`
* disk drive drivers: `drv1541.bin`, `drv1571.bin`, `drv1581.bin`
@@ -97,6 +97,7 @@ The build system supports the following variants:
* `cbmfiles`: The [cbmfiles.com](http://www.cbmfiles.com/) version. It starts out with a different date, and has some variables in the kernel pre-filled.
* `gateway`: The patched KERNEL shipped by gateWay 2.51. It contains a slightly modified BSW font, has the `Panic` code replaced with code to swap the disk driver on a RESTORE press, and it loads `GATEWAY` instead of `DESK TOP` as the shell.
* `wheels`: The Wheels 64 variant. It is heavily patched, optimized for size and speed, and contains additional features. It requires a RAM extension. The current version compiles into the same binary, but won't actually run because of missing boot code. More work is needed here.
* `bsw128`: Berkeley Softworks GEOS 128 2.0 variant, i.e. GEOS for C128 with 128 KB RAM and VDC 640px width support. This needs some more work to actually boot.
* `custom`: See below.

You can build a specific variant like this:

+ 23
- 3
config.inc View File

@@ -1,6 +1,9 @@
; GEOS System build configuration
; by Maciej Witkowiak

.ifndef config_inc
config_inc = 1

;------------------------
; which variant to build
;------------------------
@@ -11,14 +14,24 @@
;------------------------
.ifdef bsw
; BSW traps to counter tampering
trap = 1
traps = 1
.endif

;------------------------
; the Berkeley Softworks GEOS 128 2.0 variant
;------------------------
.ifdef bsw128
; BSW traps to counter tampering
traps = 1
trap2_alternate_location = 1
.endif

;------------------------
; the cbmfiles.com variant of GEOS 64 2.0
;------------------------
.ifdef cbmfiles
trap = 1
; BSW traps to counter tampering
traps = 1

; additionally, there are ".ifdef cbmfiles" checks
; throughout the code
@@ -28,7 +41,7 @@
; the gateWay 2.51 variant
;------------------------
.ifdef gateway
trap = 1
traps = 1
gateway_font = 1

; additionally, there are ".ifdef gateway" checks
@@ -148,6 +161,11 @@ useRamExp = 1
REUPresent = 1
.endif

.ifdef traps
trap1 = 1
trap2 = 1
.endif

.if .defined(drv1541)
DRV_TYPE = 1 ; DRV_1541
.elseif .defined(drv1571)
@@ -157,3 +175,5 @@ DRV_TYPE = 3; DRV_1581
.else
.error "Unknown drive type!"
.endif

.endif

+ 10
- 0
inc/c64.inc View File

@@ -1,3 +1,5 @@
.include "config.inc"

; Commodore Kernal equates
tapeBuffVec = $b2
curScrLine = $d1
@@ -7,8 +9,13 @@ kbdQue = $0277
BASICMemBot = $0282
BASICMemTop = $0284
scrAddrHi = $0288
.ifdef bsw128
PALNTSCFLAG = $0A03
BASICspace = $1C00
.else
PALNTSCFLAG = $02a6
BASICspace = $0800
.endif
BASIC_START = $a000
curScrLineColor = $d8f0
KERNALVecTab = $fd30
@@ -89,3 +96,6 @@ vdcdata = $d601
PLUS60K_CR = $d100
RAMC_BASE = $de00
RAMC_WINDOW = $df00

; C128
rcr = $D506

+ 43
- 33
inc/const.inc View File

@@ -125,33 +125,35 @@ OUTLINEON = 26
PLAINTEXT = 27

; keyboard
KEY_F1 = 1
KEY_F2 = 2
KEY_F3 = 3
KEY_F4 = 4
KEY_F5 = 5
KEY_F6 = 6
KEY_NOSCRL = 7
KEY_ENTER = 11
KEY_F7 = 14
KEY_F8 = 15
KEY_UP = 16
KEY_DOWN = 17
KEY_HOME = 18
KEY_CLEAR = 19
KEY_LARROW = 20
KEY_UPARROR = 21
KEY_STOP = 22
KEY_RUN = 23
KEY_BPS = 24
KEY_HELP = 25
KEY_ALT = 26
KEY_ESC = 27
KEY_INSERT = 28
KEY_DELETE = 29
KEY_RIGHT = 30
KEY_INVALID = 31
KEY_LEFT = BACKSPACE
KEY_F1 = 1
KEY_F2 = 2
KEY_F3 = 3
KEY_F4 = 4
KEY_F5 = 5
KEY_F6 = 6
KEY_NOSCRL = 7
KEY_TAB = 9
KEY_LF = 10
KEY_ENTER = 11
KEY_F7 = 14
KEY_F8 = 15
KEY_UP = 16
KEY_DOWN = 17
KEY_HOME = 18
KEY_CLEAR = 19
KEY_LARROW = 20
KEY_UPARROR = 21
KEY_STOP = 22
KEY_RUN = 23
KEY_BPS = 24
KEY_HELP = 25
KEY_ALT = 26
KEY_ESC = 27
KEY_INSERT = 28
KEY_DELETE = 29
KEY_RIGHT = 30
KEY_INVALID = 31
KEY_LEFT = BACKSPACE

; DialogBox
; icons
@@ -230,7 +232,7 @@ STRUCT_MISMAT = 10
BFR_OVERFLOW = 11
CANCEL_ERR = 12
DEV_NOT_FOUND = 13
INCOMPATIBLE = 14
INCOMPATIBLE = 14 ; GEOS128
HDR_NOT_THERE = $20
NO_SYNC = $21
DBLK_NOT_THERE = $22
@@ -408,11 +410,6 @@ ST_LD_DATA = $80
ST_PR_DATA = $40
ST_WR_PR = $40

; ???
ADD1_W = $2000
DOUBLE_B = $80
DOUBLE_W = $8000

CLR_SAVE = %01000000
CONSTRAINED = %01000000
UN_CONSTRAINED = %00000000
@@ -424,3 +421,16 @@ FUTURE3 = 9
FUTURE4 = 10
USELAST = 127
SHORTCUT = 128

; C128 640 support
ADD1_W = $2000
ADD1_B = $20
DOUBLE_W = $8000
DOUBLE_B = $80

; C128 bsw128

ARROW = 0 ; pass this to SetMsePic

GR_40 = 0 ; use these two to test
GR_80 = $80 ; graphMode

+ 66
- 2
inc/geosmac.inc View File

@@ -1,6 +1,8 @@
; GEOS macros
; reassembled for 6502TASM/MMS by Maciej 'YTM/Alliance' Witkowiak

.include "config.inc"

.macro LoadB dest, value
lda #value
sta dest
@@ -202,7 +204,7 @@
.endmacro

.macro smbf_ bitN, dest
lda dest
lda dest
ora #1 << bitN
sta dest
.endmacro
@@ -298,7 +300,7 @@ lda dest

.macro bnex addr
txa
bne addr
bne addr
.endmacro

.macro beqx addr
@@ -306,7 +308,69 @@ lda dest
beq addr
.endmacro

.macro IncW addr
.local @j
inc addr
bne @j
inc addr+1
@j:
.endmacro


.macro ASSERT_NOT_BELOW_IO
.assert * < $D000 || * >= $E000, error, "This code can't run below the C64 I/O area."
.endmacro

.ifdef bsw128
.macro START_IO
.endmacro
.macro END_IO
.endmacro
.macro START_IO_X
.endmacro
.macro END_IO_X
.endmacro
.macro START_IO_Y
.endmacro
.macro END_IO_Y
.endmacro
.macro START_IO_128
PushB config
LoadB config, CIOIN
.endmacro
.macro END_IO_128
PopB config
.endmacro
.else
.macro START_IO
PushB CPU_DATA
ASSERT_NOT_BELOW_IO
LoadB CPU_DATA, IO_IN
.endmacro
.macro END_IO
PopB CPU_DATA
ASSERT_NOT_BELOW_IO
.endmacro
.macro START_IO_X
ldx CPU_DATA
ASSERT_NOT_BELOW_IO
LoadB CPU_DATA, IO_IN
.endmacro
.macro END_IO_X
stx CPU_DATA
ASSERT_NOT_BELOW_IO
.endmacro
.macro START_IO_Y
ldy CPU_DATA
ASSERT_NOT_BELOW_IO
LoadB CPU_DATA, IO_IN
.endmacro
.macro END_IO_Y
sty CPU_DATA
ASSERT_NOT_BELOW_IO
.endmacro
.macro START_IO_128
.endmacro
.macro END_IO_128
.endmacro
.endif

+ 1
- 1
inc/jumptab.inc View File

@@ -164,7 +164,7 @@ DoRAMOp = $c2d4

;only in GEOS 128
TempHideMouse = $c2d7
SetMousePicture = $c2da
SetMsePic = $c2da
SetNewMode = $c2dd
NormalizeX = $c2e0
MoveBData = $c2e3

+ 111
- 4
inc/kernal.inc View File

@@ -1,10 +1,18 @@
; GEOS system variables
; by Maciej Witkowiak

.include "config.inc"

;addresses defined so-so
.ifdef bsw128
Z45 = $46
Z46 = $47
Z47 = $48
.else
Z45 = $45
Z46 = $46
Z47 = $47
.endif

z8b = $8b
z8c = $8c
@@ -13,6 +21,15 @@ z8e = $8e
z8f = $8f

; GEOS Kernal internal zpage vectors (not for use by apps)
.ifdef bsw128
IconDescVec = $40
IconDescVecH = $41
CallRLo = $42
CallRHi = $43
DBoxDesc = $44
DBoxDescL = $44
DBoxDescH = $45
.else
IconDescVec = $3f
IconDescVecH = $40
CallRLo = $41
@@ -20,6 +37,7 @@ CallRHi = $42
DBoxDesc = $43
DBoxDescL = $43
DBoxDescH = $44
.endif

; Wheels internal vars

@@ -78,15 +96,49 @@ BVBuff = $0400
RunREU = $6000

keyScanChar = $87ea ; character fetched during the last interrupt. (Wheels)
.ifdef bsw128
E87FC = $8802
E87FD = $8803
E87FE = $8804
E87FF = $8805
E8800 = $8806
.else
E87FC = $87fc
E87FD = $87fd
E87FE = $87fe
E87FF = $87ff
E8800 = $8800
A885D = $885d
A885E = $885e
A885F = $885f
A8860 = $8860
.endif
;A8860 = $8860 ; XXX unused

.ifdef bsw128
FontTVar1 = $880E
FontTVar2 = $880F
.elseif .defined(wheels)
FontTVar1 = $8886
FontTVar2 = $8887
.endif

; bsw128
L888D = $888D
L888E = $888E
L888F = $888F
L8890 = $8890
L8891 = $8891
L8892 = $8892
L8893 = $8893
krnlSaveRcr = $8894
krnlSaveConfig = $8895
L8896 = $8896
bank0SaveRcr = $8897
bank0SaveA = $8898
bank0SavePS = $8899
L8A7F = $8A7F ; only written to once

fileHeadMemBuff = $d8c0 ;$0100 len
prntDrvMemBuff = $d9c0 ;$0640 len -> $e000


dblDBData = $88a7 ; icon number used for double clicking
; in the file requestor. Default is OPEN.
minKeyRepeat = $88b0 ; minimum key repeat value during accel. (Wheels)
@@ -108,3 +160,58 @@ DTOP_CHNUM = $83 ;DeskTop # of chains
RAM_EXP_1STFREE = $84 ;# of 1st free block
DTOP_CHAIN = $85 ;# of DTop chains, (=6) up to $98

; C128 back RAM
; Screen pointer where the back buffer came from.
backBufPtr = $131b
; For each sprite, there is one byte here for how many bytes wide the
; corresponding sprite is. Used by soft sprite routines.
backXBufNum = $132b
; For each sprite, there is one byte here for how many scanlines high the
; corresponding sprite is. Used by soft sprite routines.
backYBufNum = $1333
; This is an image of the C64 mobenble register. Used soft sprites.
curEnble = $1300
; Image of of C64 moby2 register.
curmoby2 = $1301
; Image of of C64 mobx2 register.
curmobx2 = $1302
; The current X positions of the soft sprites.
curXpos0 = $1303
; The current Y positions of the soft sprites.
curYpos0 = $1313
; Flag needed because of overlapping soft sprite problens on C128 and Apple.
; Set to TRUE if we see a sprite that needs to be redrawn and therefore all
; higher nunbered sprites need to be redrawn as well.
doRestFlag = $1b54
; Buffer area used to speed up the 80 colunn InvertLine routine.
invertBuffer = $1ced
; Screen data for what is beneath mouse soft sprite.
mouseSave = $1b55
; Buffer for shifting/doubling sprites.
shiftBuf = $1b45
; Buffer for shifting/doubling/oring sprites.
shiftOutBuf = $1b4c
sizeFlag = $1b53 ; XXX unused?
; Buffer used for putting sprite bitmaps upon screen without disturbing
; background.
softZeros = $1b6d
; Buffer used for putting sprite bitmaps upon screen without disturbing
; background.
softOnes = $1c2d

sspr1back = $133b
sspr2back = $1461
sspr3back = $1587
sspr4back = $16ad
sspr5back = $17d3
sspr6back = $18f9
sspr7back = $1a1f

;--------------
; VDC memory
COLOR_MATRIX_80_1 = $3880
COLOR_MATRIX_80_2 = $4080
; Bank0 memory
TRACK_CACHE = $ac00
DISK_SWAPBASE = $d000
SWAP_PAGE = $fc00 ; memory swap page

+ 53
- 0
kernal/128k/bank_jmptab_back.s View File

@@ -0,0 +1,53 @@
; GEOS KERNAL by Berkeley Softworks
; reverse engineered by Michael Steil, Maciej Witkowiak
;
; Jump table to dispatch back bank functions

.include "config.inc"

.global _HorizontalLine, _InvertLine, _RecoverLine, _VerticalLine, _Rectangle, _FrameRectangle, _InvertRectangle, _RecoverRectangle, _DrawLine, _DrawPoint, _GetScanLine, _TestPoint, _BitmapUp, _UseSystemFont, _GetRealSize, _GetCharWidth, _LoadCharSet, _ImprintRectangle, _BitmapClip, _BitOtherClip, _InitTextPrompt, _PromptOn, _PromptOff, _BackBankFunc_23, FontPutChar, _TempHideMouse, _SetMsePic, _BldGDirEntry, _SetColorMode, _ColorCard, _ColorRectangle, _SwapDiskDriver, _MoveBData, _CopyCmdToBack, ToBASIC2, _SwapBData, _VerifyBData, _DoBOp, _AccessCache, _HideOnlyMouse

.segment "bank_jmptab_back"

.assert * = $E000, error, "This code must be placed at $E000 in back RAM."

jmp _HorizontalLine
jmp _InvertLine
jmp _RecoverLine
jmp _VerticalLine
jmp _Rectangle
jmp _FrameRectangle
jmp _InvertRectangle
jmp _RecoverRectangle
jmp _DrawLine
jmp _DrawPoint
jmp _GetScanLine
jmp _TestPoint
jmp _BitmapUp
jmp _UseSystemFont
jmp _GetRealSize
jmp _GetCharWidth
jmp _LoadCharSet
jmp _ImprintRectangle
jmp _BitmapClip
jmp _BitOtherClip
jmp _InitTextPrompt
jmp _PromptOn
jmp _PromptOff
jmp _BackBankFunc_23
jmp FontPutChar
jmp _TempHideMouse
jmp _SetMsePic
jmp _BldGDirEntry
jmp _SetColorMode
jmp _ColorCard
jmp _ColorRectangle
jmp _SwapDiskDriver
jmp _MoveBData
jmp _CopyCmdToBack
jmp ToBASIC2
jmp _SwapBData
jmp _VerifyBData
jmp _DoBOp
jmp _AccessCache
jmp _HideOnlyMouse

+ 58
- 0
kernal/128k/bank_jmptab_front.s View File

@@ -0,0 +1,58 @@
; GEOS KERNAL by Berkeley Softworks
; reverse engineered by Michael Steil, Maciej Witkowiak
;
; Jump table for front-to-back bank calls
;
; Jump table to call back bank functions from the front bank
; There is a jump table at the same location at the back bank.

.include "config.inc"

.import CallBackBank

.global _HorizontalLine, _InvertLine, _RecoverLine, _VerticalLine, _Rectangle, _FrameRectangle, _InvertRectangle, _RecoverRectangle, _DrawLine, _DrawPoint, _GetScanLine, _TestPoint, _BitmapUp, _UseSystemFont, _GetRealSize, _GetCharWidth, _LoadCharSet, _ImprintRectangle, _BitmapClip, _BitOtherClip, _InitTextPrompt, _PromptOn, _PromptOff, _BackBankFunc_23, FontPutChar, _TempHideMouse, _SetMsePic, _BldGDirEntry, _SetColorMode, _ColorCard, _ColorRectangle, _SwapDiskDriver, _MoveBData, _CopyCmdToBack, ToBASIC2, _SwapBData, _VerifyBData, _DoBOp, _AccessCache, _HideOnlyMouse

.segment "bank_jmptab_front"

.assert * = $E000, error, "This code must be placed at $E000 in front RAM."

_HorizontalLine: jsr CallBackBank
_InvertLine: jsr CallBackBank
_RecoverLine: jsr CallBackBank
_VerticalLine: jsr CallBackBank
_Rectangle: jsr CallBackBank
_FrameRectangle: jsr CallBackBank
_InvertRectangle: jsr CallBackBank
_RecoverRectangle: jsr CallBackBank
_DrawLine: jsr CallBackBank
_DrawPoint: jsr CallBackBank
_GetScanLine: jsr CallBackBank
_TestPoint: jsr CallBackBank
_BitmapUp: jsr CallBackBank
_UseSystemFont: jsr CallBackBank
_GetRealSize: jsr CallBackBank
_GetCharWidth: jsr CallBackBank
_LoadCharSet: jsr CallBackBank
_ImprintRectangle: jsr CallBackBank
_BitmapClip: jsr CallBackBank
_BitOtherClip: jsr CallBackBank
_InitTextPrompt: jsr CallBackBank
_PromptOn: jsr CallBackBank
_PromptOff: jsr CallBackBank
_BackBankFunc_23: jsr CallBackBank
FontPutChar: jsr CallBackBank
_TempHideMouse: jsr CallBackBank
_SetMsePic: jsr CallBackBank
_BldGDirEntry: jsr CallBackBank
_SetColorMode: jsr CallBackBank
_ColorCard: jsr CallBackBank
_ColorRectangle: jsr CallBackBank
_SwapDiskDriver: jsr CallBackBank
_MoveBData: jsr CallBackBank
_CopyCmdToBack: jsr CallBackBank
ToBASIC2: jsr CallBackBank
_SwapBData: jsr CallBackBank
_VerifyBData: jsr CallBackBank
_DoBOp: jsr CallBackBank
_AccessCache: jsr CallBackBank
_HideOnlyMouse: jsr CallBackBank

+ 105
- 0
kernal/128k/banking.s View File

@@ -0,0 +1,105 @@
; GEOS KERNAL by Berkeley Softworks
; reverse engineered by Michael Steil, Maciej Witkowiak
;
; Cross-bank calling

.include "const.inc"
.include "geossym.inc"
.include "geosmac.inc"
.include "config.inc"
.include "kernal.inc"
.include "c64.inc"

.global CallAddr2
.global CallCBMKERNAL
.global _CallNoRAMSharing
.global CallBackBank

.segment "banking"

; disable RAM sharing between banks and call
; indirect address in register indexed by A
_CallNoRAMSharing:
sta @addr2
MoveB rcr, @addr1
and #%11110000
sta rcr
jsr @1
@addr1 = * + 1
ldx #0
stx rcr
rts
@addr2 = * + 1
@1:
jmp (0)

; called from $FF81+, CBM KERNAL calls
CallCBMKERNAL:
; save A
sta L8896
; get JSR target from stack
PopW @address
sec
lda @address
sbc #2
sta @address
lda @address + 1
sbc #0
sta @address + 1
; switch banks
MoveB config, krnlSaveConfig
LoadB config, CKRNLIOIN
lda rcr
sta krnlSaveRcr
and #%11110000 ; don't touch VIC
ora #%00000101 ; 4 KB common RAM bottom
sta rcr
; restore A
lda L8896
; call function
@address = *+1
jsr $FF8A
; save A and P
php
pha
; restore banking
MoveB krnlSaveRcr, rcr
MoveB krnlSaveConfig, config
; restore A and P
pla
plp
rts

; called from $E000+
CallBackBank:
; save A and P
sta bank0SaveA
php
PopB bank0SavePS
pla
; get JSR target from stack
sub #2
sta CallAddr2
PopB CallAddr2 + 1
; switch banks
lda rcr
sta bank0SaveRcr
and #%11110000 ; don't touch VIC
ora #%00001011 ; 16 KB common RAM top
sta rcr
; restore A and P
lda bank0SavePS
pha
lda bank0SaveA
plp
; call function
CallAddr2 = *+1
jsr $E072
; restore banking
php
pha
lda bank0SaveRcr
sta rcr
pla
plp
rts

+ 81
- 0
kernal/128k/cache.s View File

@@ -0,0 +1,81 @@
; GEOS KERNAL by Berkeley Softworks
; reverse engineered by Michael Steil, Maciej Witkowiak
;
; Disk track cache for 128K+ systems

.include "geossym.inc"
.include "geosmac.inc"
.include "config.inc"
.include "kernal.inc"

.import _DoBOp

.global _AccessCache

.segment "cache"

;---------------------------------------------------------------
; AccessCache $C2EF
;
; Pass: r4 Source address in bank 1
; r1h Dir. sector (0-20)
; y DoBOp code 0 - save
; 1 - read
; 2 - swap
; 3 - verify
; or $FF to reset all pointers
; Return: access dir. cache buffer in bank 00
; Destroyed: a, x, y +
;---------------------------------------------------------------
_AccessCache:
ldx #8
@1: lda r0-1,x
sta AccCacheSv0p-1,x
dex
bne @1
tya
cmp #$FF
beq @2
pha
lda #>TRACK_CACHE
clc
adc r1H
sta r1H
ldy #$00
sty r1L
sty r2L
sty r3H
iny
sty r2H
sty r3L
MoveW r4, r0
pla
tay
jsr _DoBOp
tay
jsr @4
tya
rts
@2: PushB config
LoadB config, $3F
LoadW r1, TRACK_CACHE
@3: lda #0
tay
sta (r1),y
iny
sta (r1),y
inc r1H
CmpBI r1H, (>TRACK_CACHE)+$14
bcc @3
PopB config
@4: ldx #8
@5: lda AccCacheSv0p-1,x
sta r0L-1,x
dex
bne @5
rts

.byte 0, 0 ; ???

AccCacheSv0p:
.byte $7b, $06, $12, $01, $57, $00, $ce, $05

+ 60
- 0
kernal/128k/cbm_jmptab.s View File

@@ -0,0 +1,60 @@
; GEOS KERNAL by Berkeley Softworks
; reverse engineered by Michael Steil
;
; CBM KERNAL jump table at $FF81
;
; This allows GEOS code on the front bank to call
; CBM KERNAL functions at their usual addresses.

.include "const.inc"
.include "geossym.inc"
.include "geosmac.inc"
.include "config.inc"
.include "kernal.inc"
.include "c64.inc"

.import CallCBMKERNAL

.segment "cbm_jmptab"

jsr CallCBMKERNAL
jsr CallCBMKERNAL
jsr CallCBMKERNAL
jsr CallCBMKERNAL
jsr CallCBMKERNAL
jsr CallCBMKERNAL
jsr CallCBMKERNAL
jsr CallCBMKERNAL
jsr CallCBMKERNAL
jsr CallCBMKERNAL
jsr CallCBMKERNAL
jsr CallCBMKERNAL
jsr CallCBMKERNAL
jsr CallCBMKERNAL
jsr CallCBMKERNAL
jsr CallCBMKERNAL
jsr CallCBMKERNAL
jsr CallCBMKERNAL
jsr CallCBMKERNAL
jsr CallCBMKERNAL
jsr CallCBMKERNAL
jsr CallCBMKERNAL
jsr CallCBMKERNAL
jsr CallCBMKERNAL
jsr CallCBMKERNAL
jsr CallCBMKERNAL
jsr CallCBMKERNAL
jsr CallCBMKERNAL
jsr CallCBMKERNAL
jsr CallCBMKERNAL
jsr CallCBMKERNAL
jsr CallCBMKERNAL
jsr CallCBMKERNAL
jsr CallCBMKERNAL
jsr CallCBMKERNAL
jsr CallCBMKERNAL
jsr CallCBMKERNAL
jsr CallCBMKERNAL

; XXX ??? junk
.byte $60, $EA

+ 80
- 0
kernal/128k/swapdiskdriver.s View File

@@ -0,0 +1,80 @@
; GEOS KERNAL by Berkeley Softworks
; reverse engineered by Michael Steil, Maciej Witkowiak
;
; Disk driver management on 128K systems

.include "const.inc"
.include "geossym.inc"
.include "geosmac.inc"
.include "config.inc"
.include "kernal.inc"
.include "c64.inc"

.segment "swapdiskdriver"

.global _SwapDiskDriver
_SwapDiskDriver:
lda config
ora #1
sta config ; disable I/O
jsr PrepForFetch2
jsr SwapMemory
jsr PrepForFetch2
lda config
and #$FE
sta config ; enable I/O
rts

; XXX almost a copy of PrepForFetch
PrepForFetch2:
ldy #5
@1: lda r0,y
tax
lda SetDevTab2,y
sta r0,y
txa
sta SetDevTab2,y
dey
bpl @1
rts

SetDevTab2:
.word DISK_BASE
.word DISK_SWAPBASE
.word DISK_DRV_LGH

; swap r2 bytes between r0 and r1
SwapMemory:
PushB r0H
PushB r1H
PushB r2H
ldy #$00
LF72E: lda r2H
beq LF748
LF732: lda (r0),y
tax
lda (r1),y
sta (r0),y
txa
sta (r1),y
iny
bne LF732
inc r0H
inc r1H
dec r2H
bra LF72E
LF748: cpy r2L
beq LF759
lda (r0),y
tax
lda (r1),y
sta (r0),y
txa
sta (r1),y
iny
bne LF748
LF759: PopB r2H
PopB r1H
PopB r0H
rts


+ 71
- 0
kernal/640/bswfont80.s View File

@@ -0,0 +1,71 @@
; GEOS KERNAL by Berkeley Softworks
; reverse engineered by Michael Steil
;
; System font BSW/9 variant for screens with a 640px width

.include "config.inc"

.segment "bswfont80"

.global BSWFont80

BSWFont80:
.byte $06,$51,$00,$09,$08,$00,$cc,$00,$00,$00,$06,$00,$09,$00,$0f,$00
.byte $17,$00,$1f,$00,$26,$00,$2e,$00,$31,$00,$36,$00,$3b,$00,$43,$00
.byte $4a,$00,$4e,$00,$54,$00,$57,$00,$5f,$00,$66,$00,$6b,$00,$71,$00
.byte $77,$00,$7e,$00,$84,$00,$8b,$00,$92,$00,$99,$00,$a0,$00,$a3,$00
.byte $a7,$00,$ac,$00,$b1,$00,$b6,$00,$bd,$00,$c5,$00,$cd,$00,$d4,$00
.byte $db,$00,$e2,$00,$e8,$00,$ee,$00,$f5,$00,$fd,$00,$00,$01,$05,$01
.byte $0d,$01,$12,$01,$1c,$01,$24,$01,$2c,$01,$33,$01,$3b,$01,$42,$01
.byte $48,$01,$4f,$01,$56,$01,$5e,$01,$68,$01,$70,$01,$77,$01,$7e,$01
.byte $83,$01,$8c,$01,$91,$01,$99,$01,$a2,$01,$a7,$01,$ae,$01,$b5,$01
.byte $bc,$01,$c3,$01,$ca,$01,$cf,$01,$d6,$01,$dd,$01,$e0,$01,$e3,$01
.byte $ea,$01,$ed,$01,$f8,$01,$ff,$01,$07,$02,$0e,$02,$15,$02,$1a,$02
.byte $20,$02,$25,$02,$2c,$02,$34,$02,$3f,$02,$47,$02,$4e,$02,$55,$02
.byte $5b,$02,$5e,$02,$64,$02,$6c,$02,$78,$02,$83,$02,$01,$b6,$6c,$7e
.byte $c0,$f9,$8d,$83,$80,$00,$00,$00,$78,$cf,$3c,$1d,$f1,$cf,$cf,$1e
.byte $00,$00,$00,$f1,$f0,$e3,$e3,$cf,$9f,$7c,$f3,$1b,$1b,$1b,$18,$36
.byte $33,$e7,$c7,$cf,$8f,$7e,$cd,$8d,$83,$63,$66,$fd,$ec,$07,$80,$00
.byte $18,$01,$80,$00,$60,$0e,$01,$83,$6c,$18,$00,$00,$00,$00,$00,$00
.byte $00,$00,$00,$00,$00,$00,$00,$6d,$83,$30,$00,$3c,$00,$01,$b6,$6c
.byte $d0,$cd,$81,$98,$cd,$60,$00,$00,$06,$cd,$c1,$86,$3d,$83,$00,$d9
.byte $b3,$00,$30,$31,$1b,$39,$b3,$36,$6c,$d8,$61,$9b,$1b,$1b,$33,$1c
.byte $77,$36,$36,$6c,$6c,$d8,$18,$cd,$8d,$83,$63,$66,$0d,$86,$01,$80
.byte $00,$0c,$01,$80,$00,$60,$18,$01,$80,$0c,$18,$00,$00,$00,$00,$00
.byte $00,$60,$00,$00,$00,$00,$00,$01,$8c,$66,$e0,$00,$7c,$00,$01,$80
.byte $fe,$70,$19,$98,$30,$67,$c3,$00,$00,$0c,$cc,$c1,$86,$6d,$e6,$01
.byte $99,$b3,$00,$67,$98,$33,$7b,$1b,$36,$0c,$d8,$61,$83,$1b,$1b,$63
.byte $1b,$b7,$b6,$36,$6c,$6c,$cc,$18,$cd,$8d,$83,$36,$66,$19,$83,$01
.byte $8e,$00,$06,$7d,$f1,$e3,$e7,$9e,$7d,$f3,$6c,$db,$ee,$7c,$7c,$f8
.byte $f9,$cf,$7b,$36,$36,$66,$c6,$cd,$f9,$8c,$60,$00,$00,$e3,$80,$01
.byte $80,$6c,$38,$30,$fc,$30,$63,$83,$00,$00,$18,$dc,$c7,$1c,$cc,$37
.byte $c3,$0f,$1f,$66,$c0,$0c,$63,$5b,$1b,$e6,$0c,$df,$7d,$83,$fb,$1b
.byte $c3,$19,$36,$f6,$36,$6c,$6c,$c6,$18,$cd,$8d,$93,$1c,$3c,$31,$81
.byte $81,$9b,$00,$00,$cd,$9b,$36,$6c,$d8,$cd,$9b,$6d,$9b,$33,$66,$c6
.byte $cd,$9b,$18,$63,$36,$36,$66,$6c,$cc,$1b,$0c,$30,$00,$00,$e0,$00
.byte $01,$80,$fe,$1c,$61,$98,$30,$67,$cf,$c1,$f0,$30,$ec,$cc,$06,$fc
.byte $36,$63,$19,$83,$00,$67,$98,$63,$7b,$fb,$36,$0c,$d8,$61,$bb,$1b
.byte $1b,$63,$18,$36,$76,$37,$cc,$6f,$83,$18,$cd,$8d,$bb,$36,$18,$61
.byte $80,$c1,$b1,$80,$00,$cd,$9b,$06,$6f,$d8,$cd,$9b,$6f,$1b,$33,$66
.byte $c6,$cd,$9b,$0e,$63,$36,$36,$66,$38,$cc,$63,$0c,$30,$00,$00,$e3
.byte $80,$00,$00,$6c,$16,$cd,$98,$30,$6d,$63,$00,$00,$60,$cc,$cc,$06
.byte $0c,$36,$63,$19,$86,$00,$30,$30,$03,$03,$1b,$36,$0c,$d8,$61,$9b
.byte $1b,$1b,$33,$18,$36,$36,$36,$0c,$6d,$83,$18,$cc,$d9,$c7,$63,$18
.byte $c1,$80,$61,$80,$00,$00,$cd,$9b,$06,$6c,$18,$cd,$9b,$6d,$9b,$33
.byte $66,$c6,$cd,$9b,$03,$63,$33,$66,$66,$6c,$cd,$81,$8c,$60,$00,$00
.byte $7c,$00,$01,$80,$6c,$fc,$0c,$f0,$18,$c3,$83,$0c,$06,$c0,$79,$ef
.byte $bc,$0d,$e3,$c3,$0f,$1c,$66,$00,$00,$61,$f3,$1b,$e3,$ef,$9f,$60
.byte $f3,$1b,$73,$1b,$d8,$36,$33,$e6,$07,$cc,$de,$18,$7c,$71,$83,$63
.byte $18,$fd,$80,$31,$80,$00,$00,$6d,$f1,$f3,$e7,$d8,$7d,$9b,$6c,$db
.byte $33,$66,$7c,$f8,$fb,$1e,$39,$f1,$c3,$dc,$c6,$7d,$f9,$8c,$60,$00
.byte $00,$3c,$00,$00,$00,$00,$00,$00,$00,$0d,$80,$00,$18,$00,$00,$00
.byte $00,$00,$00,$00,$00,$00,$00,$0c,$00,$00,$00,$00,$00,$00,$00,$00
.byte $00,$00,$00,$00,$00,$00,$00,$00,$00,$01,$80,$00,$00,$00,$00,$00
.byte $00,$00,$01,$e0,$07,$80,$00,$00,$00,$00,$00,$00,$00,$18,$00,$60
.byte $00,$00,$00,$00,$c0,$18,$00,$00,$00,$00,$00,$00,$0c,$00,$6d,$80
.byte $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
.byte $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
.byte $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$c0,$00,$00,$00,$00
.byte $00,$00,$00,$00,$00,$00,$00,$7f,$c0,$00,$00,$00,$00,$00,$30,$00
.byte $c0,$00,$00,$00,$00,$c0,$18,$00,$00,$00,$00,$00,$00,$18,$00,$0c
.byte $00,$00,$00,$00,$00

+ 25
- 0
kernal/bitmask/bitmask1.s View File

@@ -0,0 +1,25 @@
; GEOS KERNAL by Berkeley Softworks
; reverse engineered by Maciej Witkowiak, Michael Steil
;
; Common bitmasks

.include "config.inc"

.import BitMaskPow2

.global BitMaskPow2Rev

.segment "bitmask1"

BitMaskPow2Rev:
.byte %10000000
.byte %01000000
.byte %00100000
.byte %00010000
.byte %00001000
.byte %00000100
.byte %00000010
; %00000001 shared with below

.assert * = BitMaskPow2, error, "BitMaskPow2Rev must run into BitMaskPow2"


+ 20
- 0
kernal/bitmask/bitmask2.s View File

@@ -0,0 +1,20 @@
; GEOS KERNAL by Berkeley Softworks
; reverse engineered by Maciej Witkowiak, Michael Steil
;
; Common bitmasks

.include "config.inc"

.global BitMaskPow2

.segment "bitmask2"

BitMaskPow2:
.byte %00000001
.byte %00000010
.byte %00000100
.byte %00001000
.byte %00010000
.byte %00100000
.byte %01000000
.byte %10000000

kernal/bitmask.s → kernal/bitmask/bitmask3.s View File

@@ -3,31 +3,13 @@
;
; Common bitmasks

.global BitMaskPow2Rev
.global BitMaskPow2
.include "config.inc"
.global BitMaskLeadingSet
.global BitMaskLeadingClear

.segment "bitmask"
.segment "bitmask3"

BitMaskPow2Rev:
.byte %10000000
.byte %01000000
.byte %00100000
.byte %00010000
.byte %00001000
.byte %00000100
.byte %00000010
; %00000001 shared with below
BitMaskPow2:
.byte %00000001
.byte %00000010
.byte %00000100
.byte %00001000
.byte %00010000
.byte %00100000
.byte %01000000
.byte %10000000
BitMaskLeadingSet:
.byte %00000000
.byte %10000000

+ 0
- 213
kernal/bswfont.s View File

@@ -1,213 +0,0 @@
; GEOS KERNAL by Berkeley Softworks
; reverse engineered by Maciej Witkowiak, Michael Steil
;
; System font BSW/9

.include "config.inc"

.global BSWFont

.segment "bswfont"

BSWFont:
.ifdef wheels
.byte $06,$3c,$00,$09,$08,$00,$cc,$00
.byte $00,$00,$05,$00,$07,$00,$0b,$00
.byte $11,$00,$17,$00,$1d,$00,$23,$00
.byte $25,$00,$29,$00,$2d,$00,$33,$00
.byte $39,$00,$3c,$00,$41,$00,$43,$00
.byte $4a,$00,$4f,$00,$52,$00,$56,$00
.byte $5a,$00,$5f,$00,$63,$00,$68,$00
.byte $6d,$00,$72,$00,$77,$00,$79,$00
.byte $7c,$00,$80,$00,$84,$00,$88,$00
.byte $8e,$00,$94,$00,$9a,$00,$9f,$00
.byte $a4,$00,$a9,$00,$ad,$00,$b1,$00
.byte $b6,$00,$bc,$00,$be,$00,$c2,$00
.byte $c8,$00,$cc,$00,$d4,$00,$da,$00
.byte $e0,$00,$e5,$00,$eb,$00,$f0,$00
.byte $f5,$00,$f9,$00,$fe,$00,$04,$01
.byte $0c,$01,$12,$01,$18,$01,$1e,$01
.byte $23,$01,$28,$01,$2d,$01,$33,$01
.byte $3b,$01,$3f,$01,$44,$01,$49,$01
.byte $4e,$01,$53,$01,$58,$01,$5b,$01
.byte $60,$01,$65,$01,$67,$01,$69,$01
.byte $6e,$01,$70,$01,$78,$01,$7d,$01
.byte $83,$01,$88,$01,$8d,$01,$90,$01
.byte $94,$01,$97,$01,$9c,$01,$a2,$01
.byte $aa,$01,$b0,$01,$b5,$01,$ba,$01
.byte $bf,$01,$c4,$01,$c9,$01,$ce,$01
.byte $d7,$01,$e0,$01,$02,$a5,$1e,$c1
.byte $88,$a0,$80,$00,$00,$0c,$59,$82
.byte $e2,$79,$8c,$00,$00,$38,$01,$1c
.byte $67,$3b,$99,$14,$51,$44,$14,$4e
.byte $71,$ce,$3b,$a5,$14,$14,$51,$7d
.byte $29,$48,$00,$08,$04,$00,$20,$20
.byte $42,$a1,$00,$00,$00,$00,$00,$00
.byte $00,$00,$00,$00,$00,$18,$00,$38
.byte $02,$a5,$28,$ca,$09,$12,$a0,$00
.byte $00,$52,$c4,$46,$84,$0a,$52,$01
.byte $04,$44,$e2,$92,$94,$a2,$25,$14
.byte $52,$46,$36,$51,$4a,$29,$41,$25
.byte $14,$14,$51,$04,$00,$00,$00,$04
.byte $04,$00,$20,$40,$40,$21,$00,$00
.byte $00,$00,$04,$00,$00,$00,$00,$12
.byte $94,$a4,$00,$78,$02,$0f,$98,$12
.byte $42,$09,$c2,$00,$00,$96,$44,$4a
.byte $c8,$12,$52,$02,$72,$08,$84,$52
.byte $84,$a2,$21,$14,$54,$45,$55,$51
.byte $4a,$29,$21,$25,$14,$12,$91,$08
.byte $c6,$48,$80,$02,$77,$18,$e6,$67
.byte $72,$a5,$76,$71,$ce,$39,$36,$94
.byte $52,$51,$4b,$cc,$00,$24,$00,$c7
.byte $02,$05,$08,$21,$e2,$0b,$e2,$00
.byte $01,$1a,$48,$92,$2e,$21,$8e,$94
.byte $01,$11,$c4,$5c,$84,$bb,$a1,$f4
.byte $58,$44,$94,$d1,$4a,$29,$11,$25
.byte $14,$91,$0a,$11,$29,$49,$40,$00
.byte $94,$a5,$29,$49,$4a,$a9,$49,$4a
.byte $29,$4a,$44,$94,$52,$4a,$48,$82
.byte $64,$a8,$00,$c0,$02,$0f,$8c,$42
.byte $42,$09,$cf,$87,$82,$12,$50,$5e
.byte $29,$22,$42,$02,$72,$11,$27,$d2
.byte $84,$a2,$2d,$14,$54,$44,$14,$51
.byte $72,$2e,$09,$25,$15,$52,$84,$21
.byte $e9,$4a,$20,$00,$94,$a1,$2f,$49
.byte $4a,$b1,$49,$4a,$29,$4a,$24,$94
.byte $52,$44,$49,$0e
.byte $94,$a4,$00,$c7,$00,$05,$0a,$9a
.byte $42,$0a,$a2,$00,$04,$12,$50,$42
.byte $29,$22,$44,$01,$04
.byte $00
.byte $e4,$52,$84,$a2,$25,$14,$52,$44
.byte $14,$51,$42,$2a,$09,$24,$a6,$34
.byte $44,$41,$29,$48,$00,$00,$94,$a1
.byte $28,$49,$4a,$a9,$49,$4a,$29,$4a
.byte $14,$92,$92,$4a,$4a,$12,$94,$a4
.byte $00,$78,$02,$05,$3c,$19,$c1,$10
.byte $82,$10,$28,$0c,$5d,$82,$c6,$21
.byte $88,$90,$00,$10,$44,$5c,$77,$3a
.byte $1d,$15,$91,$74,$14,$4e,$41,$c9
.byte $71,$1c,$44,$14,$44,$7d,$26,$30
.byte $00,$00,$57,$1c,$e7,$47,$4a,$a5
.byte $49,$49,$ce,$3a,$62,$71,$0d,$91
.byte $3b,$ce,$63,$28,$00,$38,$00,$00
.byte $08,$00,$00,$a0,$00,$20,$00,$00
.byte $00,$00,$00,$00,$00,$20,$00,$01
.byte $c0,$00,$00,$00,$00,$00,$00,$00
.byte $00,$00,$00,$40,$00,$00,$00,$00
.byte $00,$00,$00,$00,$00,$00,$00,$00
.byte $00,$01,$00,$80,$00,$00,$08,$08
.byte $00,$00,$00,$00,$08,$00,$00,$20
.byte $00,$00,$00,$00,$00,$00,$00,$00
.byte $00,$00,$00,$00,$00,$00,$00,$00
.byte $00,$00,$00,$00,$00,$00,$00,$00
.byte $00,$00,$00,$00,$00,$00,$00,$20
.byte $00,$00,$00,$00,$00,$00,$00,$00
.byte $1f,$e0,$00,$00,$00,$02,$01,$00
.byte $00,$00,$08,$08,$00,$00,$00,$00
.byte $10,$00,$00,$00,$00,$00,$00,$00
.byte $00,$00,$00,$00,$00,$00,$00
.else
.byte $06, $3c, $00, $09, $08, $00, $cc, $00, $00, $00, $05, $00, $07, $00, $0b, $00
.byte $11, $00, $17, $00, $1d, $00, $23, $00, $25, $00, $29, $00, $2d, $00, $33, $00
.byte $39, $00, $3c, $00, $41, $00, $43, $00, $4a, $00, $4f, $00, $52, $00, $56, $00
.byte $5a, $00, $5f, $00, $63, $00, $68, $00, $6d, $00, $72, $00, $77, $00, $79, $00
.byte $7c, $00, $80, $00, $84, $00, $88, $00, $8e, $00, $94, $00, $9a, $00, $9f, $00
.byte $a4, $00, $a9, $00, $ad, $00, $b1, $00, $b6, $00, $bc, $00, $be, $00, $c2, $00
.byte $c8, $00, $cc, $00, $d4, $00, $da, $00, $e0, $00, $e5, $00, $eb, $00, $f0, $00
.byte $f5, $00, $f9, $00, $fe, $00, $04, $01, $0c, $01, $12, $01, $18, $01, $1e, $01
.byte $21, $01, $29, $01, $2c, $01, $32, $01, $3a, $01, $3e, $01, $43, $01, $48, $01
.byte $4d, $01, $52, $01, $57, $01, $5a, $01, $5f, $01, $64, $01, $66, $01, $68, $01
.byte $6d, $01, $6f, $01, $77, $01, $7c, $01, $82, $01, $87, $01, $8c, $01, $8f, $01
.byte $93, $01, $96, $01, $9b, $01, $a1, $01, $a9, $01, $af, $01, $b4, $01
.ifdef gateway_font
.byte $b9, $01, $bd, $01, $bf, $01, $c3, $01, $c9, $01, $d1, $01, $dc
.else
.byte $ba, $01, $be, $01, $c0, $01, $c4, $01, $ca, $01, $d2, $01, $dd
.endif
.byte $01, $02, $a5, $1e, $c1
.byte $88, $a0, $80, $00, $00, $0c, $59, $82, $e2, $79, $8c, $00, $00, $38, $e1, $1c
.byte $67, $3b, $99, $14, $51, $44, $14, $4e, $71, $ce, $3b, $a5, $14, $14, $51, $7d
.byte $a0, $30, $00, $10, $08, $00, $40, $40, $85, $42, $00, $00, $00, $00, $00, $00
.byte $00, $00, $00
.ifdef gateway_font
.byte $0a, $84, $80, $1c, $00
.else
.byte $05, $42, $40, $07, $80
.endif
.byte $02, $a5, $28, $ca, $09, $12, $a0, $00
.byte $00, $52, $c4, $46, $84, $0a, $52, $01, $04, $45, $12, $92, $94, $a2, $25, $14
.byte $52, $46, $36, $51, $4a, $29, $41, $25, $14, $14, $51, $05, $10, $10, $00, $08
.byte $08, $00, $40, $80, $80, $42, $00, $00, $00, $00, $08, $00, $00, $00, $00
.ifdef gateway_font
.byte $12, $4b, $00, $3c, $00
.else
.byte $09, $25, $80, $0f, $80
.endif
.byte $02, $0f, $98, $12, $42, $09, $c2, $00, $00, $96, $44, $4a
.byte $c8, $12, $52, $02, $72, $09, $74, $52, $84, $a2, $21, $14, $54, $45, $55, $51
.byte $4a, $29, $21, $25, $14, $12, $91, $09, $08, $11, $00, $04, $ee, $31, $cc, $ce
.byte $e5, $4a, $ec, $e3, $9c, $72, $6d, $28, $a4, $a2, $97
.ifdef gateway_font
.byte $92, $40, $00, $77, $00
.else
.byte $89, $20, $00, $1c, $70
.endif
.byte $02, $05, $08, $21, $e2, $0b, $e2, $00, $01, $1a, $48, $92, $2e, $21, $8e, $94
.byte $01, $11, $54, $5c, $84, $bb, $a1, $f4, $58, $44, $94, $d1, $4a, $29, $11, $25
.byte $14, $91, $0a, $11, $04, $12, $80, $01, $29, $4a, $52, $92, $95, $52, $92, $94
.byte $52, $94, $89, $28, $a4, $94, $91
.ifdef gateway_font
.byte $22, $20, $00, $70
.else
.byte $11, $10, $00, $1c
.endif
.byte $00, $02, $0f, $8c, $42
.byte $42, $09, $cf, $87, $82, $12, $50, $5e, $29, $22, $42, $02, $72, $11, $77, $d2
.byte $84, $a2, $2d, $14, $54, $44, $14, $51, $72, $2e, $09, $25, $15, $52, $84, $21
.byte $02, $14, $40, $01, $29, $42, $5e, $92, $95, $62, $92, $94, $52, $94, $49, $28
.byte $a4, $88, $92
.ifdef gateway_font
.byte $22, $20, $00, $77, $00
.else
.byte $11, $10, $00, $1c, $70
.endif
.byte $00, $05, $0a, $9a, $42, $0a, $a2, $00
.byte $04, $12, $50, $42, $29, $22, $44, $01, $04, $01, $04, $52, $84, $a2, $25, $14
.byte $52, $44, $14, $51, $42, $2a, $09, $24, $a6, $34, $44, $41, $01, $10, $00, $01
.byte $29, $42, $50, $92, $95, $52, $92, $94, $52, $94, $29, $25, $24, $94, $94
.ifdef gateway_font
.byte $12, $40, $00, $3c, $00
.else
.byte $09, $20, $00, $0f, $80
.endif
.byte $02, $05, $3c, $19, $c1, $10, $82, $10, $28, $0c, $5d, $82
.byte $c6, $21, $88, $90, $00, $10, $e4, $5c, $77, $3a, $1d, $15, $91, $74, $14, $4e
.byte $41, $c9, $71, $1c, $44, $14, $44, $7d, $00, $90, $00, $00, $ae, $39, $ce, $8e
.byte $95, $4a, $92, $93, $9c, $74, $c4, $e2, $1b, $22, $77
.ifdef gateway_font
.byte $92, $40, $00, $1c, $00
.else
.byte $89, $20, $00, $07, $80
.endif
.byte $00, $00, $08, $00, $00, $a0, $00, $20, $00, $00, $00, $00, $00, $00, $00, $20
.byte $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $40, $00, $00
.byte $00, $00, $00, $01, $80, $30, $00, $00, $00, $00, $00, $02, $01, $00, $00, $00
.byte $10, $10, $00, $00, $00, $00, $10
.ifdef gateway_font
.byte $0a, $80
.else
.byte $05, $40
.endif
.byte $00, $00, $00, $00, $00, $00, $00
.byte $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
.byte $00, $00, $00, $00, $00, $00, $00, $00, $00, $20, $00, $00, $00, $00, $00, $00
.byte $00, $00, $3f, $c0, $00, $00, $00, $04, $02, $00, $00, $00, $10, $10, $00, $00
.byte $00, $00, $20
.ifdef gateway_font
.byte $02
.else
.byte $01
.endif
.byte $00, $00, $00, $00
.endif

+ 158
- 0
kernal/bswfont/bswfont.s View File

@@ -0,0 +1,158 @@
; GEOS KERNAL by Berkeley Softworks
; reverse engineered by Maciej Witkowiak, Michael Steil
;
; System font BSW/9

.include "config.inc"

.global BSWFont

.segment "bswfont"

BSWFont:
.ifdef wheels
.byte $06,$3c,$00,$09,$08,$00,$cc,$00,$00,$00,$05,$00,$07,$00,$0b,$00
.byte $11,$00,$17,$00,$1d,$00,$23,$00,$25,$00,$29,$00,$2d,$00,$33,$00
.byte $39,$00,$3c,$00,$41,$00,$43,$00,$4a,$00,$4f,$00,$52,$00,$56,$00
.byte $5a,$00,$5f,$00,$63,$00,$68,$00,$6d,$00,$72,$00,$77,$00,$79,$00
.byte $7c,$00,$80,$00,$84,$00,$88,$00,$8e,$00,$94,$00,$9a,$00,$9f,$00
.byte $a4,$00,$a9,$00,$ad,$00,$b1,$00,$b6,$00,$bc,$00,$be,$00,$c2,$00
.byte $c8,$00,$cc,$00,$d4,$00,$da,$00,$e0,$00,$e5,$00,$eb,$00,$f0,$00
.byte $f5,$00,$f9,$00,$fe,$00,$04,$01,$0c,$01,$12,$01,$18,$01,$1e,$01
.byte $23,$01,$28,$01,$2d,$01,$33,$01,$3b,$01,$3f,$01,$44,$01,$49,$01
.byte $4e,$01,$53,$01,$58,$01,$5b,$01,$60,$01,$65,$01,$67,$01,$69,$01
.byte $6e,$01,$70,$01,$78,$01,$7d,$01,$83,$01,$88,$01,$8d,$01,$90,$01
.byte $94,$01,$97,$01,$9c,$01,$a2,$01,$aa,$01,$b0,$01,$b5,$01,$ba,$01
.byte $bf,$01,$c4,$01,$c9,$01,$ce,$01,$d7,$01,$e0,$01,$02,$a5,$1e,$c1
.byte $88,$a0,$80,$00,$00,$0c,$59,$82,$e2,$79,$8c,$00,$00,$38,$01,$1c
.byte $67,$3b,$99,$14,$51,$44,$14,$4e,$71,$ce,$3b,$a5,$14,$14,$51,$7d
.byte $29,$48,$00,$08,$04,$00,$20,$20,$42,$a1,$00,$00,$00,$00,$00,$00
.byte $00,$00,$00,$00,$00,$18,$00,$38,$02,$a5,$28,$ca,$09,$12,$a0,$00
.byte $00,$52,$c4,$46,$84,$0a,$52,$01,$04,$44,$e2,$92,$94,$a2,$25,$14
.byte $52,$46,$36,$51,$4a,$29,$41,$25,$14,$14,$51,$04,$00,$00,$00,$04
.byte $04,$00,$20,$40,$40,$21,$00,$00,$00,$00,$04,$00,$00,$00,$00,$12
.byte $94,$a4,$00,$78,$02,$0f,$98,$12,$42,$09,$c2,$00,$00,$96,$44,$4a
.byte $c8,$12,$52,$02,$72,$08,$84,$52,$84,$a2,$21,$14,$54,$45,$55,$51
.byte $4a,$29,$21,$25,$14,$12,$91,$08,$c6,$48,$80,$02,$77,$18,$e6,$67
.byte $72,$a5,$76,$71,$ce,$39,$36,$94,$52,$51,$4b,$cc,$00,$24,$00,$c7
.byte $02,$05,$08,$21,$e2,$0b,$e2,$00,$01,$1a,$48,$92,$2e,$21,$8e,$94
.byte $01,$11,$c4,$5c,$84,$bb,$a1,$f4,$58,$44,$94,$d1,$4a,$29,$11,$25
.byte $14,$91,$0a,$11,$29,$49,$40,$00,$94,$a5,$29,$49,$4a,$a9,$49,$4a
.byte $29,$4a,$44,$94,$52,$4a,$48,$82,$64,$a8,$00,$c0,$02,$0f,$8c,$42
.byte $42,$09,$cf,$87,$82,$12,$50,$5e,$29,$22,$42,$02,$72,$11,$27,$d2
.byte $84,$a2,$2d,$14,$54,$44,$14,$51,$72,$2e,$09,$25,$15,$52,$84,$21
.byte $e9,$4a,$20,$00,$94,$a1,$2f,$49,$4a,$b1,$49,$4a,$29,$4a,$24,$94
.byte $52,$44,$49,$0e,$94,$a4,$00,$c7,$00,$05,$0a,$9a,$42,$0a,$a2,$00
.byte $04,$12,$50,$42,$29,$22,$44,$01,$04,$00,$e4,$52,$84,$a2,$25,$14
.byte $52,$44,$14,$51,$42,$2a,$09,$24,$a6,$34,$44,$41,$29,$48,$00,$00
.byte $94,$a1,$28,$49,$4a,$a9,$49,$4a,$29,$4a,$14,$92,$92,$4a,$4a,$12
.byte $94,$a4,$00,$78,$02,$05,$3c,$19,$c1,$10,$82,$10,$28,$0c,$5d,$82
.byte $c6,$21,$88,$90,$00,$10,$44,$5c,$77,$3a,$1d,$15,$91,$74,$14,$4e
.byte $41,$c9,$71,$1c,$44,$14,$44,$7d,$26,$30,$00,$00,$57,$1c,$e7,$47
.byte $4a,$a5,$49,$49,$ce,$3a,$62,$71,$0d,$91,$3b,$ce,$63,$28,$00,$38
.byte $00,$00,$08,$00,$00,$a0,$00,$20,$00,$00,$00,$00,$00,$00,$00,$20
.byte $00,$01,$c0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$40,$00,$00
.byte $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$01,$00,$80,$00,$00
.byte $08,$08,$00,$00,$00,$00,$08,$00,$00,$20,$00,$00,$00,$00,$00,$00
.byte $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
.byte $00,$00,$00,$00,$00,$00,$00,$00,$00,$20,$00,$00,$00,$00,$00,$00
.byte $00,$00,$1f,$e0,$00,$00,$00,$02,$01,$00,$00,$00,$08,$08,$00,$00
.byte $00,$00,$10,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
.byte $00
.elseif .defined(gateway_font)
.byte $06,$3c,$00,$09,$08,$00,$cc,$00,$00,$00,$05,$00,$07,$00,$0b,$00
.byte $11,$00,$17,$00,$1d,$00,$23,$00,$25,$00,$29,$00,$2d,$00,$33,$00
.byte $39,$00,$3c,$00,$41,$00,$43,$00,$4a,$00,$4f,$00,$52,$00,$56,$00
.byte $5a,$00,$5f,$00,$63,$00,$68,$00,$6d,$00,$72,$00,$77,$00,$79,$00
.byte $7c,$00,$80,$00,$84,$00,$88,$00,$8e,$00,$94,$00,$9a,$00,$9f,$00
.byte $a4,$00,$a9,$00,$ad,$00,$b1,$00,$b6,$00,$bc,$00,$be,$00,$c2,$00
.byte $c8,$00,$cc,$00,$d4,$00,$da,$00,$e0,$00,$e5,$00,$eb,$00,$f0,$00
.byte $f5,$00,$f9,$00,$fe,$00,$04,$01,$0c,$01,$12,$01,$18,$01,$1e,$01
.byte $21,$01,$29,$01,$2c,$01,$32,$01,$3a,$01,$3e,$01,$43,$01,$48,$01
.byte $4d,$01,$52,$01,$57,$01,$5a,$01,$5f,$01,$64,$01,$66,$01,$68,$01
.byte $6d,$01,$6f,$01,$77,$01,$7c,$01,$82,$01,$87,$01,$8c,$01,$8f,$01
.byte $93,$01,$96,$01,$9b,$01,$a1,$01,$a9,$01,$af,$01,$b4,$01,$b9,$01
.byte $bd,$01,$bf,$01,$c3,$01,$c9,$01,$d1,$01,$dc,$01,$02,$a5,$1e,$c1
.byte $88,$a0,$80,$00,$00,$0c,$59,$82,$e2,$79,$8c,$00,$00,$38,$e1,$1c
.byte $67,$3b,$99,$14,$51,$44,$14,$4e,$71,$ce,$3b,$a5,$14,$14,$51,$7d
.byte $a0,$30,$00,$10,$08,$00,$40,$40,$85,$42,$00,$00,$00,$00,$00,$00
.byte $00,$00,$00,$0a,$84,$80,$1c,$00,$02,$a5,$28,$ca,$09,$12,$a0,$00
.byte $00,$52,$c4,$46,$84,$0a,$52,$01,$04,$45,$12,$92,$94,$a2,$25,$14
.byte $52,$46,$36,$51,$4a,$29,$41,$25,$14,$14,$51,$05,$10,$10,$00,$08
.byte $08,$00,$40,$80,$80,$42,$00,$00,$00,$00,$08,$00,$00,$00,$00,$12
.byte $4b,$00,$3c,$00,$02,$0f,$98,$12,$42,$09,$c2,$00,$00,$96,$44,$4a
.byte $c8,$12,$52,$02,$72,$09,$74,$52,$84,$a2,$21,$14,$54,$45,$55,$51
.byte $4a,$29,$21,$25,$14,$12,$91,$09,$08,$11,$00,$04,$ee,$31,$cc,$ce
.byte $e5,$4a,$ec,$e3,$9c,$72,$6d,$28,$a4,$a2,$97,$92,$40,$00,$77,$00
.byte $02,$05,$08,$21,$e2,$0b,$e2,$00,$01,$1a,$48,$92,$2e,$21,$8e,$94
.byte $01,$11,$54,$5c,$84,$bb,$a1,$f4,$58,$44,$94,$d1,$4a,$29,$11,$25
.byte $14,$91,$0a,$11,$04,$12,$80,$01,$29,$4a,$52,$92,$95,$52,$92,$94
.byte $52,$94,$89,$28,$a4,$94,$91,$22,$20,$00,$70,$00,$02,$0f,$8c,$42
.byte $42,$09,$cf,$87,$82,$12,$50,$5e,$29,$22,$42,$02,$72,$11,$77,$d2
.byte $84,$a2,$2d,$14,$54,$44,$14,$51,$72,$2e,$09,$25,$15,$52,$84,$21
.byte $02,$14,$40,$01,$29,$42,$5e,$92,$95,$62,$92,$94,$52,$94,$49,$28
.byte $a4,$88,$92,$22,$20,$00,$77,$00,$00,$05,$0a,$9a,$42,$0a,$a2,$00
.byte $04,$12,$50,$42,$29,$22,$44,$01,$04,$01,$04,$52,$84,$a2,$25,$14
.byte $52,$44,$14,$51,$42,$2a,$09,$24,$a6,$34,$44,$41,$01,$10,$00,$01
.byte $29,$42,$50,$92,$95,$52,$92,$94,$52,$94,$29,$25,$24,$94,$94,$12
.byte $40,$00,$3c,$00,$02,$05,$3c,$19,$c1,$10,$82,$10,$28,$0c,$5d,$82
.byte $c6,$21,$88,$90,$00,$10,$e4,$5c,$77,$3a,$1d,$15,$91,$74,$14,$4e
.byte $41,$c9,$71,$1c,$44,$14,$44,$7d,$00,$90,$00,$00,$ae,$39,$ce,$8e
.byte $95,$4a,$92,$93,$9c,$74,$c4,$e2,$1b,$22,$77,$92,$40,$00,$1c,$00
.byte $00,$00,$08,$00,$00,$a0,$00,$20,$00,$00,$00,$00,$00,$00,$00,$20
.byte $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$40,$00,$00
.byte $00,$00,$00,$01,$80,$30,$00,$00,$00,$00,$00,$02,$01,$00,$00,$00
.byte $10,$10,$00,$00,$00,$00,$10,$0a,$80,$00,$00,$00,$00,$00,$00,$00
.byte $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
.byte $00,$00,$00,$00,$00,$00,$00,$00,$00,$20,$00,$00,$00,$00,$00,$00
.byte $00,$00,$3f,$c0,$00,$00,$00,$04,$02,$00,$00,$00,$10,$10,$00,$00
.byte $00,$00,$20,$02,$00,$00,$00,$00
.else
.byte $06,$3c,$00,$09,$08,$00,$cc,$00,$00,$00,$05,$00,$07,$00,$0b,$00
.byte $11,$00,$17,$00,$1d,$00,$23,$00,$25,$00,$29,$00,$2d,$00,$33,$00
.byte $39,$00,$3c,$00,$41,$00,$43,$00,$4a,$00,$4f,$00,$52,$00,$56,$00
.byte $5a,$00,$5f,$00,$63,$00,$68,$00,$6d,$00,$72,$00,$77,$00,$79,$00
.byte $7c,$00,$80,$00,$84,$00,$88,$00,$8e,$00,$94,$00,$9a,$00,$9f,$00
.byte $a4,$00,$a9,$00,$ad,$00,$b1,$00,$b6,$00,$bc,$00,$be,$00,$c2,$00
.byte $c8,$00,$cc,$00,$d4,$00,$da,$00,$e0,$00,$e5,$00,$eb,$00,$f0,$00
.byte $f5,$00,$f9,$00,$fe,$00,$04,$01,$0c,$01,$12,$01,$18,$01,$1e,$01
.byte $21,$01,$29,$01,$2c,$01,$32,$01,$3a,$01,$3e,$01,$43,$01,$48,$01
.byte $4d,$01,$52,$01,$57,$01,$5a,$01,$5f,$01,$64,$01,$66,$01,$68,$01
.byte $6d,$01,$6f,$01,$77,$01,$7c,$01,$82,$01,$87,$01,$8c,$01,$8f,$01
.byte $93,$01,$96,$01,$9b,$01,$a1,$01,$a9,$01,$af,$01,$b4,$01,$ba,$01
.byte $be,$01,$c0,$01,$c4,$01,$ca,$01,$d2,$01,$dd,$01,$02,$a5,$1e,$c1
.byte $88,$a0,$80,$00,$00,$0c,$59,$82,$e2,$79,$8c,$00,$00,$38,$e1,$1c
.byte $67,$3b,$99,$14,$51,$44,$14,$4e,$71,$ce,$3b,$a5,$14,$14,$51,$7d
.byte $a0,$30,$00,$10,$08,$00,$40,$40,$85,$42,$00,$00,$00,$00,$00,$00
.byte $00,$00,$00,$05,$42,$40,$07,$80,$02,$a5,$28,$ca,$09,$12,$a0,$00
.byte $00,$52,$c4,$46,$84,$0a,$52,$01,$04,$45,$12,$92,$94,$a2,$25,$14
.byte $52,$46,$36,$51,$4a,$29,$41,$25,$14,$14,$51,$05,$10,$10,$00,$08
.byte $08,$00,$40,$80,$80,$42,$00,$00,$00,$00,$08,$00,$00,$00,$00,$09
.byte $25,$80,$0f,$80,$02,$0f,$98,$12,$42,$09,$c2,$00,$00,$96,$44,$4a
.byte $c8,$12,$52,$02,$72,$09,$74,$52,$84,$a2,$21,$14,$54,$45,$55,$51
.byte $4a,$29,$21,$25,$14,$12,$91,$09,$08,$11,$00,$04,$ee,$31,$cc,$ce
.byte $e5,$4a,$ec,$e3,$9c,$72,$6d,$28,$a4,$a2,$97,$89,$20,$00,$1c,$70
.byte $02,$05,$08,$21,$e2,$0b,$e2,$00,$01,$1a,$48,$92,$2e,$21,$8e,$94
.byte $01,$11,$54,$5c,$84,$bb,$a1,$f4,$58,$44,$94,$d1,$4a,$29,$11,$25
.byte $14,$91,$0a,$11,$04,$12,$80,$01,$29,$4a,$52,$92,$95,$52,$92,$94
.byte $52,$94,$89,$28,$a4,$94,$91,$11,$10,$00,$1c,$00,$02,$0f,$8c,$42
.byte $42,$09,$cf,$87,$82,$12,$50,$5e,$29,$22,$42,$02,$72,$11,$77,$d2
.byte $84,$a2,$2d,$14,$54,$44,$14,$51,$72,$2e,$09,$25,$15,$52,$84,$21
.byte $02,$14,$40,$01,$29,$42,$5e,$92,$95,$62,$92,$94,$52,$94,$49,$28
.byte $a4,$88,$92,$11,$10,$00,$1c,$70,$00,$05,$0a,$9a,$42,$0a,$a2,$00
.byte $04,$12,$50,$42,$29,$22,$44,$01,$04,$01,$04,$52,$84,$a2,$25,$14
.byte $52,$44,$14,$51,$42,$2a,$09,$24,$a6,$34,$44,$41,$01,$10,$00,$01
.byte $29,$42,$50,$92,$95,$52,$92,$94,$52,$94,$29,$25,$24,$94,$94,$09
.byte $20,$00,$0f,$80,$02,$05,$3c,$19,$c1,$10,$82,$10,$28,$0c,$5d,$82
.byte $c6,$21,$88,$90,$00,$10,$e4,$5c,$77,$3a,$1d,$15,$91,$74,$14,$4e
.byte $41,$c9,$71,$1c,$44,$14,$44,$7d,$00,$90,$00,$00,$ae,$39,$ce,$8e
.byte $95,$4a,$92,$93,$9c,$74,$c4,$e2,$1b,$22,$77,$89,$20,$00,$07,$80
.byte $00,$00,$08,$00,$00,$a0,$00,$20,$00,$00,$00,$00,$00,$00,$00,$20
.byte $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$40,$00,$00
.byte $00,$00,$00,$01,$80,$30,$00,$00,$00,$00,$00,$02,$01,$00,$00,$00
.byte $10,$10,$00,$00,$00,$00,$10,$05,$40,$00,$00,$00,$00,$00,$00,$00
.byte $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
.byte $00,$00,$00,$00,$00,$00,$00,$00,$00,$20,$00,$00,$00,$00,$00,$00
.byte $00,$00,$3f,$c0,$00,$00,$00,$04,$02,$00,$00,$00,$10,$10,$00,$00
.byte $00,$00,$20,$01,$00,$00,$00,$00
.endif

+ 59
- 0
kernal/c128/iojmptab.s View File

@@ -0,0 +1,59 @@
; GEOS KERNAL by Berkeley Softworks
; reverse engineered by Michael Steil, Maciej Witkowiak
;
; C128: Jump table below I/O area

.include "const.inc"
.include "geossym.inc"
.include "geosmac.inc"
.include "config.inc"
.include "kernal.inc"
.include "c64.inc"

.import MoveDataCore
.import _ProcessDelays
.import GetInlineDrwParms
.import GrStSetCoords
.import _ProcessTimers
.import _IsMseInRegion
.import _CRC
.import _GetRandom
.import _BBMult
.import _BMult
.import _DMult
.import _Ddiv
.import _DSdiv

.global JumpTableBelowIO
.global J_IsMseInRegion
.global JMoveDataCore
.global J_CRC
.global J_GetRandom
.global J_BBMult
.global J_BMult
.global J_DMult
.global J_Ddiv
.global J_DSdiv
.global J_ProcessDelays
.global JGetInlineDrwParms
.global JGrStSetCoords
.global J_ProcessTimers

.segment "iojmptab"

; jump table for functions that live below the I/O area

JumpTableBelowIO:
J_IsMseInRegion: jmp _IsMseInRegion
JMoveDataCore: jmp MoveDataCore
J_CRC: jmp _CRC
J_GetRandom: jmp _GetRandom
J_BBMult: jmp _BBMult
J_BMult: jmp _BMult
J_DMult: jmp _DMult
J_Ddiv: jmp _Ddiv
J_DSdiv: jmp _DSdiv
J_ProcessDelays: jmp _ProcessDelays
JGetInlineDrwParms: jmp GetInlineDrwParms
JGrStSetCoords: jmp GrStSetCoords
J_ProcessTimers: jmp _ProcessTimers

+ 104
- 0
kernal/c128/iowrapper.s View File

@@ -0,0 +1,104 @@
; GEOS KERNAL by Berkeley Softworks
; reverse engineered by Michael Steil, Maciej Witkowiak
;
; C128: Wrappers for functions below I/O
;
; On the C128, these function implementations are located
; between $D000-$E000. Since I/O is turned on by default,
; these wrappers turn off I/O, call these functions, and
; restore the I/O configuration.


.include "const.inc"
.include "geossym.inc"
.include "geosmac.inc"
.include "config.inc"
.include "kernal.inc"
.include "c64.inc"

.segment "iowrapper"

.import JumpTableBelowIO
.import J_IsMseInRegion
.import JMoveDataCore
.import J_CRC
.import J_GetRandom
.import J_BBMult
.import J_BMult
.import J_DMult
.import J_Ddiv
.import J_DSdiv
.import J_ProcessDelays
.import JGetInlineDrwParms
.import JGrStSetCoords
.import J_ProcessTimers

.global __ProcessDelays
.global __GetInlineDrwParms
.global __GrStSetCoords
.global __ProcessTimers
.global __IsMseInRegion
.global __CRC
.global __GetRandom
.global __DSdiv
.global __Ddiv
.global __DMult
.global __BMult
.global __BBMult
.global __MoveDataCore
.global CallAddr
.global RestoreConfig

__IsMseInRegion:
lda #<(J_IsMseInRegion - JumpTableBelowIO)
.byte $2c
__MoveDataCore:
lda #<(JMoveDataCore - JumpTableBelowIO)
.byte $2c
__CRC:
lda #<(J_CRC - JumpTableBelowIO)
.byte $2c
__GetRandom:
lda #<(J_GetRandom - JumpTableBelowIO)
.byte $2c
__BBMult:
lda #<(J_BBMult - JumpTableBelowIO)
.byte $2c
__BMult:
lda #<(J_BMult - JumpTableBelowIO)
.byte $2c
__DMult:
lda #<(J_DMult - JumpTableBelowIO)
.byte $2c
__Ddiv:
lda #<(J_Ddiv - JumpTableBelowIO)
.byte $2c
__DSdiv:
lda #<(J_DSdiv - JumpTableBelowIO)
.byte $2c
__ProcessDelays:
lda #<(J_ProcessDelays - JumpTableBelowIO)
.byte $2c
__GetInlineDrwParms:
lda #<(JGetInlineDrwParms - JumpTableBelowIO)
.byte $2c
__GrStSetCoords:
lda #<(JGrStSetCoords - JumpTableBelowIO)
.byte $2c
__ProcessTimers:
lda #<(J_ProcessTimers - JumpTableBelowIO)
sta CallAddr
lda config
sta RestoreConfig
ora #1
sta config
CallAddr = * + 1
jsr $D003
php
pha
RestoreConfig = * + 1
lda #$7f
sta config
pla
plp
rts

+ 31
- 0
kernal/c128/irq_back.s View File

@@ -0,0 +1,31 @@
; GEOS KERNAL by Berkeley Softworks
; reverse engineered by Michael Steil, Maciej Witkowiak
;
; Back bank IRQ and NMI handlers

.include "const.inc"
.include "geossym.inc"
.include "geosmac.inc"
.include "config.inc"
.include "c64.inc"

.segment "irq_back"

.global _NMIHandler
.global _IRQHandler128

_IRQHandler128:
cld
pha
START_IO_128
PushB rcr
and #$F0
sta rcr
nop ; front version says "jsr _IRQHandler" here
nop
nop
PopB rcr
END_IO_128
pla
_NMIHandler:
rti

+ 31
- 0
kernal/c128/irq_front.s View File

@@ -0,0 +1,31 @@
; GEOS KERNAL by Berkeley Softworks
; reverse engineered by Michael Steil, Maciej Witkowiak
;
; Front bank IRQ and NMI handlers

.include "const.inc"
.include "geossym.inc"
.include "geosmac.inc"
.include "config.inc"
.include "c64.inc"

.segment "irq_front"

.import _IRQHandler

.global _NMIHandler
.global _IRQHandler128

_IRQHandler128:
cld
pha
START_IO_128
PushB rcr
and #%11110000
sta rcr
jsr _IRQHandler
PopB rcr
END_IO_128
pla
_NMIHandler:
rti

+ 62
- 0
kernal/c128/junk_back.s
File diff suppressed because it is too large
View File


+ 43
- 0
kernal/c128/junk_front.s
File diff suppressed because it is too large
View File


+ 25
- 0
kernal/c128/low_jmptab.s View File

@@ -0,0 +1,25 @@
; GEOS KERNAL by Berkeley Softworks
; reverse engineered by Michael Steil, Maciej Witkowiak
;
; C128 jump table at $9D80

.include "const.inc"
.include "geossym.inc"
.include "geosmac.inc"
.include "config.inc"
.include "kernal.inc"
.include "c64.inc"