Skip to content

Commit

Permalink
Makefile can build geos.d64 two ways
Browse files Browse the repository at this point in the history
  • Loading branch information
mist64 committed Aug 19, 2016
1 parent b067bc0 commit a6b2797
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 30 deletions.
33 changes: 18 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,33 +61,36 @@ ALL_BINS= \
lightpen.bin \
mse1531.bin \
koalapad.bin \
pcanalog.bin \
combined.prg \
compressed.prg \
geos.d64
pcanalog.bin

all: geos.d64

clean:
rm -f $(KERNAL_OBJECTS) drv/*.o input/*.o $(ALL_BINS) combined.prg
rm -f $(KERNAL_OBJECTS) drv/*.o input/*.o $(ALL_BINS) combined.prg compressed.prg geos.d64

geos.d64: compressed.prg
c1541 <c1541.in >/dev/null
if [ -e desktop.cvt ]; then echo geoswrite desktop.cvt | c1541 geos.d64; fi >/dev/null
# Alternatively, we could add the file to a GEOS boot disk with "GEOS" app deleted:
# cp GEOS64.D64 geos.d64
# c1541 geos.d64 <c1541.in >/dev/null
if [ -e GEOS64.D64 ]; then \
cp GEOS64.D64 geos.d64; \
echo delete geos geosboot | c1541 geos.d64 >/dev/null; \
echo write compressed.prg geos | c1541 geos.d64 >/dev/null; \
echo \*\*\* Created geos.d64 based on GEOS64.D64.; \
else \
echo format geos,00 d64 geos.d64 | c1541 >/dev/null; \
echo write compressed.prg geos | c1541 geos.d64 >/dev/null; \
if [ -e desktop.cvt ]; then echo geoswrite desktop.cvt | c1541 geos.d64; fi >/dev/null; \
echo \*\*\* Created fresh geos.d64.; \
fi;

compressed.prg: combined.prg
pucrunch -f -c64 -x0x5000 $< $@

combined.prg: $(ALL_BINS)
printf "\x00\x50" > tmp.bin
cat start.bin /dev/zero | dd bs=1 count=16384 >> tmp.bin
cat drv1541.bin /dev/zero | dd bs=1 count=3456 >> tmp.bin
cat lokernal.bin /dev/zero | dd bs=1 count=8640 >> tmp.bin
cat kernal.bin /dev/zero | dd bs=1 count=16192 >> tmp.bin
cat joydrv.bin >> tmp.bin
cat start.bin /dev/zero | dd bs=1 count=16384 >> tmp.bin 2> /dev/null
cat drv1541.bin /dev/zero | dd bs=1 count=3456 >> tmp.bin 2> /dev/null
cat lokernal.bin /dev/zero | dd bs=1 count=8640 >> tmp.bin 2> /dev/null
cat kernal.bin /dev/zero | dd bs=1 count=16192 >> tmp.bin 2> /dev/null
cat joydrv.bin >> tmp.bin 2> /dev/null
mv tmp.bin combined.prg

kernal.bin: $(KERNAL_OBJECTS) kernal/kernal.cfg
Expand Down
19 changes: 4 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,13 @@ Run `make` to build GEOS. This will create the following files:
* input drivers: `amigamse.bin`, `joydrv.bin`, `lightpen.bin`, `mse1531.bin`, `koalapad.bin`, `pcanalog.bin`
* combined KERNAL image (`SYS 49155`): `combined.prg`
* compressed KERNAL image (`RUN`): `compressed.prg`
* disk image containing compressed kernel and, optionally, deskTop.: `geos.d64`

## Customization

Look into inc/equ.inc file - there are many true/false defines, you are free
to change them. But read the comments. You can compile-in input and disk
drivers so right after boot you will have your drivers (and you can boot from
1571/81 without any problems). In case that input driver is compiled into
KERNAL you have to delete all input driver files from boot disk, because
DeskTop will try to load the first one overriding compiled driver.
If you have C128 it is worth to enable 2MHz support - CPU is warped into 2MHz
on the border. This is better than add-on that I saw somewhere, because my
version will not flicker anytime and that add-on will not work with this
kernal. (not a single application that modifies GEOS KERNAL directly will not
work).
* disk image: `geos.d64`

If you have the [cbmfiles.com](http://www.cbmfiles.com/) `GEOS64.D64` image in the current directory, the disk image will be based on that one, with the `GEOS` and `GEOBOOT` files deleted and the newly built kernel added. Otherwise, it will be a new disk image with the kernel, and, if you have a `desktop.cvt` file in the current directory, with `DESK TOP` added.

## Customization

`inc/equ.inc` contains lots of compile time options. Most of them have not been tested recently.

## Source Tree

Expand Down

0 comments on commit a6b2797

Please sign in to comment.