First commit.

This commit is contained in:
giomba 2023-03-04 23:09:40 +01:00
commit f20b4d1be7
5 changed files with 100 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
build/

28
Makefile Normal file
View File

@ -0,0 +1,28 @@
.POSIX:
ECHO := @echo
QUIET := @
OUTDIR := build
SERIALPORT := /dev/ttyUSB0
$(OUTDIR)/main.bin: main.asm
$(ECHO) ' ASM'
$(QUIET) mkdir -p $(OUTDIR)
$(QUIET) zcc +z80 -subtype=none -o $(OUTDIR)/main.bin main.asm
.PHONY: send
send: $(OUTDIR)/main.bin.pkt
$(ECHO) ' SEND'
$(QUIET) stty -F $(SERIALPORT) 9600 -crtscts
$(QUIET) cat "$<" > $(SERIALPORT)
$(OUTDIR)/%.bin.pkt: $(OUTDIR)/%.bin
$(ECHO) ' PKT'
$(QUIET) python3 makepacket.py "$<"
.PHONY: clean
clean:
$(ECHO) ' RM'
$(QUIET) rm -rf $(OUTDIR)

18
README.md Normal file
View File

@ -0,0 +1,18 @@
# CEDA Utils
You've your Sanco retrocomputer, but you have no peripherals and no disks, so you have no idea how to interact with it.
Here you can find some utilities to jump start your computer from scratch!
## Bill of materials
- RS232 DB-25 cable
- depending on your supplies, if you are working in the 3rd millenium, maybe you also need some adapters (eg. USB/RS-232), "ancient" cables (eg. old fashioned DB-9/DB-25 serial cable), and maybe a DB gender changer (no pun intended)
- EEPROM programmer for 28C32 (or larger)
- you can even build one with an Arduino
- 28C32 blank EEPROM
- common hardware tools (eg. screwdrivers)
:warning: Mess with electronics only if you know what you are doing. Beware: you may harm your computer, or even yourself! Everything you do is at your own risk.
## How to
- to be written

38
main.asm Normal file
View File

@ -0,0 +1,38 @@
org 0x1000
prhex = $c174
putchar = $c45e
PUBLIC _main
_main:
ld hl,$0000
main_loop:
ld a,$0e
out ($a0),a
ld a,h
out ($a1),a
ld a,$0f
out ($a0),a
ld a,l
out ($a1),a
call delay
inc hl
jp main_loop
jp ASMPC
delay:
push de
ld de,$0000
delay_loop:
dec de
ld a,d
or e
jr nz,delay_loop
pop de
ret

14
makepacket.py Normal file
View File

@ -0,0 +1,14 @@
#!/usr/bin/python3
import sys
import struct
filename = sys.argv[1]
ofile = open(filename + ".pkt", 'wb')
ifile = open(filename, 'rb')
content = ifile.read()
ofile.write(struct.pack("<HH", 0x1000, len(content)))
ofile.write(content)