Compare commits

...

42 Commits

Author SHA1 Message Date
Egan Ford 9af2b2d8fd new bins from tests, hack to dwine to sleep 1 sec before test 2023-10-26 14:57:08 -06:00
datajerk f3991f4cd1
Merge pull request #3 from ryandesign/ryandesign-cc
Allow Makefile compiler to be set with CC variable
2023-10-26 14:54:07 -06:00
datajerk d74542dd56
Merge pull request #2 from ryandesign/ryandesign-strict-prototypes
Fix issues found with -Wstrict-prototypes
2023-10-26 14:53:26 -06:00
Ryan Schmidt 11281905bd Allow Makefile compiler to be set with CC variable 2023-10-25 23:03:40 -05:00
Ryan Schmidt a54024f82a Fix issues found with -Wstrict-prototypes 2023-10-25 22:43:55 -05:00
Egan Ford e4815fe220 updated README.md 2023-05-10 17:37:01 -06:00
Egan Ford 9b1b8c423c updated README.md links, cleaned up testing docs 2023-05-10 17:24:58 -06:00
Egan Ford 6105800884 readded binaries 2023-05-09 14:25:36 -06:00
Egan Ford a64e5a176b readded binaries 2023-05-09 14:04:22 -06:00
Egan Ford ced20889ab docker wine32 support added 2023-05-09 14:02:04 -06:00
Egan Ford e6e2c9b15a fixed virtual ii 11.1 testing 2023-05-09 13:37:58 -06:00
Egan Ford 51933f3223 fixed windows testing, docker required now 2023-05-09 12:32:10 -06:00
Egan Ford 163d8a9661 updated README for cc65 version 2023-05-09 12:10:22 -06:00
Egan Ford e0d9e2a3ca included cc65 build, macos universal builds, refactored 2023-05-09 12:04:21 -06:00
Egan Ford e690a1c022 spelling error 2019-06-23 09:54:29 -06:00
Egan Ford ecd49dd0bf updated gameserverclient example binary 2017-05-31 20:15:19 -06:00
Egan Ford 0a4199ed9c updated README 2017-05-11 16:11:02 -06:00
Egan Ford 6db80b8ae5 minor readme and comment and formatting updates 2017-05-06 12:24:37 -06:00
Egan Ford ebf2cfc94d minor readme and comment and formatting updates 2017-05-06 12:22:59 -06:00
Egan Ford 5e85697fe4 readme clean 2017-05-05 07:41:02 -06:00
Egan Ford 7e03db4b42 readme clean 2017-05-05 07:40:00 -06:00
Egan Ford e3a17ab29b completely removed all hacks for scratchpad ram, loader and bar asm only write to text RAM, no scratchpad ram. 2017-05-03 11:43:15 -06:00
Egan Ford a3721ecb54 completely removed all hacks for scratchpad ram, loader and bar asm only write to text RAM, no scratchpad ram. 2017-05-03 11:37:16 -06:00
Egan Ford 8498a0ef05 completely removed all hacks for scratchpad ram, loader and bar asm only write to text RAM, no scratchpad ram. 2017-05-03 10:39:36 -06:00
Egan Ford 249e6c2600 completely removed all hacks for scratchpad ram, loader and bar asm only write to text RAM, no scratchpad ram. 2017-05-03 10:38:56 -06:00
Egan Ford a191c5cd81 new loader that does not load splash screen directly to 0x400, but to 0x800 and then moves it to 0x400 to avoid overwriting scratchpad ram 2017-05-03 06:58:55 -06:00
Egan Ford 4c9315f2ef added end tag for listing 2017-04-30 11:39:41 -06:00
Egan Ford 0c5f9bdae0 color changes, optimized for 39 rows 2017-04-27 17:37:51 -06:00
Egan Ford 7b7ab6627d added -g option for LGR mixed gr/text splash screen 2017-04-24 23:11:51 -06:00
Egan Ford 0e25155cf6 readme update 2017-04-23 11:13:10 -06:00
Egan Ford 7f0c603000 minor non-code changes 2017-04-22 20:45:43 -06:00
Egan Ford f72e99fd34 -r option to override default bar row 2017-04-22 20:37:59 -06:00
Egan Ford 3731f93a92 -r option to override default bar row 2017-04-22 20:36:47 -06:00
Egan Ford 62fc5ab66b animated loading bar -b option 2017-04-22 20:16:01 -06:00
Egan Ford cc8d40c802 animated loading bar -b option 2017-04-22 20:14:29 -06:00
Egan Ford 695afe66cc animated loading bar -b option 2017-04-22 20:13:22 -06:00
Egan Ford 5e83553858 changed test splash page, no code changes 2017-04-22 12:12:40 -06:00
Egan Ford d00cb0a0ef changed test splash page, no code changes 2017-04-22 12:08:02 -06:00
Egan Ford 081a78b10f screen hole patching directly in c2d, more test options 2017-04-22 10:33:53 -06:00
Egan Ford f56cd484e6 grammar 2017-04-21 17:40:15 -06:00
Egan Ford 7e5d0c1a23 fix ramdom applescript crash on test, updated version number 2017-04-21 17:34:50 -06:00
Egan Ford 080865007d updated watermark 2017-04-21 17:31:10 -06:00
31 changed files with 4838 additions and 13459 deletions

12
Dockerfile.wine32 Normal file
View File

@ -0,0 +1,12 @@
# docker build --no-cache -t wine32 -f Dockerfile.wine32 .
FROM ubuntu:19.10
ENV LC_CTYPE C.UTF-8
ENV DEBIAN_FRONTEND noninteractive
RUN dpkg --add-architecture i386
RUN apt-get update
RUN apt-get -qy install wine32
WORKDIR /root
RUN wine foobar || true

111
Makefile
View File

@ -1,6 +1,6 @@
EMUTEST = 1
WIN32GCC = /usr/local/gcc-4.8.0-qt-4.8.4-for-mingw32/win32-gcc/bin/i586-mingw32-gcc
C2T = c2t
all: bin/c2d bin/text2page bin/page2text
@ -8,34 +8,117 @@ windows: bin/c2d.exe bin/text2page.exe bin/page2text.exe
dist: all windows
c2d.h: c2d.h.0 asm/loader.s makeheader
cc65-sources-2.13.3.tar.bz2:
curl -sLO https://github.com/mrdudz/cc65-old/raw/master/cc65-sources-2.13.3.tar.bz2
cc65-2.13.3/bin/cl65: cc65-sources-2.13.3.tar.bz2
tar zxf cc65-sources-2.13.3.tar.bz2
(cd cc65-2.13.3; /usr/bin/sed 's!/usr/local!'${PWD}'/cc65-2.13.3!' <make/gcc.mak >Makefile; make -j4 bins || make bins && make install || true)
c2d.h: c2d.h.0 asm/loader.s asm/bar.s makeheader cc65-2.13.3/bin/cl65
./makeheader
bin/c2d: c2d.c c2d.h
gcc -Wall -Wno-missing-braces -I. -O3 -o $@ $< -lm
bin/c2d_arm: c2d.c c2d.h
$(CC) -Wall -Wno-missing-braces -I. -O3 -target arm64-apple-macos11 -o $@ $< -lm
bin/text2page_arm: text2page.c
$(CC) -Wall -O3 -target arm64-apple-macos11 -o $@ $< -lm
bin/page2text_arm: page2text.c
$(CC) -Wall -O3 -target arm64-apple-macos11 -o $@ $< -lm
bin/mandelbrotgr_arm: mandelbrotgr.c
$(CC) -Wall -O3 -target arm64-apple-macos11 -o $@ $< -lm
bin/c2d_x86: c2d.c c2d.h
$(CC) -Wall -Wno-missing-braces -I. -O3 -target x86_64-apple-macos10.12 -o $@ $< -lm
bin/text2page_x86: text2page.c
$(CC) -Wall -O3 -target -x86_64-apple-macos10.12 -o $@ $< -lm
bin/page2text_x86: page2text.c
$(CC) -Wall -O3 -target x86_64-apple-macos10.12 -o $@ $< -lm
bin/mandelbrotgr_x86: mandelbrotgr.c
$(CC) -Wall -O3 -target x86_64-apple-macos10.12 -o $@ $< -lm
bin/c2d: bin/c2d_x86 bin/c2d_arm
lipo -create -output $@ $<
bin/text2page: bin/text2page_x86 bin/text2page_arm
lipo -create -output $@ $<
bin/page2text: bin/page2text_x86 bin/page2text_arm
lipo -create -output $@ $<
bin/mandelbrotgr: bin/mandelbrotgr_x86 bin/mandelbrotgr_arm
lipo -create -output $@ $<
bin/c2d.exe: c2d.c c2d.h
$(WIN32GCC) -Wall -Wno-missing-braces -I. -O3 -o $@ $<
bin/text2page: text2page.c
gcc -Wall -O3 -o $@ $< -lm
bin/text2page.exe: text2page.c
$(WIN32GCC) -Wall -O3 -o $@ $<
bin/page2text: page2text.c
gcc -Wall -O3 -o $@ $< -lm
bin/page2text.exe: page2text.c
$(WIN32GCC) -Wall -O3 -o $@ $<
clean:
rm -f bin/* *.dsk c2d.h c2d.h.1
rm -rf bin/* *.dsk c2d.h c2d.h.1 cc65-sources-2.13.3.tar.bz2 cc65-2.13.3
(cd asm; make clean)
gameserverclient.text: Makefile
figlet -c -w 40 -f slant "Game Server Online Client" >$@
( \
figlet -c -w 40 -f slant "Apple ][ Game Server Online!" | \
perl -p -e 's/^ +\n$$//' | \
sed '1,6s/^/ /'; \
echo; \
text="THE APPLE ][ AE WARESHOLE IS BACK!"; printf "%*s\n" $$((($${#text}+40)/2)) "$$text"; \
text="CASSETTE PORT FTW! ---- ASCIIEXPRESS.NET"; printf "%*s\n" $$((($${#text}+40)/2)) "$$text"; \
) | tail -24 >$@
test: gameserverclient gameserverclient.mon gameserverclient.text dist
EMU=$(EMUTEST) ./test.sh
barloader.text: Makefile
( \
echo; \
figlet -c -w 40 -f poison "c2d"; \
echo; \
text="C2D (CODE TO DISK) BUILT-IN LOADER"; printf "%*s\n" $$((($${#text}+40)/2)) "$$text"; \
echo; \
text="LOADING GAME SERVER CLIENT ..."; printf "%*s\n" $$((($${#text}+40)/2)) "$$text"; \
echo; \
text="________________________________________"; printf "%*s\n" $$((($${#text}+40)/2)) "$$text"; \
text="________________________________________"; printf "%*s\n" $$((($${#text}+40)/2)) "$$text"; \
echo; \
echo; \
text="HTTP://GITHUB.COM/DATAJERK/C2D"; printf "%*s\n" $$((($${#text}+40)/2)) "$$text"; \
) | tail -24 >$@
barloader.textpage: barloader.text bin/text2page
bin/text2page <$< >$@
gameserverclientbar.dsk: barloader.textpage gameserverclient bin/c2d Makefile
bin/c2d -b -t $< gameserverclient,800 $@
bargrloader.textpage: bin/mandelbrotgr
bin/mandelbrotgr >$@
gameserverclientbargr.dsk: bargrloader.textpage gameserverclient bin/c2d Makefile
bin/c2d -b -g -r 23 -t $< gameserverclient,800 $@
gameserverclient.dsk: gameserverclient bin/c2d Makefile
bin/c2d gameserverclient,800 $@
dsk: gameserverclient.dsk gameserverclientbar.dsk gameserverclientbargr.dsk
gameserverclient.mon: gameserverclient
$(C2T) gameserverclient,800 gameserverclient.mon
fulltest: gameserverclient gameserverclient.mon gameserverclient.text gameserverclient.tiff gameserverclientsplash.tiff test.sh test.scrp dist
EMU=1 WIN=1 ./test.sh
disttest: gameserverclient gameserverclient.mon gameserverclient.text test.sh dist
EMU=0 WIN=1 ./test.sh
test: gameserverclient gameserverclient.mon gameserverclient.text test.sh all
EMU=0 WIN=0 ./test.sh

View File

@ -4,13 +4,17 @@
> Based on work by:
>
> Weishaar, Tom. *Running without filenames*. Open-Apple Jan. 1985 Vol. 1, No. 0: p. 7 (<http://apple2online.com/web_documents/Open%20Apple%20Vol1No00.pdf>)
> Weishaar, Tom. *Running without filenames*. Open-Apple Jan. 1985 Vol. 1, No. 0: p. 7 (<https://web.archive.org/web/20150325102420/http://apple2online.com/web_documents/Open%20Apple%20Vol1No00.pdf>)
`c2d` early history: http://macgui.com/usenet/?group=1&id=254902#msg
### Features
* `$800-$B6FF` available for binary code.
* `$B700-$BFFF` free after load.
* Platforms tested:
* 32-bit/64-bit x86 OS/X.
* 32-bit/64-bit x86 MacOS|OS/X.
* 32-bit x86 Windows/MinGW.
@ -25,6 +29,11 @@ git clone https://github.com/datajerk/c2d.git
Download <https://github.com/datajerk/c2d/archive/master.zip> and extract.
### No Build Notes
Just get the files from [`bin`](https://github.com/datajerk/c2d/tree/master/bin). 32-bit Windows and MacOS (universal x86_64/arm64) included.
### Build Notes
Unix/Linux:
@ -33,7 +42,7 @@ Unix/Linux:
*or*
OS/X, Linux, Cygwin:
MacOS|OS/X, Linux, Cygwin:
gcc -Wall -Wno-missing-braces -I. -O3 -o c2d c2d.c -lm
gcc -Wall -O3 -o bin/text2page text2page.c -lm
@ -51,13 +60,16 @@ Windows/MinGW:
```
usage: c2d [-vh?]
c2d [-m] [-t filename] [-s start address override] input[.mon],[load_address] output.dsk
c2d [-bgm] [-r row] [-t filename] [-s start address override] input[.mon],[load_address] output.dsk
-h|? this help
-m jump to monitor after booting
-s XXXX jump to XXXX after booting
-t filename where filename is a 1K $400-$7FF text page splash screen.
The splash screen will display while the binary is loading.
-t filename, where filename is a 1K $400-$7FF text page splash screen
The splash screen will display while the binary is loading
-b animated loading bar
-g splash page is mixed mode GR
-r override row default of 19 with 'row'
-v print version number and exit
Input without a .mon extension is assumed to be a binary with a 4 byte header.
@ -79,9 +91,43 @@ Examples:
c2d -t gameserverclient.textpage gameserverclient,800 gameserverclient.dsk
```
### Splash Page Examples
*Click on image to see video.*
> Splash pages are the exact bytes the Apple II expects in memory range $400-$7FF. Your splash screen should be exactly 1024 bytes (do not worry, the `c2d` loader will not overwrite the Peripheral Slot Scratchpad RAM).
```
c2d -t gameserverclient.textpage gameserverclient,800 gameserverclient.dsk
```
`-t gameserverclient.textpage` instructs `c2d` to put up a text splash page while the binary is loading.
[![splash](https://img.youtube.com/vi/9EPy0JnnJyA/0.jpg)](https://www.youtube.com/watch?v=9EPy0JnnJyA "splash")
-----
```
c2d -b -t barloader.textpage gameserverclient,800 gameserverclientbar.dsk
```
`-b` adds an animated bar on line 19.
[![splash](https://img.youtube.com/vi/D3SaHlw4fgM/0.jpg)](https://www.youtube.com/watch?v=D3SaHlw4fgM "splashbar")
-----
```
c2d -b -g -r 23 -t bargrloader.textpage gameserverclient,800 gameserverclientbargr.dsk
```
`-r 23` moves the animated bar to line 23, and `-g` indicates the splash page is mixed mode text/gr.
[![splashbargr](https://img.youtube.com/vi/4Ik1eraAM6c/0.jpg)](https://www.youtube.com/watch?v=4Ik1eraAM6c "splashbargr")
### text2page Example
Input is expected to be ASCII text (LF or CRLF line terminated). Only the first 40 characters/line and the first 24 lines are read. See `gameserverclient.text` example.
Input is expected to be ASCII text (LF or CRLF line terminated). Only the first 40 characters/line and the first 24 lines are read. See `gameserverclient.text` and `barloader.text` examples.
```
text2page <gameserverclient.text >gameserverclient.textpage
@ -96,6 +142,24 @@ Input is expected to be an Apple II binary from $400-$7FF. Exactly 1024 bytes.
page2text <gameserverclient.textpage >gameserverclient.text
```
### Testing
Automated testing is only supported on MacOS|OS/X and requires the following:
* Virtual ][ (<http://http://www.virtualii.com/>)
* Windows cross-compiling tools <https://web.archive.org/web/20151009134313/http://crossgcc.rts-software.org/download/gcc-4.8.0-qt-4.8.4-win32/gcc-4.8.0-qt-4.8.4-for-mingw32.dmg>
* Docker required for Windows binary testing; run this once first `docker build --no-cache -t wine32 -f Dockerfile.wine32 .`
NOTE: Windows binary testing only supported on MacOS x86_64 machines.
To test, type:
```
make test # MacOS|OS/X only
make disttest # MacOS|OS/X and Windows
make fulltest # MacOS|OS/X, Windows, and Virtual ][
```
### Bugs
Yes. No input checking. Big Endian untested.
@ -103,7 +167,7 @@ Yes. No input checking. Big Endian untested.
### The Ugly Stuff
c2d, Code to Disk, Version 0.50, Fri Apr 21 23:13:38 UTC 2017
c2d, Code to Disk, Version 0.57
(c) 2012,2017 All Rights Reserved, Egan Ford (egan@sense.net)

View File

@ -1,9 +1,6 @@
CL = cl65
CL_FLAGS = -t none --listing --list-bytes 100
#CL_FLAGS = -t apple1 -C apple1-16k.cfg --listing --list-bytes 100
CC = cl65
CC_FLAGS = --static-locals -t apple1 -C apple1-16k.cfg
C2T = c2t
ASRC = $(shell echo *.s)
AOBJ = $(ASRC:%.s=%.o)
@ -17,11 +14,4 @@ clean:
-rm -f $(ABIN) $(AOBJ) $(ALST) $(AMON)
%: %.s
$(CL) $(CL_FLAGS) $<
%: %.c
$(CC) $(CC_FLAGS) $<
%.mon: %
$(C2T) $< $@
$(CL) $(CL_FLAGS) $<

206
asm/bar.s Normal file
View File

@ -0,0 +1,206 @@
;bar.s
;
; moves itself to another page memory,
; then reads binary from disk using params at end,
; then jumps to binary
;
; apple params/vectors
warm = $FF69 ; back to monitor
bell = $FBDD ; ding
preg = $48 ; mon p reg
ch = $24 ; cursor horizontal
movecur = $FB5B ; move cursor to ch,a
cout = $FDED ; character out sub
; dos params/vectors
rwtsprm = $B7E8 ; looked at dos 3.3 disk, not using $3E3 to find
rwts = $B7B5 ; rwts jsr
; vars
stage1 = $C00
stage2 = $300 ; $300 looks open
invsp = $20 ; inverse space for draw
trkcnt = $00 ; track counter
segcnt = $01 ; loop var
buffer = $02 ; MSB of RWTS buffer
secnum = $03 ; loop var
trknum = $04 ; loop var
barcnt = $05 ; bar counter
barptr = $06 ; bar pointer
.org stage1
grcheck:
lda *+(gr-loader)+(moved-grcheck)
beq movetext
lda #0 ; GR mode
sta $C050
sta $C053
movetext:
ldx #0
movetx:
lda $800,x
sta $400,x
lda $880,x
sta $480,x
lda $900,x
sta $500,x
lda $980,x
sta $580,x
lda $A00,x
sta $600,x
lda $A80,x
sta $680,x
lda $B00,x
sta $700,x
lda $B80,x
sta $780,x
inx
cpx #120
bne movetx ; move 120 bytes
init:
lda #0 ; reset pointer and counter
sta barcnt
sta barptr
lda #1 ; read(1)/write(2) command
ldy #$0C ; offset in RWTS
sta rwtsprm,y ; write it to RWTS
lda #0 ; buffer LSB
ldy #8 ; offset in RWTS
sta rwtsprm,y ; write it to RWTS
lda #2
sta trknum ; start with track 2
start:
ldx #0 ; move code to stage2
move:
lda moved,x
sta loader,x
inx
cpx #$D0
bne move ; move 208 bytes
jmp loader
moved:
.org stage2
loader:
lda loadpage ; where to dump the tracks
sta buffer
ldx lasttrack
dex ; because data starts at track 2
dex
stx trkcnt ; number of complete and partial tracks
;;;begin track loop
trkloop:
lda trknum ; track number
ldy #4 ; offset in RWTS
sta rwtsprm,y ; write it to RWTS
;;;begin sector loop (16), backwards is faster, much faster
lda trkcnt ; check if last track
bne fulltrack ; if not then full track
lda lastsector ; if so, get last sector number
bpl subtrack
fulltrack:
lda #$F
subtrack:
sta secnum
secloop:
lda secnum ; sector number
ldy #5 ; offset in RWTS
sta rwtsprm,y ; write it to RWTS
lda buffer ; buffer MSB
clc
adc secnum ; compute page load address
ldy #9 ; offset in RWTS
sta rwtsprm,y ; write it to RWTS
ldy #<rwtsprm ; load rwts paramlist B7E8
lda #>rwtsprm
jsr rwts ; do it!
bcs diskerror
lda #0
sta preg ; fix p reg so mon is happy
;;;draw code
inc barcnt ; sectors read
ldx barptr ; get current pointer value
lda bar,x
cmp barcnt ; is bar,x = barcnt?
bne nodraw ; if bar,x = barcnt draw bar
lda barptr ; get position
;clc
;adc #5 ; indent
; new version, no rom calls, just poke to screen
clc ; clear carry
adc rowlsb ; add the text page row lsb
sta screen+1 ; store that in self mod code
lda rowmsb ; get text page row msb
sta screen+2 ; store that in self mod code
lda #invsp ; load block char
screen:
sta $400 ; write out char
; old version, rom calls, cout will scroll windows on 40x24
;sta ch
;lda row ; row 19
;jsr movecur
;lda #invsp
;jsr cout
inc barptr ; move pointer to next bar position
nodraw:
;;;end draw code
dec secnum
bpl secloop
;;;end sector loop
lda buffer ; buffer += $10
clc
adc #$10
sta buffer
inc trknum ; next track
dec trkcnt ;
bpl trkloop ; 0, all done with tracks
;;;end track loop
done:
jmp (nextjump) ; down with load, run it
diskerror:
jmp warm
lasttrack:
.org *+1
lastsector:
.org *+1
loadpage:
.org *+1
nextjump:
.org *+2
gr:
.org *+1
row:
.org *+1
rowlsb:
.org *+1
rowmsb:
.org *+1
bar:
.org *+40
end:

View File

@ -18,8 +18,7 @@ rwts = $B7B5 ; rwts jsr
; vars
stage1 = $800
;stage2 = $B600 ; overwrite track 0/sector 0, not needed any more?
stage1 = $C00
stage2 = $300 ; $300 looks open
;;;run time
trkcnt = $00 ; track counter
@ -32,6 +31,46 @@ trknum = $04 ; loop var
start:
.org stage1
grcheck:
lda *+(gr-loader)+(moved-grcheck)
beq movetext
lda #0 ; GR mode
sta $C050
sta $C053
movetext:
ldx #0
movetx:
lda $800,x
sta $400,x
lda $880,x
sta $480,x
lda $900,x
sta $500,x
lda $980,x
sta $580,x
lda $A00,x
sta $600,x
lda $A80,x
sta $680,x
lda $B00,x
sta $700,x
lda $B80,x
sta $780,x
inx
cpx #120
bne movetx ; move 120 bytes
init:
lda #1 ; read(1)/write(2) command
ldy #$0C ; offset in RWTS
sta rwtsprm,y ; write it to RWTS
lda #0 ; buffer LSB
ldy #8 ; offset in RWTS
sta rwtsprm,y ; write it to RWTS
lda #2
sta trknum ; start with track 2
ldx #0 ; move code to stage2
move:
lda moved,x
@ -45,17 +84,6 @@ moved:
.org stage2
loader:
lda #1 ; read(1)/write(2) command
ldy #$0C ; offset in RWTS
sta rwtsprm,y ; write it to RWTS
lda #0 ; buffer LSB
ldy #8 ; offset in RWTS
sta rwtsprm,y ; write it to RWTS
lda #2
sta trknum ; start with track 2
lda loadpage ; where to dump the tracks
sta buffer
@ -125,14 +153,6 @@ loadpage:
.org *+1
nextjump:
.org *+2
;;; used for debug
;trkcnt:
; .org *+1
;segcnt:
; .org *+1
;buffer:
; .org *+1
;secnum:
; .org *+1
;trknum:
; .org *+1
gr:
.org *+1
end:

BIN
bargrloader.textpage Normal file

Binary file not shown.

23
barloader.text Normal file
View File

@ -0,0 +1,23 @@
@@@@@@@ @@@@@@ @@@@@@@
@@@@@@@@ @@@@@@@@ @@@@@@@@
!@@ @@@ @@! @@@
!@! @!@ !@! @!@
!@! !!@ @!@ !@!
!!! !!: !@! !!!
:!! !:! !!: !!!
:!: :!: :!: !:!
::: ::: :: ::::: :::: ::
:: :: : :: : ::: :: : :
C2D (CODE TO DISK) BUILT-IN LOADER
LOADING GAME SERVER CLIENT ...
________________________________________
________________________________________
HTTP://GITHUB.COM/DATAJERK/C2D

BIN
barloader.textpage Normal file

Binary file not shown.

BIN
bin/c2d

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

89
c2d.c
View File

@ -1,6 +1,6 @@
/*
c2d, Code to Disk, Version 0.50, Fri Apr 21 23:13:38 UTC 2017
c2d, Code to Disk, Version 0.57
(c) 2012,2017 All Rights Reserved, Egan Ford (egan@sense.net)
@ -18,7 +18,7 @@ License:
Description:
This small utility will read Apple II binary and monitor text files and
output a DOS ordered dsk image that will boot your code quickly.
output a DOS ordered dsk image that will boot your code quickly.
Features:
* Apple II+, IIe support.
@ -42,27 +42,28 @@ Bugs:
#include <sys/stat.h>
#include "c2d.h"
#define VERSION "Version 0.50"
#define VERSION "Version 0.57"
#define INFILE argv[argc-2]
#define OUTFILE argv[argc-1]
#define BINARY 0
#define MONITOR 1
#define LOADER "loader"
void usage();
void usage(void);
char *getext(char *filename);
int main(int argc, char **argv)
{
FILE *ifp, *ofp;
int c, i, j, k, start = 0, loadaddress, inputtype, warm = 0, filesize = 0;
int loaderstart, loader = 0, loadersize = 0, textpagesize = 0;
int loaderstart, loader = 0, loadersize = 0, loaderbasesize = 0, textpagesize = 0;
int bar = 0, row = 19, gr = 0;
struct stat st;
char *filetypes[] = { "BINARY", "MONITOR" };
char *ext, filename[256], load_address[10], *textpage = NULL;
opterr = 1;
while ((c = getopt(argc, argv, "t:vmh?s:")) != -1)
while ((c = getopt(argc, argv, "gr:t:vmh?s:b")) != -1)
switch (c) {
case 't': // load a splash page while loading binary
loader = 1;
@ -79,6 +80,17 @@ int main(int argc, char **argv)
warm = 0;
start = (int) strtol(optarg, (char **) NULL, 16); // todo: input check
break;
case 'r': // bar row
row = (int) strtol(optarg, (char **) NULL, 10); // todo: input check
if (row > 23)
row = 23;
break;
case 'b':
bar = 1;
break;
case 'g':
gr = 1;
break;
case 'h': // help
case '?':
usage();
@ -209,16 +221,30 @@ int main(int argc, char **argv)
return 1;
}
// check for errors
fread(&blank.track[1].sector[0].byte[0], textpagesize, 1, ifp);
fclose(ifp);
if ((loadersize = sizeof(loadercode)) > 256) {
fprintf(stderr, "Loader code size %d > 256\n\n", loadersize);
return 1;
}
if(!bar) {
loaderbasesize = sizeof(loadercode);
if ((loadersize = sizeof(loadercode)) > 256) {
fprintf(stderr, "Loader code size %d > 256\n\n", loadersize);
return 1;
}
for (i = 0; i < loadersize; i++)
blank.track[1].sector[4].byte[i] = loadercode[i];
for (i = 0; i < loadersize; i++)
blank.track[1].sector[4].byte[i] = loadercode[i];
}
else {
loaderbasesize = sizeof(barcode);
if ((loadersize = sizeof(barcode)) > 256) {
fprintf(stderr, "Loader code size %d > 256\n\n", loadersize);
return 1;
}
for (i = 0; i < loadersize; i++)
blank.track[1].sector[4].byte[i] = barcode[i];
}
// loader args
// lasttrack
@ -231,9 +257,35 @@ int main(int argc, char **argv)
blank.track[1].sector[4].byte[loadersize + 3] = start & 0xFF;
// program start MSB
blank.track[1].sector[4].byte[loadersize + 4] = start >> 8;
// gr mode
blank.track[1].sector[4].byte[loadersize + 5] = gr;
loaderstart = 0x400;
loadersize += (1024 + 5); // textpage + loader + loader args
//bar code, pre compute status bar table
if(bar) {
int num_sectors = (int) ceil((filesize + (loadaddress & 0xFF)) / 256.0);
int bar_length = 40;
int i, rowaddr;
// bar row
blank.track[1].sector[4].byte[loadersize + 6] = row;
rowaddr = 0x400+(row/8)*0x28+((row%8)*0x80);
// program start LSB
blank.track[1].sector[4].byte[loadersize + 7] = rowaddr & 0xFF;
// program start MSB
blank.track[1].sector[4].byte[loadersize + 8] = rowaddr >> 8;
for(i = 1; i <= bar_length; i++)
blank.track[1].sector[4].byte[loadersize + 8 + i] = i * num_sectors / bar_length;
}
loaderstart = 0x800;
// temp hack to effect the sound of the drive, i.e. to make consistent
// longer term put binary payload at end of loader
// loadersize += (1024 + 5); // textpage + loader + loader args
loadersize = 4096;
blank.track[0].sector[1].byte[0xE0] = ceil((loadersize + (loaderstart & 0xFF)) / 256.0);
blank.track[0].sector[1].byte[0xE7] = ((loaderstart + loadersize - 1) >> 8) + 1;
@ -246,7 +298,7 @@ int main(int argc, char **argv)
fprintf(stderr, "Binary Number of sectors: %d\n", (int) ceil((filesize + (loadaddress & 0xFF)) / 256.0));
fprintf(stderr, "Binary Memory page range: $%02X - $%02X\n", loadaddress >> 8, (loadaddress + filesize - 1) >> 8);
loaderstart = 0x800;
loaderstart = 0xC00;
blank.track[0].sector[1].byte[0x3B] = 0x4C;
blank.track[0].sector[1].byte[0x3C] = loaderstart & 0xFF;
@ -254,7 +306,7 @@ int main(int argc, char **argv)
fprintf(stderr, "After boot, jump to: $%04X\n", loaderstart);
fprintf(stderr, "\n");
fprintf(stderr, "Writing %s to T:02/S:00 - T:%02d/S:%02d on %s\n\n", filename, blank.track[1].sector[4].byte[sizeof(loadercode)], blank.track[1].sector[4].byte[sizeof(loadercode) + 1], OUTFILE);
fprintf(stderr, "Writing %s to T:02/S:00 - T:%02d/S:%02d on %s\n\n", filename, blank.track[1].sector[4].byte[sizeof(loadercode)], blank.track[1].sector[4].byte[loaderbasesize + 1], OUTFILE);
}
if ((ofp = fopen(OUTFILE, "wb")) == NULL) {
@ -284,7 +336,8 @@ char *getext(char *filename)
if (sp == strlen(filename) || sp == 0)
return (NULL);
if ((rval = (char *) malloc(sp * sizeof(char))) == NULL); //do error code
if ((rval = (char *) malloc(sp * sizeof(char))) == NULL)
; //do error code
rval[sp] = '\0';
for (i = 0; i < sp + i; i++)
@ -293,7 +346,7 @@ char *getext(char *filename)
return (rval);
}
void usage()
void usage(void)
{
fprintf(stderr, "%s", usagetext);
}

9166
c2d.h

File diff suppressed because it is too large Load Diff

13
c2d.h.0
View File

@ -13,13 +13,16 @@ typedef struct d {
const char *usagetext="\n\
usage: c2d [-vh?]\n\
c2d [-m] [-t filename] [-s start address override] input[.mon],[load_address] output.dsk\n\
c2d [-bgm] [-r row] [-t filename] [-s start address override] input[.mon],[load_address] output.dsk\n\
\n\
-h|? this help\n\
-m jump to monitor after booting\n\
-s XXXX jump to XXXX after booting\n\
-t filename where filename is a 1K $400-$7FF text page splash screen.\n\
The splash screen will display while the binary is loading.\n\
-t filename, where filename is a 1K $400-$7FF text page splash screen\n\
The splash screen will display while the binary is loading\n\
-b animated loading bar\n\
-g splash page is mixed mode GR\n\
-r override row default of 19 with 'row'\n\
-v print version number and exit\n\
\n\
Input without a .mon extension is assumed to be a binary with a 4 byte header.\n\
@ -9002,8 +9005,8 @@ disk blank = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x61,0x74,0x61,0x6a,0x65,0x72,0x6b
0x68,0x74,0x74,0x70,0x73,0x3a,0x2f,0x2f,0x67,0x69,0x74,0x68,0x75,0x62,0x2e,0x63,
0x6f,0x6d,0x2f,0x64,0x61,0x74,0x61,0x6a,0x65,0x72,0x6b,0x2f,0x63,0x32,0x64,0x2f
};

4
dwine Executable file
View File

@ -0,0 +1,4 @@
#!/bin/bash
set -x
docker run --rm -it -v $PWD:/pwd wine32 bash -c "cd /pwd && sleep 1 && wine $*"

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -1,24 +1,24 @@
___ __ ______
/ | ____ ____ / /__ / / _/
/ /| | / __ \/ __ \/ / _ \ / / /
/ ___ |/ /_/ / /_/ / / __/ / / /
/_/ |_/ .___/ .___/_/\___/ _/ / /
/_/ /_/ /__/__/
______
/ ____/___ _____ ___ ___
/ / __/ __ `/ __ `__ \/ _ \
/ /_/ / /_/ / / / / / / __/
\____/\__,_/_/ /_/ /_/\___/
_____
/ ___/___ ______ _____ _____
\__ \/ _ \/ ___/ | / / _ \/ ___/
___/ / __/ / | |/ / __/ /
/____/\___/_/ |___/\___/_/
____ ___
/ __ \____ / (_)___ ___
/ / / / __ \/ / / __ \/ _ \
/ /_/ / / / / / / / / / __/
\____/_/ /_/_/_/_/ /_/\___/
_________ __
/ ____/ (_)__ ____ / /_
/ / / / / _ \/ __ \/ __/
/ /___/ / / __/ / / / /_
\____/_/_/\___/_/ /_/\__/
____ ___ __
/ __ \____ / (_)___ ___ / /
/ / / / __ \/ / / __ \/ _ \/ /
/ /_/ / / / / / / / / / __/_/
\____/_/ /_/_/_/_/ /_/\___(_)
THE APPLE ][ AE WARESHOLE IS BACK!
CASSETTE PORT FTW! ---- ASCIIEXPRESS.NET

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,43 +1,19 @@
#!/bin/bash
header()
{
FILE=$1
VAR=$2
EOL=$3
BYTES=$(hexdump -v $FILE | sed 's/^.......//' | wc -w | awk '{print $1}');
echo "/*"
expand ${FILE}.s
echo "*/"
printf "unsigned char $VAR[] = {\n\t"
for i in $(hexdump -v $FILE | sed 's/^.......//');
do
printf "0x%02X" 0x$i
BYTES=$((BYTES - 1))
if ((BYTES != 0))
then
printf ","
fi
EOL=$((EOL - 1))
if ((EOL == 0))
then
EOL=8
printf "\n\t"
fi
done
printf "\n};\n"
}
cd asm
make clean
make
PATH=../cc65-2.13.3/bin:$PATH make
(
header loader loadercode 8
echo "/*"
expand loader.s
echo "*/"
/usr/bin/xxd -i loader | sed 's/loader/loadercode/'
echo "/*"
expand bar.s
echo "*/"
/usr/bin/xxd -i bar | sed 's/bar/barcode/'
) > ../c2d.h.1
cd ..

94
mandelbrotgr.c Normal file
View File

@ -0,0 +1,94 @@
#include <stdio.h>
#include <stdlib.h>
#include <sys/ioctl.h>
#include <unistd.h>
#include <strings.h>
#define MAX 15
#define NORMAL 0x80
// unsigned char colors[16] = { 0xF, 0xE, 0xD, 0xC, 0xB, 0xA, 0x9, 0x8, 0x7, 0x6, 0x5, 0x4, 0x3, 0x2, 0x1, 0x0 };
// chanage order and number of colors for different output
// default palette
// unsigned char colors[15] = { 0xE, 0xD, 0xC, 0xB, 0xA, 0x9, 0x8, 0x7, 0x6, 0x5, 0x4, 0x3, 0x2, 0x1, 0x0 };
// redish
// unsigned char colors[15] = { 0xB, 0x3, 0x1, 0x9, 0xD, 0xE, 0xB, 0x4, 0x7, 0x6, 0x2, 0xA, 0x5, 0x8, 0x0 };
// blueish
unsigned char colors[15] = { 0x2, 0x6, 0x7, 0xE, 0xC, 0x4, 0xD, 0x9, 0xB, 0x3, 0x1, 0xA, 0x5, 0x8, 0x0 };
const char text[4][41] = {
"EXAMPLE GR/TEXT SPLASH SCREEN",
"LOADING GAME SERVER CLIENT...",
"________________________________________",
"________________________________________",
};
int main(int argc, char **argv)
{
int c, r, i, j, k, line = 0;
double xd, yd, x0, y0, x, y, xt;
unsigned char screen[24][40];
// clear screen to zeros
for (i = 0; i < 24; i++)
for (j = 0; j < 40; j++)
screen[i][j] = 0x00;
c = 40;
r = 40;
xd = (1.0 - -2.5) / (double) c; // size of x pixel
yd = (1.0 - -1.0) / (double) r; // size of y pixel
// 39 rows, set i = 1
for (i = 1; i < r; i++) {
// gr text page translation
// 40 row
// line = 3 * ((i / 2) % 8) + i / 16;
// 39 row
line = 3 * (((i - 1) / 2) % 8) + (i - 1) / 16;
y0 = 1 - i * yd;
for (j = 0; j < c; j++) {
x0 = -2.5 + j * xd;
k = x = y = 0;
while (x * x + y * y <= 4 && k < MAX) {
xt = x * x - y * y + x0;
y = 2 * x * y + y0;
x = xt;
k++;
}
// 39 row
screen[line][j] |= (colors[(k - 1) / (MAX / sizeof(colors))] << 4 * (i % 2 == 0));
// 40 row
//screen[line][j] |= (colors[(k - 1) / (MAX / sizeof(colors))] << 4 * (i % 2));
}
}
// clear text lines with spaces
for (i = 20; i < 24; i++) {
line = 3 * (i % 8) + i / 8;
for (j = 0; j < 40; j++)
screen[line][j] = ' ' | NORMAL;
}
for (i = 0; i < 4; i++) {
line = 3 * ((i + 20) % 8) + (i + 20) / 8;
for (j = 0; j < 20 - strlen(text[i]) / 2; j++)
screen[line][j] = ' ' | NORMAL; // text rows
for (k = 0; k < strlen(text[i]); k++)
screen[line][j++] = text[i][k] | NORMAL;
}
// dump to stdout
for (i = 0; i < 24; i++) {
for (j = 0; j < 40; j++)
putchar(screen[i][j]);
if (i % 3 == 2)
for (k = 0; k < 8; k++)
putchar(0x0);
}
return 0;
}

View File

@ -2,7 +2,7 @@
#define MASK 0x7F
int main()
int main(int argc, char **argv)
{
int i, j, k, line;
char screen[24][40];

View File

@ -10,14 +10,14 @@ on run argv
tell application "Virtual ]["
activate
-- may need delay for this error: execution error: Virtual ][ got an error: Connection is invalid. (-609)
-- delay 1.5 -- not needed any more?
delay 1.5
-- Close all open machines
close every machine saving no
-- Create a new (AppleIIe)
set theMachine to (make new AppleIIe)
tell theMachine
-- Change to a color screen
-- set monochrome screen to false
set monochrome screen to false
set scanlines to true
set speaker volume to 0.25
insert my_path & my_disk into device "S6D1"

136
test.sh
View File

@ -5,7 +5,7 @@ set -e
PATH=bin:$PATH
BIN=gameserverclient
ADDR=800
SUM=145c0601314e41e76a82c7f3cf1c9a1c
SUM=3226e0aa8f35ee23a9de9b8f05abf688
rm -f ${BIN}.dsk
echo
@ -18,7 +18,7 @@ if [ "$CHECK" = "$SUM" ]
then
echo PASSED
else
echo "FAILED $CHECK != $SUM (expect)"
echo "FAILED $CHECK != $SUM (expected)"
exit 1
fi
@ -41,23 +41,25 @@ then
echo PASSED
fi
rm -f ${BIN}.dsk
echo
echo "Testing Windows c2d..."
echo
PATH=$HOME/wine/bin:$PATH
echo "wine bin/c2d.exe ${BIN},${ADDR} ${BIN}.dsk"
wine bin/c2d.exe ${BIN},${ADDR} ${BIN}.dsk 2>&1 | sed 's/^/ /'
CHECK=$(md5sum ${BIN}.dsk | awk '{print $1}')
if [ "$CHECK" = "$SUM" ]
if ((WIN == 1))
then
echo PASSED
else
echo "FAILED $CHECK != $SUM (expect)"
exit 1
rm -f ${BIN}.dsk
echo
echo "Testing Windows c2d..."
echo
echo "./dwine bin/c2d.exe ${BIN},${ADDR} ${BIN}.dsk"
./dwine bin/c2d.exe ${BIN},${ADDR} ${BIN}.dsk 2>&1 | sed 's/^/ /'
CHECK=$(md5sum ${BIN}.dsk | awk '{print $1}')
if [ "$CHECK" = "$SUM" ]
then
echo PASSED
else
echo "FAILED $CHECK != $SUM (expected)"
exit 1
fi
fi
SUM=d025817b7eaeae01b0803bf0f2e08a1f
SUM=56a52e40a2351ff39669efa3fbdd0f19
rm -f ${BIN}.dsk
echo
@ -72,7 +74,7 @@ if [ "$CHECK" = "$SUM" ]
then
echo PASSED
else
echo "FAILED $CHECK != $SUM (expect)"
echo "FAILED $CHECK != $SUM (expected)"
exit 1
fi
@ -95,28 +97,30 @@ then
echo PASSED
fi
rm -f ${BIN}.dsk
echo
echo "Testing Windows c2d textpage..."
echo
PATH=$HOME/wine/bin:$PATH
echo "wine bin/text2page.exe <${BIN}.text >${BIN}.textpage"
wine bin/text2page.exe <${BIN}.text >${BIN}.textpage
echo "wine bin/c2d.exe -t ${BIN}.textpage ${BIN},${ADDR} ${BIN}.dsk"
wine bin/c2d.exe -t ${BIN}.textpage ${BIN},${ADDR} ${BIN}.dsk 2>&1 | sed 's/^/ /'
CHECK=$(md5sum ${BIN}.dsk | awk '{print $1}')
if [ "$CHECK" = "$SUM" ]
if ((WIN == 1))
then
echo PASSED
else
echo "FAILED $CHECK != $SUM (expect)"
exit 1
rm -f ${BIN}.dsk
echo
echo "Testing Windows c2d textpage..."
echo
echo "./dwine bin/text2page.exe <${BIN}.text >${BIN}.textpage"
./dwine bin/text2page.exe '<'${BIN}.text '>'${BIN}.textpage
echo "./dwine bin/c2d.exe -t ${BIN}.textpage ${BIN},${ADDR} ${BIN}.dsk"
./dwine bin/c2d.exe -t ${BIN}.textpage ${BIN},${ADDR} ${BIN}.dsk 2>&1 | sed 's/^/ /'
CHECK=$(md5sum ${BIN}.dsk | awk '{print $1}')
if [ "$CHECK" = "$SUM" ]
then
echo PASSED
else
echo "FAILED $CHECK != $SUM (expected)"
exit 1
fi
fi
BIN=gameserverclient
MON=gameserverclient.mon
ADDR=800
SUM=145c0601314e41e76a82c7f3cf1c9a1c
SUM=3226e0aa8f35ee23a9de9b8f05abf688
rm -f ${BIN}.dsk
echo
@ -129,27 +133,29 @@ if [ "$CHECK" = "$SUM" ]
then
echo PASSED
else
echo "FAILED $CHECK != $SUM (expect)"
echo "FAILED $CHECK != $SUM (expected)"
exit 1
fi
rm -f ${BIN}.dsk
echo
echo "Testing Windows c2d..."
echo
PATH=$HOME/wine/bin:$PATH
echo "wine bin/c2d.exe ${BIN},${ADDR} ${BIN}.dsk"
wine bin/c2d.exe ${MON} ${BIN}.dsk 2>&1 | sed 's/^/ /'
CHECK=$(md5sum ${BIN}.dsk | awk '{print $1}')
if [ "$CHECK" = "$SUM" ]
if ((WIN == 1))
then
echo PASSED
else
echo "FAILED $CHECK != $SUM (expect)"
exit 1
rm -f ${BIN}.dsk
echo
echo "Testing Windows c2d..."
echo
echo "./dwine bin/c2d.exe ${BIN},${ADDR} ${BIN}.dsk"
./dwine bin/c2d.exe ${MON} ${BIN}.dsk 2>&1 | sed 's/^/ /'
CHECK=$(md5sum ${BIN}.dsk | awk '{print $1}')
if [ "$CHECK" = "$SUM" ]
then
echo PASSED
else
echo "FAILED $CHECK != $SUM (expected)"
exit 1
fi
fi
SUM=d025817b7eaeae01b0803bf0f2e08a1f
SUM=56a52e40a2351ff39669efa3fbdd0f19
rm -f ${BIN}.dsk
echo
@ -164,26 +170,28 @@ if [ "$CHECK" = "$SUM" ]
then
echo PASSED
else
echo "FAILED $CHECK != $SUM (expect)"
echo "FAILED $CHECK != $SUM (expected)"
exit 1
fi
rm -f ${BIN}.dsk
echo
echo "Testing Windows c2d textpage..."
echo
PATH=$HOME/wine/bin:$PATH
echo "wine bin/text2page.exe <${BIN}.text >${BIN}.textpage"
wine bin/text2page.exe <${BIN}.text >${BIN}.textpage
echo "wine bin/c2d.exe -t ${BIN}.textpage ${BIN},${ADDR} ${BIN}.dsk"
wine bin/c2d.exe -t ${BIN}.textpage ${MON} ${BIN}.dsk 2>&1 | sed 's/^/ /'
CHECK=$(md5sum ${BIN}.dsk | awk '{print $1}')
if [ "$CHECK" = "$SUM" ]
if ((WIN == 1))
then
echo PASSED
else
echo "FAILED $CHECK != $SUM (expect)"
exit 1
rm -f ${BIN}.dsk
echo
echo "Testing Windows c2d textpage..."
echo
echo "./dwine bin/text2page.exe <${BIN}.text >${BIN}.textpage"
./dwine bin/text2page.exe '<'${BIN}.text '>'${BIN}.textpage
echo "./dwine bin/c2d.exe -t ${BIN}.textpage ${BIN},${ADDR} ${BIN}.dsk"
./dwine bin/c2d.exe -t ${BIN}.textpage ${MON} ${BIN}.dsk 2>&1 | sed 's/^/ /'
CHECK=$(md5sum ${BIN}.dsk | awk '{print $1}')
if [ "$CHECK" = "$SUM" ]
then
echo PASSED
else
echo "FAILED $CHECK != $SUM (expected)"
exit 1
fi
fi
echo

View File

@ -1,20 +1,9 @@
#include <stdio.h>
unsigned char holes[] = {
0x37, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00,
0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0x00,
0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0x00,
0xff, 0xff, 0x00, 0x17, 0xff, 0xff, 0x00, 0x00,
0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00,
0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00,
0xff, 0xff, 0x00, 0xd0, 0xff, 0xff, 0x00, 0x00,
0xc6, 0xff, 0x00, 0x07, 0xff, 0xff, 0x00, 0x00
};
#define NORMAL 0x80
#define BLINK 0x40
int main()
int main(int argc, char **argv)
{
char c;
int i, j, k, line = 0;
@ -49,7 +38,7 @@ int main()
putchar(screen[i][j]);
if (i % 3 == 2)
for (k = 0; k < 8; k++)
putchar(holes[(i / 3) * 8 + k]);
putchar(0x0);
}
return 0;