dp111 / pi1mhz Goto Github PK
View Code? Open in Web Editor NEWBeeb 1MHz bus device emulator in a RaspberryPi
Beeb 1MHz bus device emulator in a RaspberryPi
The Adaptec ACB4000 controller emulated by BeebSCSI/Pi1MHzSCSI allows 32 or 33 sectors per track. This cannot be directly set by the user but is calculated by the controller depending on the interleave value sent during the format command. For an interleave of 1, the sectors per track is 32, for all other interleaves it is 33 (see Adaptec Manual p. 2-5).
However, BeebSCSI always assumes 33 sectors per track and this value is hard-coded throughout filesystem.c and scsi.c.
For Superform-formatted Winchester discs this is not a problem as Superform uses an interleave which generates 33 sectors per track. However, other formatters may allow a variable interleave to be selected. It also makes more sense when dealing with flash-memory card storage to use the more convenient value of 32 for sectors per track, since interleave has no meaning or effect on memory cards, to allow the full ADFS size of 2097152 sectors (1024 cyl x 64 hd x 32 spt) to be used with no wastage.
To allow this, the interleave parameter should be read from the format parameters during command code &4 in scsi.c (code is currently commented out) and then a new sectorspertrack variable created depending on the result. This variable should then be used in place of "33" elsewhere in filesystem.c and scsi.c.
A problem is that there is no way to read the interleave value of a formatted disc at a later time, or the sectors per track value. Adaptec Mode Sense will store the sectors per track value in the final byte of a 24-byte mode select/mode sense command block, but this officially is only supported for hard sectored or removable drives, with normal Winchester drives only using a 22-byte block. BeebSCSI only supports 22 byte blocks, using in the ".dsc" files associated with the LUN files.
Either BeebSCSI could be modified to support 24-byte .dsc files, or one of the reserved bytes in the existing 22-byte block could be re-assigned for BeebSCSI purposes as an interleave or sectors-per-track value.
Latest build (02062011 beta) of software. When booting (and pressing CTRL-BREAK after 10 seconds to ensure its up) - if you then enter 'PRINT $FD00' at the command line as indicated in the git readme - it just comes back as 'unknown variable'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.