DOS/65 ROM version 3.02 up and running!

Programming the 6502 microprocessor and its relatives in assembly and other languages.
User avatar
floobydust
Posts: 1394
Joined: 05 Mar 2013

DOS/65 ROM version 3.02 up and running!

Post by floobydust »

I decided to start a new post for this. In short, I've been swapping some emails with Richard Leary (DOS/65 author) since end of last year. As I recently finished the BIOS for a RTC/CF-Card adapter (which plugs into my C02 Pocket SBC), I connected again with Richard about a week ago. He sent me his current ROM version of DOS/65, which can be assembled and linked with WDC Tools. The version he has been working on recently, supports a SD Card (based on Andre' Fachat's design) and connected via a 6522 to either WDC's W65C02SXB or Daryl's SBC2.

I needed to write an interface layer as a bridge to my BIOS and Monitor, so I had done that earlier this year. I quickly ported the core routines over to the included Monitor source file and replaced the routines for the console and disk access (from SD to CF) and had DOS/65 working in less than 2 hours. I've since rewritten the interface layer and made a few changes to Richard's default configuration. I've also modified the SIM code a small amount. I've reduced the ROM image by over 3KB and was able to free up enough RAM usage to add two more drives, for a total of 6 (drives A - F, all 8MB in size). The top 4KB of RAM ($7000 - $7FFF) is used for pointers and variables for the ROM based CCM, PEM and SIM modules. The allocation maps for each drive and the host buffer are also located in this range. Each allocation map plus the host buffer is 512 bytes, so the entire 4KB is used. With the TEA configured at $0800, the leaves 26KB of free memory. ROM usage is 8KB allocated for my BIOS, Monitor and I/O page. The full DOS/65 ROM code plus the RAM image is 7KB. This leaves 17KB of free ROM space.

So far, I've got this running on 3- C02 Pocket SBC systems (base SBC and the RTC/CF-Card adapter). I'll continue to do some additional testing, but have already assembled, linked and downloaded the core utilities, which include: SD (super directory), SUBMIT, XMODEM and UCOPY. So far, everything is working very well. Here's a couple screen-shots... granted, nothing that hasn't been seen before, as it's basically CP/M on the 6502 :D
Screen Shot 2021-03-12 at 9.09.45 PM.png
Screen Shot 2021-03-12 at 9.11.37 PM.png
plasmo
Posts: 1273
Joined: 21 Dec 2018
Location: Albuquerque NM USA

Re: DOS/65 ROM version 3.02 up and running!

Post by plasmo »

That's very cool. My SBC requires a CF disk for bootstrap, so I'm obviously interested in DOS/65. Will DOS/65 be released to general public?
Bill
User avatar
floobydust
Posts: 1394
Joined: 05 Mar 2013

Re: DOS/65 ROM version 3.02 up and running!

Post by floobydust »

Hi Bill,

There's an older release on the web, but Richard has newer versions running which are bootable from media as well... diskette, IDE (CF) and perhaps some older gear. He does give his code to anyone for personal use, complete with source (GPL license). I might have the non-ROM version as well. I'll email you with some additional info.

I'm pretty happy with the code... I re-wrote my Monitor interface Layer, so it's about 440 bytes. On a larger RAM system, I think you could easily have ~52KB available, depending on how many drives attached and your hardware routines that interface to SIM. This does use CP/M formatted drives... so as long as you can access them, DOS/65 will read/write them. Of course, it won't execute those binaries.
greghol
Posts: 29
Joined: 04 Oct 2019
Location: Rancho Cordova, CA

Re: DOS/65 ROM version 3.02 up and running!

Post by greghol »

Floobydust,

I'd would be interested in the last code if it is available too. I have a RC2014 based WD 65C02/65C22/6551 with CF setup.

Greg
okwatts
Posts: 110
Joined: 11 Nov 2020
Location: Kelowna Canada

Re: DOS/65 ROM version 3.02 up and running!

Post by okwatts »

I'm really happy to see this work and to hear that Richard has been doing some more work on his DOS/65. I used this on both KIM and SYM in the 1980's using floppies. I have yet to attempt to get it running on any of the newer media with the various SBC's and emulations available now. This has more to do with the rust in my brain regarding programming. I have the original floppies for my version on the KIM-1 as well as printouts of the SIM I used for that. Unfortunately my floppy controller for the SYM is not functioning correctly so I have not been able to copy any of the code over. I have the more downloadable version available in the Z80/CPM forum. I would also be interested in contacting Richard for any updates if you have contact info and will follow any further developments with interest.
User avatar
BigDumbDinosaur
Posts: 9426
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: DOS/65 ROM version 3.02 up and running!

Post by BigDumbDinosaur »

I wonder how much of a task it would be to port that to a 65C816 with extended RAM and a SCSI subsystem.
Last edited by BigDumbDinosaur on Tue Mar 16, 2021 11:53 pm, edited 1 time in total.
x86?  We ain't got no x86.  We don't NEED no stinking x86!
User avatar
floobydust
Posts: 1394
Joined: 05 Mar 2013

Re: DOS/65 ROM version 3.02 up and running!

Post by floobydust »

All,

I've sent Rich email on the additional requests. I've also offered to put his base code on my Github page, but as he is the author of all of this, I prefer to let him make that decision. Some time ago, this was discussed on the forum, but apparently the only thing that happened was a link in the Code section to the older version of code.

Once I have a chance to finish the updates to my config, I'll be putting that on my Github page. I'm almost done... I've changed the default ROM location from $A000 to $C000 and am cleaning up my edits, as I've made some minor changes to the SIM module and of course, wrote an interface layer to my BIOS and Monitor. The latter, being included in the main assembly as a "Monitor". I'll likely change the naming of that.

BDD, re: porting to the '816 w/SCSI.

The core code is written in pure 6502, i.e., no CMOS instructions or addressing modes. Of course, it's just 8-bit code. The SIM module does have a minor bit of CMOS code and the supplied Monitor code also has a small bit of CMOS code, but both should run on the '816, as there's no Rockwell extensions used.

I think it would be a bit of a challenge to re-write the code for the '816, but you might think otherwise after scanning through the source code. Another option might be to grab the CP/M 1.3 source for the 68K. This does use a fair amount of C Code, but there are specific routines in 68K assembly which might be easier to re-write for the '816.
oscarv
Posts: 21
Joined: 25 Jun 2014

Re: DOS/65 ROM version 3.02 up and running!

Post by oscarv »

Very nice! I just ported DOS/65 to my 6502 project as well. Or rather, my fake 6502-emulated-on-esp32 project.

There is one piece of DOS/65 software that I did not see listed in your screenshots, but it is worthwhile.

Dan Werner wrote a VT-100/ANSI full-screen editor for DOS/65 some years ago. I can't find any reference to it online, but it was in the software package for the open-source N8VEM 6502 board set so I took the liberty of attaching it to this post.

It seems to work well, although I have not yet figured out how the ANSI function keys work. Part of my project for next week, when I should finish my project's VT-100 driver code. Apparently, ANSI function keys != VT-100 function keys.

Kind regards,

Oscar.
Attachments
sedit (original).ASM
(43.19 KiB) Downloaded 217 times
User avatar
BigDumbDinosaur
Posts: 9426
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: DOS/65 ROM version 3.02 up and running!

Post by BigDumbDinosaur »

oscarv wrote:
Dan Werner wrote a VT-100/ANSI full-screen editor for DOS/65 some years ago. I can't find any reference to it online, but it was in the software package for the open-source N8VEM 6502 board set so I took the liberty of attaching it to this post.

Apparently written for the NMOS 6502. A casual scan of the source code reveals areas where use of the improved 65C02 instruction set would be beneficial.

Quote:
It seems to work well, although I have not yet figured out how the ANSI function keys work. Part of my project for next week, when I should finish my project's VT-100 driver code. Apparently, ANSI function keys != VT-100 function keys.

It's a common fallacy that VT100 and ANSI personalities are the same. ANSI was actually a derivative of the VT52 personality, not VT100—VT100 added some "private mode" features that weren't part of the VT52 personality.

The convoluted, "designed by a committee" nature of the ANSI personality is said to have been a factor that led to the design of the widely-emulated WYSE 60 command set, which is substantially more powerful than ANSI or VT100.

Attached is the editor's source code modified to assemble in the current version of the Kowalski assembler/simulator.

ansi_editor.asm
ANSI Editor, assembles in the Kowalski Assembler
(42.89 KiB) Downloaded 122 times
x86?  We ain't got no x86.  We don't NEED no stinking x86!
oscarv
Posts: 21
Joined: 25 Jun 2014

Re: DOS/65 ROM version 3.02 up and running!

Post by oscarv »

BigDumbDinosaur wrote:
Apparently written for the NMOS 6502. A casual scan of the source code reveals areas where use of the improved 65C02 instruction set would be beneficial.
Indeed - the "6x0x" PCB set that Dan wrote this for was designed to take any type of 6502, 6800 or 6809. Nice board, but it did not have many users.
Quote:
Attached is the editor's source code modified to assemble in the current version of the Kowalski assembler/simulator.
Thank you! It is a very useful piece of software, in that I could not find any other 'generic 6502' full-screen editor (generic as in, only requires serial port I/O rather than one specific machine's display circuitry). Making it independent of DOS/65 is not hard, although you'd have to use some save/load mechanism obviously. But it could have many SBC purposes.

Kind regards,

Oscar.
oscarv
Posts: 21
Joined: 25 Jun 2014

Re: DOS/65 ROM version 3.02 up and running!

Post by oscarv »

floobydust wrote:
Icore utilities, which include: SD (super directory), SUBMIT, XMODEM and UCOPY.
May I ask where I can find those? They were not in the DOS/65 versions that I found, but would be very useful.

Kind regards,

Oscar.
User avatar
floobydust
Posts: 1394
Joined: 05 Mar 2013

Re: DOS/65 ROM version 3.02 up and running!

Post by floobydust »

Oscar, Glad to hear that you also have DOS/65 working on a system. Note that the current ROM version (3.02) that Richard sent uses WDC Tools to assemble and link with output being Intel Hex format. I've made some changes for my C02 Pocket SBC and have put together a ZIP file that has everything in it to create my current BIOS/Monitor and the complete ROM image of DOS/65. Also included are slightly modified versions of SD, UCOPY, SUB and XMODEM (also assembles/links with WDC Tools to Srecord files).

ROM usage:
$8000 - $BFFF - Free space
$C000 - $D9FF - DOS/65 CCM, PEM, SIM, HW layer
$DA00 - $DBFF - RAM image for CCM, PEM, SIM copied to $7000
$DC00 - $DFFF - Free space
$E000 - $F7FF - C02 Monitor (a bit less than 1KB available
$F800 - $FFFF - C02 BIOS (some space still available) *
* $FE00 - $FE9F - Hardware I/O space (5- 32-byte I/O selects)

RAM Usage:
$0000 - $07FF - allocated for Page 0, Stack, Console I/O buffer, Soft Vectors, Soft config data, buffers, work areas, host buffer for DOS/65, etc.
$0800 - $6FFF - TEA are for DOS/65

BDD, Oscar, I'm going to look at the editor source files... seems like a nice addition to have, so thanks to both of you.
DOS65_C02Pocket.zip
(146.53 KiB) Downloaded 119 times
Note that the .BAT was renamed to .TXT. This was done as Richard discovered that Gmail wouldn't send a ZIP file that contained a Batch file as part of the archive... gotta love Gmail (or not).

Hoping other can find this useful as well. Note that the C02 Pocket SBC and the RTC/CF-Card adapter are fully documented with all schematics, PCBs and full source code for the hardware PLDs, BIOS, Monitor, etc. on my GitHub page. With the information there and here, the entire project can be recreated by anyone.
User avatar
BigDumbDinosaur
Posts: 9426
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: DOS/65 ROM version 3.02 up and running!

Post by BigDumbDinosaur »

floobydust wrote:
BDD, Oscar, I'm going to look at the editor source files... seems like a nice addition to have, so thanks to both of you.

Commenting in the editor source is kind of thin—there are many lines of successive code with few or no comments. Also, a lot of magic numbers exist, which makes it somewhat difficult to understand some things. I haven't pored through it in-depth, but it appears functions that do I/O could likely be reworked so the editor could be made to run on a system other than DOS/65.
x86?  We ain't got no x86.  We don't NEED no stinking x86!
oscarv
Posts: 21
Joined: 25 Jun 2014

Re: DOS/65 ROM version 3.02 up and running!

Post by oscarv »

floobydust wrote:
DOS65_C02Pocket.zip
Thank you! Yes, it's worthwhile to build up a larger software/application collection for DOS/65. I use the RAM version of it, as I mix DOS/65 with the KIM and Apple-1 ROMs and DOS/65 should not always be in the memory map. But it is a very effective DOS. And it opens up the idea of having a 'ready to run' software collection for new homebrew 6502 boards. Like CP/M makes a homebrew Z80 instantly software-rich...

Kind regards,

Oscar.
User avatar
floobydust
Posts: 1394
Joined: 05 Mar 2013

Re: DOS/65 ROM version 3.02 up and running!

Post by floobydust »

Just FYI... new version 3.03 has been released: viewtopic.php?f=2&t=6557
Post Reply