PRI out_hdskport_null
'Handle writes to the hdskport when no command is in progress
'io_data should be a new command byte.
case io_data
hdskRead:
UART.str(string("hdsk read"))
crlf
and
PRI hdsk_get_rw_params
printhex(io_data)
crlf
case hdsk_command_pos
I get this much when typing I:, before it hangs
hdsk read
00
00
06
00
39
F7
added in another little tracker:
PRI hdsk_get_rw_params
printhex(io_data)
crlf
printhex(hdsk_command_pos)
crlf
case hdsk_command_pos
yes, hdsk_command_pos increments each time as expected.
hdsk read
00
01
00
02
06
03
00
04
39
05
F7
06
Post Edited (Dr_Acula) : 8/19/2009 11:36:43 AM GMT
Heater: My i.dsk looks very different to yours??? Do I need anything in the cpm bios??? IIRC, my floppies are straight from the SIMH website.
James: Can you try this (in PRI in_hdskport_read | r)
Geometry? It is part of the custom bios you insert into the cp/m code. Eg sector size, number of sectors. But, this is my theory, no mattery what is inside the simh parameters, if you have a huge file filled with E5, it should come back with the drive name, and if you do a DIR it should come back with no file. For instance, I have no idea what the drive geometry is of a floppy drive either. But I created a 32mb file filled with E5, called it DRIVE__B.DSK and this is what happens:
A>B:
B>DIR
No file
B>
So, the same thing should work for drive I.
I added this bit of test code:
PRI in_hdskport_read | r
'Handle read from hdskport during a disk read command
'This read triggers the actual disk sector transfere
'and must return an error code.
'N.B. sectors are mapped to blocks 1 to 1
UART.str(string("hdskport_read"))
crlf
if hdsk_check_dts 'Check drive, track and sector are sane
io_data := $FF 'Return error if not
return
#ifdef TriBladeProp
'----------------------------------------------------------------------------------------------
r := tbp2.idle 'give up the bus
CheckError(r)
r := sd.initSDcard(spiDO,spiClk,spiDI,spiCS) 'init the SD
CheckError(r)
' this method relies on the SD file using contiguous sectors !!! Only the first 128 bytes of 512 bytes used
'RR20090818 sd_block := (drive_base[noparse][[/noparse]hdsk_drive+16]) + (hdsk_track * 32) + hdsk_sector
'bug? only 8 floppies, the 4 hdisks
uart.str(string("Read a sector"))
crlf
sd_block := (drive_base[noparse][[/noparse]hdsk_drive+8]) + (hdsk_track * 32) + hdsk_sector
err := sd.readSDCard(sd_block, @disk_buff, 128) 'read a sector
' CheckError(err)
r := sd.stopSDcard 'stop the SD (free up pins, but keep cog running)
CheckError(r)
r := tbp2.active 'activate the bus
CheckError(r)
James: suggest you try this - I can see when I read that I lock the sram out.
PRI in_hdskport_read | r
'Handle read from hdskport during a disk read command
'This read triggers the actual disk sector transfer
'and must return an error code.
'N.B. sectors are mapped to blocks 1 to 1
' UART.str(string("hdisk read "))
if hdsk_check_dts 'Check drive, track and sector are sane
io_data := $FF 'Return error if not
return
#ifdef TriBladeProp
'----------------------------------------------------------------------------------------------
r := tbp2.idle 'give up the bus
CheckError(r)
r := sd.initSDcard(spiDO,spiClk,spiDI,spiCS) 'init the SD
CheckError(r)
' this method relies on the SD file using contiguous sectors !!! Only the first 128 bytes of 512 bytes used
'RR20090818 sd_block := (drive_base[noparse][[/noparse]hdsk_drive+16]) + (hdsk_track * 32) + hdsk_sector
'bug? only 8 floppies, then 4 hdisks
sd_block := (drive_base[noparse][[/noparse]hdsk_drive+8]) + (hdsk_track * 32) + hdsk_sector
err := sd.readSDCard(sd_block, @disk_buff, 128) 'read a sector
' CheckError(err)
r := sd.stopSDcard 'stop the SD (free up pins, but keep cog running)
CheckError(r)
r := tbp2.active 'activate the bus
CheckError(r)
'----------------------------------------------------------------------------------------------
#else
sd_block := hdsk_base_block 'Start at first block of first HD
sd_block := sd_block + hdsk_drive * (32 * 2048) 'Skip on to the first block of the selected drive
sd_block := sd_block + (hdsk_track * 32) + hdsk_sector 'Find correct block for the selected track/sector
err := \disk.readblock(sd_block, @disk_buff ) 'Read the block !
#endif
if err
UART.str(string("Error hdisk read "))
DisplayError(err)
DisplayHDiskDTS
io_data := $FF 'Return error code
else
#ifdef TriBladeProp
'' r := tbp2.active 'activate the bus
'' CheckError(r)
'write the block out to sram
r := tbp2.DoCmd("W", @disk_buff, hdsk_dma, 128) 'write to sram
check_error(r)
'' r := tbp2.idle 'give up the bus
'' CheckError(r)
#else
BYTEMOVE (@ram_z80 + hdsk_dma, @disk_buff, 128) 'Virtual "DMA" the sector into DMA buffer address in Z80 RAM
#endif
io_data := $00 'Return OK.
hdsk_last_command := hdskNull 'Command completed
PRI in_hdskport_write | r
'Handle read from hdskport during a disk write command
'This read triggers the actual disk sector transfere
'and must return an error code.
'N.B. sectors are mapped to blocks 1 to 1
if hdsk_check_dts 'Check drive, track and sector are sane
io_data := $FF 'Return error if not
return
#ifdef TriBladeProp
'???
' err := $55 '<== force a write error as no code yet
'----------------------------------------------------------------------------------------------
'<==================need to fix this - it copied the data from sram to hub for writing to SD
'??? BYTEMOVE (@disk_buff, @ram_z80 + hdsk_dma, 128) 'Virtual "DMA" the sector from DMA buffer address in Z80 RAM
'write the block out to sram
r := tbp2.DoCmd("R", @disk_buff, hdsk_dma, 128) 'read from sram (Virtual "DMA" the sector from DMA buffer)
check_error(r)
r := tbp2.idle 'give up the bus
CheckError(r)
r := sd.initSDcard(spiDO,spiClk,spiDI,spiCS) 'init the SD
CheckError(r)
' this method relies on the SD file using contiguous sectors !!! Only the first 128 bytes of 512 bytes used
sd_block := (drive_base[noparse][[/noparse]hdsk_drive+8]) + (hdsk_track * 32) + hdsk_sector
err := sd.writeSDCard(sd_block, @disk_buff, 128) 'write a sector
' CheckError(err)
r := sd.stopSDcard 'stop the SD (free up pins, but keep cog running)
CheckError(r)
r := tbp2.active 'activate the bus
CheckError(r)
'----------------------------------------------------------------------------------------------
#else
sd_block := hdsk_base_block 'Start at first block of first HD
sd_block := sd_block + hdsk_drive * (32 * 2048) 'Skip on to the first block of the selected drive
sd_block := sd_block + (hdsk_track * 32) + hdsk_sector 'Find correct block for the selected track/sector
BYTEMOVE (@disk_buff, @ram_z80 + hdsk_dma, 128) 'Virtual "DMA" the sector from DMA buffer address in Z80 RAM
err := \disk.writeblock(sd_block, @disk_buff) 'Write the block!
#endif
if err
UART.str(string("Error hdisk write "))
DisplayError(err)
DisplayHDiskDTS
io_data := $FF 'Return error code
else
io_data := $00 'Return OK.
hdsk_last_command := hdskNull 'Command completed
postedit: added "| r" to PRI in_hdskport_write | r
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ Links to other interesting threads:
Need a new debugging routine. Put it near the end:
PUB PrintDec(value) | i
'' Print a decimal number
if value < 0
-value
uart.str(string("-"))
i := 1_000_000_000
repeat 10
if value => i
uart.tx(value / i + "0")
value //= i
result~~
elseif result or i == 1
uart.str(string("0"))
i /= 10
And now we should be able to get the sd block number:
Ok, so it is these 4 lines that have been commented out
' r := tbp2.active 'activate the bus
' CheckError(r)
UART.str(string("Write to sram"))
crlf
'write the block out to sram
r := tbp2.DoCmd("W", @disk_buff, hdsk_dma, 128) 'write to sram
check_error(r)
' r := tbp2.idle 'give up the bus
' CheckError(r)
No, I'm pretty sure I'm not using 137 bytes for hard disks. Have a look in the mk_ziocog_img.py script that I used to make I:
It's easy to read and you can see exactly how I transformed SIMH I: image into the ZiCog SD image.
My I: disk may be starting to look different as I have deleted and written a few files to it. Sadly I can't access the actual file I use just now.
You must have hard disk support compiled into the BIOS but if I remember correctly that is the default in the SIMH cpm2.dsk
Also be sure you have a cpm2 from May or so. Peter Schorn fixed a bug for me in CBIOSX about then. Still that was to do with 8080/Z80 CPU detection so as long as you have CPU_Z80 set you should be fine.
It might help to play with the SHOWSEC command in CP/M on TriBlade and compare with SIMH.
I think Dr_A is right about what should happen with a HD full of E5. Check if it really works like that on SIMH.
Got to go....
CP/M knows about the hard disks geometry by asking the simulator, which provides the disk parameter table. We do this in zicog_demo.spin. look for "hdsk_dpb" and the routine "PRI in_hdskport_param".
I suggest not changing those parameters just yet as we will then just confuse each other. Anyway CP/M 2 can only use 128 byte sectors. Also I'm not totally clear on how to change those tables it yet[noparse]:)[/noparse]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
Oops. I don't think the code has been written! See the last line
PRI in_hdskport_write
'Handle read from hdskport during a disk write command
'This read triggers the actual disk sector transfere
'and must return an error code.
'N.B. sectors are mapped to blocks 1 to 1
if hdsk_check_dts 'Check drive, track and sector are sane
io_data := $FF 'Return error if not
return
#ifdef TriBladeProp
'???
err := $55 '<== force a write error as no code yet
see my post above for the write code. I also discovered the lines you commented out were the culprit. I was going to hit the sack but will wait up for this I have a feeling it is imminent
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ Links to other interesting threads:
Ah, you have the writes in there as well? Ok, off to code them.
BTW heater, I went off on a tangent and used Cluso's vb6 program to make an 8mb binary file filled with E5. Dropped it into the simh and it all works. So that is a handy way to make blank disks.
Addit: back. Ok, comment out the hdsk read, and also the hdsk write messages
Apart from that, exactly as your code was above. Time for a re-release? Or do we add drives J, K, L? Or are you going to sleep?!
PRI out_hdskport_null
'Handle writes to the hdskport when no command is in progress
'io_data should be a new command byte.
case io_data
hdskRead:
'UART.str(string("hdsk read"))
'crlf
hdsk_current_command := hdskRead
hdsk_command_pos := 1
hdskWrite:
'UART.str(string("hdsk write"))
'crlf
and a printout:
A>i:
I>dir
I: MBASIC COM
I>mbasic
BASIC-80 Rev. 5.21
[noparse][[/noparse]CP/M Version]
Copyright 1977-1981 (C) by Microsoft
Created: 28-Jul-81
32824 Bytes free
Ok
print "hello"
hello
Ok
system
Unknown console status write with byte &H03
Punch reset
I>dirx
Name Ext Bytes Name Ext Bytes Name Ext Bytes Name Ext Bytes
MBASIC COM 24K
1 File(s), occupying 24K of 8136K total capacity
1023 directory entries and 8112K bytes remain on I:
I>
Uncommented the bootup for drives J, K, L
Cloned drive I to the other three
Then changed the <1 to <4 in this bit of code so it accepts 4 drives.
PRI hdsk_check_dts : status
'Check that selected hdsk drive, sector and track are within limits
if (hdsk_drive < 4) and (hdsk_track =< 2048) and (hdsk_sector =< 128)
status := $00
Can now get into drive J as well. But getting bdos errors on drive K and L
So close...
Addit: given bdos errors seem more of a CP/M flavour than zicog (addit addit - yes bdos error on k:select means the drive doesn't exist according to cp/m), I tried attaching some more hard drives to the simh simulation. But no luck there, bdos errors as well, - maybe the syntax isn't right in that definition file.
d tracks[noparse][[/noparse]0-7] 254
attach dsk cpm2.dsk
attach dsk1 basic.dsk
attach dsk2 games.dsk
attach dsk3 sbasic.dsk
attach dsk4 bdsc160.dsk
attach dsk5 tools.dsk
attach dsk6 wordstar.dsk
attach hdsk1 i.dsk
attach hdsk2 j.dsk
set cpu 64k
set cpu noitrap
set cpu z80
set cpu altairrom
set cpu nonbanked
reset cpu
set sio ansi
set sio nosleep
boot dsk
bye
Shouldn't the check for
if (hdsk_drive < 4) and (hdsk_track =< 2048) and (hdsk_sector =< 128)
be
if (hdsk_drive < 4) and (hdsk_track < 2048) and (hdsk_sector < 128)
because 0...2047 and 0...127
??
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ Links to other interesting threads:
BTW the hd·L: has different hardware specs in the table
We will now be able to setup an sram disk - what character drive ??? Its size will depend on cpm3 and banking.· "F" for fast ??? but we will have to change CPM won't we???
I would like to get the sram done and the sd access before we go v1.0 please heater
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ Links to other interesting threads:
Dr_A: Configuring and rebuilding CP/M under SIMH is easy peasy.
There is a single submit file, SYSCPM2.SUB, to run that will assemble all the CP/M parts, do whatever it does with them and end up with the newly build CP/M on the boot sectors of A:
So it's just:
A>DO SYSCPM2
Before that, change the configured number of hard drives by changing "nhdisks equ 1" to "nhdisks equ 4" in the config file CFGCCP.LIB.
You get extra points if you can do this on the TriBlade rather than in SIMH. TriBlade should be able to rebuild itself now after all.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
Some time ago I did make a modified CBIOSX that had a floppy disk definition customised for a RAM disk size.
Can't remember what size we fixed on, but I don't think we took into account the requirements for banked memory.
So how much banked memory are we needing?
I don't know.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
re Banked memory: I think we were aiming at using 256KB total. This would leave us 256KB + 512KB. So I guess for now we should make it 768KB. Perhaps I can do this (when I get hw) directly under CPM on the TriBlade under your instructions) - then I can change it later if need be (and document it from a novice point of view)?
Guess I should get my SIMH working on the PC :-)
Does this definition allow for 2 floppy sizes or would we be better simulating it as another small hard drive because it would be faster to do DMA style access withing the tb driver (say drive L: or can we skip drives and use R[noparse]:)[/noparse]?
I need to look at dropping in the new fsrw but it will not be today :-(
This is great progress after a break. Thanks·Dr_Acula and Heater ·
Just to answer the issue of 137 byte sectors on the floppies for SIMH (on the TriBlade thread). CPM does not verify those extra 3+6 bytes as I have disabled their "fixing" in my code, just do the 3 byte offset into the buffer. I have posted the files so you only have to concatenate them for your use, not remake them (if you like). I think we should post both the combined 1 file for all drives like you use and seperate files like I use. However, they will all use the first 128 bytes of the 512 byte sectors and all will be 32MB per disk, even for floppies (we just will not be using it). What I am doing makes it easy to refresh a drive and runs under FAT16. It still requires contiguous sectors within·each file (drive)·for direct access from the base. However, you cannot afford the hub space for the code, so your use of 1 contiguous file for all drives and no FAT16 makes complete sense.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ Links to other interesting threads:
Heater sent a PM overnght with a concept that avoids the need to run a vb6 program to make disk images. Some people may not have vb6. If the zicog boots up with a blank sd card, there may be enough space in the eeprom to get the bare minimum working to create a drive A on the sd card, write 32mb of e5 to it and then run xmodem. Then you can start transferring other files over, including programs to make all the drives (which are all the same anyway - just 32mb of E5). We use the same concept on the N8VEM and that has much more than enough space on a 32k eprom to get the bare mimimum working, eg CP/M and a couple of programs. The 'create a drive and format' program might only be 10 lines of spin. Open a file on fat16. Name it (based on a letter the user types eg B will create DRIVE__B.DSK. Write 32mb of E5 (hmm that might take a while. Faster sd card access??) Close the file. Enable that drive in the drive list array in spin.
I've got something more complicated in mind involving networking. I've already got CP/M networked in the sense of having two boxes in different rooms and you run xmodem s on one and xmodem r on the other and they wirelessly transfer a file. But it isn't real networking as you have to set up xmodem on one machine and then go into the other room and set it up on the other.
How would browsing a remote computer work? I think it needs two programs to run in parallel - CP/M, and a background program that serves up the files to the remote computer requesting them. That is multi tasking, and maybe MP/M can do that? You have one 'user' running CP/M, and another 'user' running a background program scanning a serial port/radio for input, and acting on it. I think it is possible but it needs multitasking. MP/M can multitask - I wonder if MP/M would run on the zicog? Can CP/M3 multitask?
I guess back to the tasks at hand. What does banked memory do?
Post Edited (Dr_Acula) : 8/20/2009 12:42:10 AM GMT
No need to make disk images - I posted zipped versions of them all a while back. Just not the hard drive because I didn't know what was required. It is relatively easy to get them onto the uSD from a PC with windows and an SD or USB converter. Probably could even do it with my printer which has an SD slot. One of my laptops has a builtin SD reader. It is also probably easier if we don't have everyone making their own files/drives.
CPM3 runs but I had a keyboard glitch which you may have solved. Just change the #define and try (you need my drive files though which has a SIMH CPM3 drive already). IIRC I don't think CPM3 can multitask. MPM should most likely work. Unfortunately cannot get hardware till at least Tuesday when I am next in sunny and warm Qld.
Once I get hardware I will get the fast fsrw for uSD running. It will be quite simple as lonesock builtin the requirement to release the DO pin by the SD card. Currently sdspiFemto has a patch which emits hundreds of clock cycles to force the card to release it. The code is way too complex for me to tinker with at the moment, and besides, lonesock and rokicki have done a great job with the new fsrw.
Dr_Acula: If you get a chance tonight try CPM3 for me please. The keyboard input was missing every second character, so I needed to type it twice. If that works then maybe I can find out from Heater how to tell CPM3 it has banked memory and we can get it running
Banked memory is for CPM3 and has not been tested yet. The code is in place. IIRC it switches either 16KB or 48KB blocks into the 64KB window while the other 48KB or 16KB remains permanently in the 64KB window. Bank switching is done in the emulator code - no hardware!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ Links to other interesting threads:
Created a new disk image in the simh for 4 hard drives ready for testing. New 'all' file. Note the 4 hard drives.
d tracks[noparse][[/noparse]0-7] 254
attach dsk cpm2.dsk
attach dsk1 basic.dsk
attach dsk2 games.dsk
attach dsk3 sbasic.dsk
attach dsk4 bdsc160.dsk
attach dsk5 tools.dsk
attach dsk6 wordstar.dsk
attach hdsk0 i.dsk
attach hdsk1 j.dsk
attach hdsk2 k.dsk
attach hdsk3 l.dsk
set cpu 64k
set cpu noitrap
set cpu z80
set cpu altairrom
set cpu nonbanked
reset cpu
set sio ansi
set sio nosleep
boot dsk
bye
Next, use R to read in SUPERSUB.COM.
Use W to write CFGCCP.LIB out to the PC disk, and edit the line with the number of hard drives to 4.
Use R to read it back in.
run
SUPERSUB SYSCPM2
this recreates CP/M so it can handle 4 hard drives on the simh.
Then on the propeller, tried recompiling itself with
SUPERSUB SYSCPM2
files exactly as they were on the simh.
Took about 10 minutes, and it boots and it works, but all sorts of rubbish characters coming up.
Then, tried copying the new disk image off the simh that works with 4 drives.
Good news - it can read all 3 drives.
Bad news - falls over on the 4th one, and I think this error is in cp/m??
I just happen to be looking at this. In zicog_demo.spin there are 4 hard parameter blocks dpb_0 to dpb_3 in a table labelled hdsk_dpb.
These provide the disk geometry parameters to CBIOSX for the drive I: to L: respectively.
Just happens that the last one, dpb_3, is different. It describes a "720K Super I/O Floppy" what ever that is/was.
Suggest changing it to be the same as the other three and try again.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
Comments
and
I get this much when typing I:, before it hangs
hdsk read
00
00
06
00
39
F7
added in another little tracker:
yes, hdsk_command_pos increments each time as expected.
hdsk read
00
01
00
02
06
03
00
04
39
05
F7
06
Post Edited (Dr_Acula) : 8/19/2009 11:36:43 AM GMT
James: Can you try this (in PRI in_hdskport_read | r)
replace "128" with "512"
·next try and offset @disk_buff[noparse][[/noparse]3] and back to 128 sector length
How does cpm know about the drive geometry???
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBladeProp, RamBlade, TwinBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: Micros eg Altair, and Terminals eg VT100 (Index) ZiCog (Z80) , MoCog (6809)
· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
Geometry? It is part of the custom bios you insert into the cp/m code. Eg sector size, number of sectors. But, this is my theory, no mattery what is inside the simh parameters, if you have a huge file filled with E5, it should come back with the drive name, and if you do a DIR it should come back with no file. For instance, I have no idea what the drive geometry is of a floppy drive either. But I created a 32mb file filled with E5, called it DRIVE__B.DSK and this is what happens:
A>B:
B>DIR
No file
B>
So, the same thing should work for drive I.
I added this bit of test code:
and got this
hdsk read
00
01
00
02
06
03
00
04
39
05
F7
06
hdskport_read
Read a sector
And then it hangs. Ok, need to drill down into that subroutine and work out is it getting to the end, where it hangs etc...
added more traces:
hdsk read
00
01
00
02
06
03
00
04
39
05
F7
06
hdskport_read
Read a sector
00
06
00
Block read Have read block
and then it hangs. Hmm, where does it go next?
Post Edited (Dr_Acula) : 8/19/2009 12:28:46 PM GMT
postedit: added "| r" to PRI in_hdskport_write | r
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBladeProp, RamBlade, TwinBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: Micros eg Altair, and Terminals eg VT100 (Index) ZiCog (Z80) , MoCog (6809)
· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
Post Edited (Cluso99) : 8/19/2009 12:49:15 PM GMT
And now we should be able to get the sd block number:
and (hopefully the maths is right), this returns
still hangs at that point. Next thing, is it returning E5?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBladeProp, RamBlade, TwinBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: Micros eg Altair, and Terminals eg VT100 (Index) ZiCog (Z80) , MoCog (6809)
· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
Ok, so it is these 4 lines that have been commented out
(ignore my write to sram message)
ok, back to removing debug messages...
It's easy to read and you can see exactly how I transformed SIMH I: image into the ZiCog SD image.
My I: disk may be starting to look different as I have deleted and written a few files to it. Sadly I can't access the actual file I use just now.
You must have hard disk support compiled into the BIOS but if I remember correctly that is the default in the SIMH cpm2.dsk
Also be sure you have a cpm2 from May or so. Peter Schorn fixed a bug for me in CBIOSX about then. Still that was to do with 8080/Z80 CPU detection so as long as you have CPU_Z80 set you should be fine.
It might help to play with the SHOWSEC command in CP/M on TriBlade and compare with SIMH.
I think Dr_A is right about what should happen with a HD full of E5. Check if it really works like that on SIMH.
Got to go....
CP/M knows about the hard disks geometry by asking the simulator, which provides the disk parameter table. We do this in zicog_demo.spin. look for "hdsk_dpb" and the routine "PRI in_hdskport_param".
I suggest not changing those parameters just yet as we will then just confuse each other. Anyway CP/M 2 can only use 128 byte sectors. Also I'm not totally clear on how to change those tables it yet[noparse]:)[/noparse]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
Now on to getting the writes working:
Post Edited (Dr_Acula) : 8/19/2009 1:06:18 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBladeProp, RamBlade, TwinBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: Micros eg Altair, and Terminals eg VT100 (Index) ZiCog (Z80) , MoCog (6809)
· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
BTW heater, I went off on a tangent and used Cluso's vb6 program to make an 8mb binary file filled with E5. Dropped it into the simh and it all works. So that is a handy way to make blank disks.
*note this is not on a triblade*
A>pip i:mbasic.com=a:mbasic.com
A>i:
I>dir
I: MBASIC COM
I>stat
A: R/W, Space: 614k
I: R/W, Space: 8112k
I>mbasic
BASIC-80 Rev. 5.21
[noparse][[/noparse]CP/M Version]
Copyright 1977-1981 (C) by Microsoft
Created: 28-Jul-81
32824 Bytes free
Ok
system
I>
Above works on the zicog too.
Ok, tidying up a few things. brb
Addit: back. Ok, comment out the hdsk read, and also the hdsk write messages
Apart from that, exactly as your code was above. Time for a re-release? Or do we add drives J, K, L? Or are you going to sleep?!
and a printout:
Post Edited (Dr_Acula) : 8/19/2009 1:39:29 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
Please copy I to J, K & L and we may a well have the 4 hdisks now
I will just quickly tidy and post the code· do you still require the dec function? Anything else to add?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBladeProp, RamBlade, TwinBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: Micros eg Altair, and Terminals eg VT100 (Index) ZiCog (Z80) , MoCog (6809)
· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
Uncommented the bootup for drives J, K, L
Cloned drive I to the other three
Then changed the <1 to <4 in this bit of code so it accepts 4 drives.
Can now get into drive J as well. But getting bdos errors on drive K and L
So close...
Addit: given bdos errors seem more of a CP/M flavour than zicog (addit addit - yes bdos error on k:select means the drive doesn't exist according to cp/m), I tried attaching some more hard drives to the simh simulation. But no luck there, bdos errors as well, - maybe the syntax isn't right in that definition file.
Post Edited (Dr_Acula) : 8/19/2009 1:56:56 PM GMT
Actually I'm very tempted to give it v1.0. what do you think?
Let me vanish for some hours first though.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
Probably need to bundle up a working simh group of dsk files?? ( I don't know how to recompile the CBIOSX)
64K CP/M Version 2.2 (SIMH ALTAIR 8800, BIOS V1.25, 2 HD, 15-Jan-07)
I wonder what "2 HD" means...
And indeed, I can add two drives:
So just need to get the 4hd version.
Ok, I need to sleep now too. This is a success!!!
Post Edited (Dr_Acula) : 8/19/2009 2:04:13 PM GMT
if (hdsk_drive < 4) and (hdsk_track =< 2048) and (hdsk_sector =< 128)
be
if (hdsk_drive < 4) and (hdsk_track < 2048) and (hdsk_sector < 128)
because 0...2047 and 0...127
??
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBladeProp, RamBlade, TwinBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: Micros eg Altair, and Terminals eg VT100 (Index) ZiCog (Z80) , MoCog (6809)
· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
BTW the hd·L: has different hardware specs in the table
We will now be able to setup an sram disk - what character drive ??? Its size will depend on cpm3 and banking.· "F" for fast ??? but we will have to change CPM won't we???
I would like to get the sram done and the sd access before we go v1.0 please heater
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBladeProp, RamBlade, TwinBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: Micros eg Altair, and Terminals eg VT100 (Index) ZiCog (Z80) , MoCog (6809)
· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
Post Edited (Cluso99) : 8/19/2009 2:41:22 PM GMT
There is a single submit file, SYSCPM2.SUB, to run that will assemble all the CP/M parts, do whatever it does with them and end up with the newly build CP/M on the boot sectors of A:
So it's just:
A>DO SYSCPM2
Before that, change the configured number of hard drives by changing "nhdisks equ 1" to "nhdisks equ 4" in the config file CFGCCP.LIB.
You get extra points if you can do this on the TriBlade rather than in SIMH. TriBlade should be able to rebuild itself now after all.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
Some time ago I did make a modified CBIOSX that had a floppy disk definition customised for a RAM disk size.
Can't remember what size we fixed on, but I don't think we took into account the requirements for banked memory.
So how much banked memory are we needing?
I don't know.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
Guess I should get my SIMH working on the PC :-)
Does this definition allow for 2 floppy sizes or would we be better simulating it as another small hard drive because it would be faster to do DMA style access withing the tb driver (say drive L: or can we skip drives and use R[noparse]:)[/noparse]?
I need to look at dropping in the new fsrw but it will not be today :-(
This is great progress after a break. Thanks·Dr_Acula and Heater ·
Just to answer the issue of 137 byte sectors on the floppies for SIMH (on the TriBlade thread). CPM does not verify those extra 3+6 bytes as I have disabled their "fixing" in my code, just do the 3 byte offset into the buffer. I have posted the files so you only have to concatenate them for your use, not remake them (if you like). I think we should post both the combined 1 file for all drives like you use and seperate files like I use. However, they will all use the first 128 bytes of the 512 byte sectors and all will be 32MB per disk, even for floppies (we just will not be using it). What I am doing makes it easy to refresh a drive and runs under FAT16. It still requires contiguous sectors within·each file (drive)·for direct access from the base. However, you cannot afford the hub space for the code, so your use of 1 contiguous file for all drives and no FAT16 makes complete sense.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBladeProp, RamBlade, TwinBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: Micros eg Altair, and Terminals eg VT100 (Index) ZiCog (Z80) , MoCog (6809)
· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
Heater sent a PM overnght with a concept that avoids the need to run a vb6 program to make disk images. Some people may not have vb6. If the zicog boots up with a blank sd card, there may be enough space in the eeprom to get the bare minimum working to create a drive A on the sd card, write 32mb of e5 to it and then run xmodem. Then you can start transferring other files over, including programs to make all the drives (which are all the same anyway - just 32mb of E5). We use the same concept on the N8VEM and that has much more than enough space on a 32k eprom to get the bare mimimum working, eg CP/M and a couple of programs. The 'create a drive and format' program might only be 10 lines of spin. Open a file on fat16. Name it (based on a letter the user types eg B will create DRIVE__B.DSK. Write 32mb of E5 (hmm that might take a while. Faster sd card access??) Close the file. Enable that drive in the drive list array in spin.
I've got something more complicated in mind involving networking. I've already got CP/M networked in the sense of having two boxes in different rooms and you run xmodem s on one and xmodem r on the other and they wirelessly transfer a file. But it isn't real networking as you have to set up xmodem on one machine and then go into the other room and set it up on the other.
How would browsing a remote computer work? I think it needs two programs to run in parallel - CP/M, and a background program that serves up the files to the remote computer requesting them. That is multi tasking, and maybe MP/M can do that? You have one 'user' running CP/M, and another 'user' running a background program scanning a serial port/radio for input, and acting on it. I think it is possible but it needs multitasking. MP/M can multitask - I wonder if MP/M would run on the zicog? Can CP/M3 multitask?
I guess back to the tasks at hand. What does banked memory do?
Post Edited (Dr_Acula) : 8/20/2009 12:42:10 AM GMT
CPM3 runs but I had a keyboard glitch which you may have solved. Just change the #define and try (you need my drive files though which has a SIMH CPM3 drive already). IIRC I don't think CPM3 can multitask. MPM should most likely work. Unfortunately cannot get hardware till at least Tuesday when I am next in sunny and warm Qld.
Once I get hardware I will get the fast fsrw for uSD running. It will be quite simple as lonesock builtin the requirement to release the DO pin by the SD card. Currently sdspiFemto has a patch which emits hundreds of clock cycles to force the card to release it. The code is way too complex for me to tinker with at the moment, and besides, lonesock and rokicki have done a great job with the new fsrw.
Dr_Acula: If you get a chance tonight try CPM3 for me please. The keyboard input was missing every second character, so I needed to type it twice. If that works then maybe I can find out from Heater how to tell CPM3 it has banked memory and we can get it running
Banked memory is for CPM3 and has not been tested yet. The code is in place. IIRC it switches either 16KB or 48KB blocks into the 64KB window while the other 48KB or 16KB remains permanently in the 64KB window. Bank switching is done in the emulator code - no hardware!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBladeProp, RamBlade, TwinBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: Micros eg Altair, and Terminals eg VT100 (Index) ZiCog (Z80) , MoCog (6809)
· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
Will get to cpm3.
Created a new disk image in the simh for 4 hard drives ready for testing. New 'all' file. Note the 4 hard drives.
Next, use R to read in SUPERSUB.COM.
Use W to write CFGCCP.LIB out to the PC disk, and edit the line with the number of hard drives to 4.
Use R to read it back in.
run
SUPERSUB SYSCPM2
this recreates CP/M so it can handle 4 hard drives on the simh.
Then on the propeller, tried recompiling itself with
SUPERSUB SYSCPM2
files exactly as they were on the simh.
Took about 10 minutes, and it boots and it works, but all sorts of rubbish characters coming up.
Then, tried copying the new disk image off the simh that works with 4 drives.
Good news - it can read all 3 drives.
Bad news - falls over on the 4th one, and I think this error is in cp/m??
and then hangs.
So close. Just need to get drive L. Interestingly, that "must be a hard disk" error is not in spin so must be a cp/m error.
Bizarre error now, supersub won't work and errors on line 0. ditto simh DO. So can't recompile any more on the simh.
Might need to comment out the hdskparam comment eventually. Maybe the punch and console errors too.
Post Edited (Dr_Acula) : 8/20/2009 3:48:43 PM GMT
These provide the disk geometry parameters to CBIOSX for the drive I: to L: respectively.
Just happens that the last one, dpb_3, is different. It describes a "720K Super I/O Floppy" what ever that is/was.
Suggest changing it to be the same as the other three and try again.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
I don't know if that is the same a SUPERSUB or makes any difference.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.