6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun May 12, 2024 10:08 pm

All times are UTC




Post new topic Reply to topic  [ 40 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
PostPosted: Sun Oct 16, 2022 2:53 pm 
Offline

Joined: Fri Dec 21, 2018 1:05 am
Posts: 1076
Location: Albuquerque NM USA
(Posted this question on a wrong forum; I meant to ask this question on 6502.org)
My summer gardening activities are done except one, so I have time for the winter electronic projects. Top of my list is porting DOS/65 to CRC65. Since CRC65 bootstrap from CF disk, it seems a good match for version 2 of DOS/65 which is designed to boot from disk. Looking over the various programs and documentations for DOS/65 v2, I couldn't find the source code for PEM and CCM. Are they hidden away somewhere? I've looked for them in GitHub: https://github.com/osiweb/DOS65 and here:
retro.hansotten.nl/6502-sbc/dos-65

I did find PEM and CCM combined with SIM and BIOS in floobydust's GitHub, but that is V3.03; I'm looking for version 2. Thanks,
Bill


Top
 Profile  
Reply with quote  
PostPosted: Sun Oct 16, 2022 4:13 pm 
Offline
User avatar

Joined: Tue Mar 05, 2013 4:31 am
Posts: 1373
Hi Bill,

Attached is a ZIP file of the last Version 2 code I received from Rich. It's pretty complete with utilities and documentation. You will need to do some work to get it running on one of your systems. Lemme know if there's anything I can help with.

Attachment:
DOS65V2.zip [2.06 MiB]
Downloaded 31 times

_________________
Regards, KM
https://github.com/floobydust


Top
 Profile  
Reply with quote  
PostPosted: Sun Oct 16, 2022 4:43 pm 
Offline

Joined: Fri Dec 21, 2018 1:05 am
Posts: 1076
Location: Albuquerque NM USA
floobydust,
Thanks for the quick response.

CCM & PEM were hidden! They are tucked away in SYSGEN. I was looking for dedicated files with CCM or PEM in the title, but NO, they are embedded in SYSGEN! Now I thought about it, this sorta make sense because CCM and PEM sources are needed to do SYSGEN.
Bill


Top
 Profile  
Reply with quote  
PostPosted: Sun Oct 16, 2022 4:46 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8181
Location: Midwestern USA
plasmo wrote:
Looking over the various programs and documentations for DOS/65 v2, I couldn't find the source code for PEM and CCM. Are they hidden away somewhere? I've looked for them in GitHub: https://github.com/osiweb/DOS65 and here:
retro.hansotten.nl/6502-sbc/dos-65

Note that DOS65 posted on Hans’ site is not the same as DOS/65, as posted by flooby.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Sun Oct 16, 2022 5:41 pm 
Offline

Joined: Fri Dec 21, 2018 1:05 am
Posts: 1076
Location: Albuquerque NM USA
Yes, you are right. Floobydust’s is version 3 reformatted for WDC tools and using 65C02 instructions whereas Han’s is version 2. Han’s has documentations I needed to port DOS65 and I want to start with ver2 because it was designed to boot from a disk instead of ROM.
Bill


Top
 Profile  
Reply with quote  
PostPosted: Sun Oct 16, 2022 5:51 pm 
Offline
User avatar

Joined: Tue Mar 05, 2013 4:31 am
Posts: 1373
As BDD noted, there is another 6502 OS called DOS65, which is not what Rich Leary wrote. I don't recall there ever seeing source code for DOS65, while Rich has made his available all along.

Also, Rich Leary himself migrated to WDC Tools for the V3 ROM version, as he was porting it for the WDC W65C02SXB and also Daryl Rictor's SBC2.5.

In any case, you'll need to write your own BIOS for your hardware and provide your own boot code to initially load something from the drive. If you look at my 3.04 code (Github), the modules are separate files (CCM, PEM, SIM) and uses a Main file that links them in via include. The CCM and PEM versions (3.04) are somewhat smaller and use CMOS instructions/addressing modes, run a bit quicker and also fixed one bug that I found early on with trying to select a drive letter that doesn't exist. Also note that the SIM module has some updated code that works well with CF Cards and the 512-byte block size and doesn't carry the rest of the older (diskette) code with it.

_________________
Regards, KM
https://github.com/floobydust


Top
 Profile  
Reply with quote  
PostPosted: Sun Oct 16, 2022 5:58 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8181
Location: Midwestern USA
plasmo wrote:
Yes, you are right. Floobydust’s is version 3 reformatted for WDC tools and using 65C02 instructions whereas Han’s is version 2. Han’s has documentations I needed to port DOS65 and I want to start with ver2 because it was designed to boot from a disk instead of ROM.

The BIOS should efface any hardware matters for you—that’s its purpose. The BDOS doesn’t need to know anything about hardware primitives, which should make your implementation functional regardless of the type of mass storage being employed.

I see no reason why not to use flooby's enhanced port, unless you are running on an NMOS 6502. As flooby notes, write your BIOS to work with whatever mass storage you have.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Sun Oct 16, 2022 6:19 pm 
Offline
User avatar

Joined: Tue Mar 05, 2013 4:31 am
Posts: 1373
Some other things to consider:

- Version 3 implemented USER, so you can you can change between 16 users, which are shown as part of the drive spec "A:0", "A:1", etc.
- Version 3 implements SUBMIT for batch processing, which doesn't exist in V2.
- Version 3 CCM does use more variable storage (224 bytes), about 34 bytes more than Version 2, which isn't bad for the additional function.
- Version 3 PEM variable storage remains the same at 74 bytes.

_________________
Regards, KM
https://github.com/floobydust


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 18, 2022 4:10 pm 
Offline

Joined: Fri Dec 21, 2018 1:05 am
Posts: 1076
Location: Albuquerque NM USA
The motivation for starting from rev2 is based on my initial readings of the documents which seem to indicate ver2 is a better match for my specific hardware, CRC65. Taking baby steps is how I plan to approach this. I will certainly migrate to version 3 once porting of version 2 is successful.

A quick update:
CC65 assembler is quite similar to the version 2 assembly so it was fairly easy to port ver 2 SYSGEN code to CC65 environment. I preserved the CCM and PEM section of codes as they were and added my own SIM to create a complete DOS/65 image in one file. CRC65 has no ROM (other than 64-byte bootstrap in CPLD), so SIM combined hardware-specific BIOS in its code. SIM is quite large right now, about 2300 bytes which includes 1K of allocation maps for four 8-meg disks; compact flash data buffer also eats up 512 bytes, so most of the SIM memory is consumed by data buffers.

DOS/65 ver 2 implementation is very similar to Z80 version of CP/M so that was quite helpful. I structured DOS/65's disk format same as my Z80 CP/M so I can use CF disk formatted for CP/M on DOS/65. This helped me with reading the directory, type out file contents, load, save, erase, and rename files. The 'go' command is very cool; it lets me jump to CRC65 monitor and load/examine/modify memories as needed.

Right now I have the basic DOS/65 functions working. CF write is immediate which is easier to implement than delayed write. Warm boot is only partially implemented. I'm manually loading and running DOS/65 binary but should be able to autoboot with a DOS/65 loader installed in CF's master boot record. I'm in the process of figuring out how to port various DOS/65 application software starting with XMODEM, so I can transfer software to the CF disk and use DOS/65 native assembler to create executable software. Hardware is running at 14.7MHz, but I expect it to run at 29.5MHz.
Bill


Attachments:
DOS65_on_CRC65.jpg
DOS65_on_CRC65.jpg [ 186.22 KiB | Viewed 658 times ]
Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 18, 2022 7:06 pm 
Offline

Joined: Wed Nov 11, 2020 10:42 pm
Posts: 96
Location: Kelowna Canada
Hi Bill
That's great work so far and so fast. It was on my "ToDo" list but I was really slow to get going on it. Looking forward to this addition to my CRC65!
Larry


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 18, 2022 11:25 pm 
Offline

Joined: Fri Dec 21, 2018 1:05 am
Posts: 1076
Location: Albuquerque NM USA
Larry,
For your reference the attached is source code of DOS/65 for CRC65. CCM and PEM sections are extracted from Richard Leary's SYSGN219.ASM. The SIM section is specific to CRC65. You can load DOS65V2.hex into CRC65 and go $dc00 which is starting address of SIM. Currently there are four 8-meg drives but there are room for 2 more 8-meg drives.
ToDo:
* Warm boot is incomplete, I need to figure out where on CF to store DOS/65 so it can be copied back during warm boot.
* CF blocking/deblocking are my own invention, I probably should consult the example code in Appendix E of DOS/65 document for a better implementation.
* CF write is immediate which is less efficient but simple to do; pending write should be more efficient
* TEA is $200 but should move up to $400 because IRQ and NMI vectors are from $200-$3FF. However, interrupts are not used to implement DOS/65 for CRC65
* Need to work on autoboot by installing DOS/65 loader in the master boot record.
* Migrating to version 3 once I figured out what I'm doing.
Bill


Attachments:
DOS65V2CRC65_r00.zip [67.27 KiB]
Downloaded 29 times
Top
 Profile  
Reply with quote  
PostPosted: Wed Oct 19, 2022 2:34 am 
Offline

Joined: Wed Nov 11, 2020 10:42 pm
Posts: 96
Location: Kelowna Canada
Thanks Bill
I'll have a look and cudgel my brain to see what I remember. I still have the floppy discs for Dos/65 on my SYM-1 but the disc controller is not cooperating. I'll have to see what I still have left.
Larry


Top
 Profile  
Reply with quote  
PostPosted: Sat Oct 22, 2022 12:59 pm 
Offline

Joined: Sun Feb 22, 2004 9:01 pm
Posts: 78
oscarv wrote:
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.

ANSI/VT extended key sequences are a bit of a convoluted mess - made all the much harder to find when almost all searches for "ANSI character codes" points to lists of *output* sequences - but they are regular enough to make a generalised parser. The main stumbling block is that your key-input routine needs to be able to return "nothing pressed", such as something like kbdkit() or a CONSTAT call, as there are sequences that are terminated by the *absence* of any further characters. The caused me lots of grief with Bell PDP11 Unix as the only API call available is "wait for character".

From research and testing I've compiled the following. The confusion over what to call them extends to the ambiguity of what I've called them
https://mdfs.net/Docs/Comp/Comms/ANSIKeys - description of key sequences
https://mdfs.net/Docs/Comp/Comms/VTKeys - summary table of key sequences

My Console library implements a keypress parser, and returns regular key sequences of 0x180+nn for function keys and 0x1C0+xx for editing keys:
https://mdfs.net/System/C/

The Console library is used in my cZ80Tube emulator.
I wrote the similar keypress parser for Brandy Basic and PDP11 BASIC.

_________________
--
JGH - http://mdfs.net


Top
 Profile  
Reply with quote  
PostPosted: Sun Oct 23, 2022 3:41 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8181
Location: Midwestern USA
jgharston wrote:
oscarv wrote:
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.

ANSI/VT extended key sequences are a bit of a convoluted mess

Just for clarification, ECMA-48, the ancestor of the ANSI standard, was a mish-mash of the DEC VT-52’s sequences and the older European ECM-6 standard that was developed in the 1960s. The VT-52 itself first appeared in early 1975. ECMA-48 was published in 1976, but widespread adoption didn't occur until the VT-100 entered the market until 1978. The ECMA-48 standard was adopted by DEC for the VT-100, and DEC further enhanced it for some subsequent terminals by adding private mode (proprietary) sequences. ANSI’s first standard was X3.64, which was itself a mish-mash of ECMA-48 and VT-100.

The final version of what we call the ANSI terminal standard is a classic designed-by-committee mess. In a wise move, WYSE Technology didn't get heavily involved with the standard process and instead, developed what turned out to be a much more flexible control set that consumed less communication bandwidth and simplified writing a terminal driver. Their WYSE 60 terminal was the best-selling terminal of all time and was quite a departure from other popular terminals of the day. During my days of working with UNIX systems that used terminals, I estimate I installed at least 2500 WY60s. Some of my clients were still using them as late as 2012, when I finally convinced them to switch to thin clients.

Most WYSE terminals also supported the VT-52 and VT-100 personalities. WYSE even made a special ANSI-layout keyboard that emitted the VT-100 sequences from the non-QWERTY keys. The combination of a WY-60 and ANSI keyboard was often used in place of the VT-100, much to the chagrin of DEC. The WY-60 operating in VT-100 personality did everything the real VT-100 could do, plus had a higher display resolution.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Last edited by BigDumbDinosaur on Fri Oct 28, 2022 4:28 am, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: Fri Oct 28, 2022 1:15 am 
Offline

Joined: Fri Dec 21, 2018 1:05 am
Posts: 1076
Location: Albuquerque NM USA
I'm reasonably happy with the porting of DOS/65 ver 2 to my CRC65 hardware so now I'm thinking about porting version 3. I ran across this note on Richard Leary's "DOS/65 V3 Supplement" document:

Quote:
The DOS/65 V3 ROM software and all other DOS/65 software are free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the license, or any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.


So DOS/65 is copy righted to Richard Leary, but for V3 and later, he has given permission to everyone for modification and redistribution. Did I read that correctly?
Bill


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 40 posts ]  Go to page Previous  1, 2, 3  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: