Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ohio Scientific port #192

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ neo6502.zip
sorbus.zip
nano6502.img
nano6502_sysonly.img
*.os5
*.os8
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ No, it won't let you run 8080 programs on the 6502!
<a href="doc/neo6502.png"><img src="doc/neo6502.png" style="width:40%" alt="CP/M-65 running on the Olimex neo6502"></a>
<a href="doc/nano6502.png"><img src="doc/nano6502.png" style="width:40%" alt="CP/M-65 running on the nano6502"></a>
<a href="doc/kim-1.png"><img src="doc/kim-1.png" style="width:40%" alt="CP/M-65 running on the KIM-1"></a>
<a href="doc/osi.png"><img src="doc/osi.png" style="width:40%" alt="CP/M-65 running on the Ohio Scientific"></a>
</div>


Expand Down Expand Up @@ -381,6 +382,23 @@ the same time.

- If not, load the `bootiec-kim` or `bootiec-pal` bootloader into 0x200 and execute it.

### Ohio Scientific notes

- Supported systems are:
- 400 series, with Model 440 32x32 video, Model 470 disk controller (5.25" or 8"), and an ASCII keyboard.
- 500 series, with Model 540 64x32 video, Model 505 disk controller (5.25" or 8"), and 542 polled keyboard.
- 600 series, with 64x16 video, on-board disk controller (5.25" or 8"), and polled keyboard.
- serial system, without video, Model 470 or 505 disk controller (8" only), and serial ACIA at $fc00.

- All systems need at least 16kB of RAM, but detect up to 40kB with BASIC present, and 48kB if BASIC is replaced by RAM.
Some boot ROMs do not boot when BASIC is absent. For example, SYN600 relies on BASIC ROM routines to load the boot sector.
- The generated disk images can be used directly with [osiemu](https://github.com/ivop/osiemu), or converted to HFE format with its `osi2hfe` if you want to create real floppies or use it with a Gotek on real hardware.
[Thomas Buescher's WinOSI](http://vintagecomputers.square7.ch/Emulator.html) has a tool to convert HFE to 65D. His version of WinOSI only emulates 600 series machines.
[Mark Spankus' version of WinOSI]( https://osi.marks-lab.com/index.php) can run them all.
- All systems boot with a plain TTY driver. If you have a 540B graphics card with the optional color option enabled, you can load a screen driver called `TTY540B` (located on drive D: on MF systems).
This is the only video configuration that has the posibility to draw a character and a cursor at the same screen location.
On serial systems, you can load `SCRVT100` to enable the screen driver if you are connected with a VT100 terminal.

### Supported programs

Commands include `DUMP`, `STAT`, `COPY`, `SUBMIT`, `ASM`, `QE` and `BEDIT` plus
Expand Down
11 changes: 11 additions & 0 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,17 @@
"atari800xlhd.atr": "src/arch/atari800+atari800xlhd_diskimage",
"c64.d64": "src/arch/commodore+c64_diskimage",
"neo6502.zip": "src/arch/neo6502+diskimage",
"osi400mf.os5": "src/arch/osi+osi400mf_diskimage",
"osi500mf.os5": "src/arch/osi+osi500mf_diskimage",
"osi600mf.os5": "src/arch/osi+osi600mf_diskimage",
"osimf-b.os5": "src/arch/osi+osimf-b_diskimage",
"osimf-c.os5": "src/arch/osi+osimf-c_diskimage",
"osimf-d.os5": "src/arch/osi+osimf-d_diskimage",
"osi400f.os8": "src/arch/osi+osi400f_diskimage",
"osi500f.os8": "src/arch/osi+osi500f_diskimage",
"osi600f.os8": "src/arch/osi+osi600f_diskimage",
"osif-b.os8": "src/arch/osi+osif-b_diskimage",
"osiserf.os8": "src/arch/osi+osiserf_diskimage",
"pet4032.d64": "src/arch/commodore+pet4032_diskimage",
"pet8032.d64": "src/arch/commodore+pet8032_diskimage",
"pet8096.d64": "src/arch/commodore+pet8096_diskimage",
Expand Down
24 changes: 23 additions & 1 deletion diskdefs
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,26 @@ diskdef sdcard
maxdir 1024
boottrk 1
os 2.2
end
end

# 640 sectors = 80kB
diskdef osi5
seclen 128
tracks 40
sectrk 16
blocksize 1024
maxdir 64
boottrk 1
os 2.2
end

# 1848 sectors = 231kB
diskdef osi8
seclen 128
tracks 77
sectrk 24
blocksize 1024
maxdir 64
boottrk 1
os 2.2
end
Binary file added doc/osi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
65 changes: 65 additions & 0 deletions src/arch/osi/ascii.S
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
; Ohio Scientific Instruments ASCII keyboard routines.
; Copyright © 2024 by Ivo van Poorten
; This file is licensed under the terms of the 2-clause BSD license. Please
; see the COPYING file in the root project directory for the full text.

ZEROPAGE

cur_char: .fill 1
wait_cntr: .fill 1
last_char: .fill 1

KEYBD = $df01

; ----------------------------------------------------------------------------

.section .text, "ax"

scan_keyboard:

zloop
lda KEYBD

zif_mi
sta last_char
sta cur_char
ldx #2
stx wait_cntr
rts
zendif

cmp cur_char
zif_ne
sta cur_char
lda #2
sta wait_cntr
zcontinue
zendif

dec wait_cntr
zbreakif_eq

ldy #$10
zloop
ldx #$40
zloop
dex
zuntil_eq
dey
zuntil_eq
zendloop

ldx #$64 ; long delay on first character
cmp last_char
zif_eq
ldx #$0f ; shorter repeat rate
zendif

stx wait_cntr
sta last_char

rts

; ----------------------------------------------------------------------------

; vim: filetype=asm sw=4 ts=4 et
Loading
Loading