I think I'm getting there with figuring how to access the hardware from BASIC.

Select bank 0 block 0
OUT129,0

"129" selects bank 0, "0" selects block 0 from within that bank

read a byte, which will be byte #0 of this block
INP(131)

Read and print the ascii of all the bytes in bank0 block1
This will be the first block of actual file data (probably also with some kind of linked-list pointer bytes at the head of each) of the first file saved to the device, where block 0 only has the file table. Actually I see the file name is in block 1 not block 0, so, it's not as simple as that. But I DO see my file name immediately followed by the text I wrote in it.

10 OUT 129,1
20 FOR I=0 TO 1023
30 PRINT CHR$(INP(131));
40 NEXT

Do the same but in bank 1
change line 10 to:
10 OUT 133,1

That's not  so bad!

So a bootstrap program will just be a matter of figuring out the exact start & stop addresses. IE read and throw away some number of bytes, to skip over some header junk, then read more bytes and keep them, go to the next block and do the same, stop reading when you have the right number of bytes (which maybe we actually parse from the 6-byte .CO header since that should be simple enough even for a manually typed in bootstrapper.

In one of the archived discussions Paul Globman says the original bootstrap program was only 8 lines of basic, and that it was required that RAMDSK.CO be the first file saved after a battery-pull, so it probably wasn't actually parsing much but just starting at a hardcoded expected offset, and maybe actually reading the file length since a .CO contains it right there easy to read.

--
bkw




On 12/13/23 01:49, Brian K. White wrote:

MiniNDP now supports 512k and the Bank button in RAM100.CO / RAM200.CO is functional.

https://github.com/bkw777/NODE_DATAPAC#minindp

Now to figure out how to operate it from BASIC to reimpliment the lost BOOT program that apparently could read a copy of RAMDSK.CO from the device without having RAMDSK or the original option rom already installed.

How does one cause the /YO, (A), A8, A9, A10 pins to do what you want?

I think I need to do these:

Select bank 0 block 0:
(A) /YO: H L
A15-A0 : xxxxx00100000000
AD7-AD0: 00000000

Select bank 1 block 75:
(A) /YO: H L
A15-A0 : xxxxx10100000000
AD7-AD0: 01001011

Read a byte:
(A) /YO: H L
A15-A0 : xxxxx01100000000
AD7-AD0: xxxxxxxx

Write a byte, value 133:
(A) /YO: H L
A15-A0 : xxxxx01100000000
AD7-AD0: 10000101

One of the archived docs says that for BOOT to work it was important that the copy of RAMDSK.CO was the first file written to a freshly blanked device. So the bootstrap program probably just did a simple loop of reads starting at a hardcoded starting offset, no fancy file table parsing or anything. Whatever it was, it was as short as possible to type in manually.


--
bkw

Reply via email to