+3e DOS z88dk / 3e DOS Support Questions & Research (Yes +3e again ;))

ZX80, ZX 81, ZX Spectrum, TS2068 and other clones
Post Reply
Zetr0
Member
Posts: 33
Joined: Mon Aug 22, 2011 12:38 pm

+3e DOS z88dk / 3e DOS Support Questions & Research (Yes +3e again ;))

Post by Zetr0 »

Greetings fellow Z88dk'ers

I have been busy with a couple of Spectrum projects lately - specifically a lightweight WIMP environment for the +3e DOS system.

I have used a mix of C (for prototyping logic) and inline Z80 ASM (which there always seems more to learn ;))

What I would like to achive is the ability to "read" the "disk device(s)" and or their "partitions" using either z88dk C or I suspect a few ASM routines to provide the following -


Shuffling XPBD's
as a resource the +3e DOS has 2 additional XPBD resources that the user can assign to a Partition

in BASIC we have

Code: Select all

MOVE "C:" IN "0>PROGRAMS"
MOVE "D" IN "1>GAMES"
with the exception of A:, B: and M: I can use any "letter" I choose - however - if I wanted to change what the XPBD points to, say "C:" to refer to "0>Utilities" i would use

Code: Select all

MOVE "C:" OUT
MOVE "C:" IN " 0>Utilities"
Now I would like to be able to do this from within a C program, although I suspect that some ASSEMBLY is required ;)

Other useful things I would like to achieve in Z88dk (via C and or ASM via a C wrapper)
Getting a Partition Listing

very simple, what partitions are available to be used

Code: Select all

CAT TAB
Getting a Partition File List

Code: Select all

CAT "C:"
With the above I suspect an address of a vector ( of a given size ) is required and is parsed to the CALL in ROM, however I am struggling to comprehend some of the code sources that Garry Lancaster has published, believe me its certainly me LOL!

I do struggle to find resources regarding the access of the +3e DOS system - a lot of what I have been able to do is very much trial... error... error.... error and trial again.

if anyone reading this has any sources and or examples with using ASM / C and +3e DOS, and are willing to share - I do humbly offer my sincere thanks and credit on the release of some of the software that will be open source.


Other Nice Things:

Loading Files from the program - replacing the, lets call it a GUI File Commander atm, by loading say a Game ".bas" file, which in turn would typically then load a screen file and then the game code.

I have a very "hacky" way of doing this atm, by manipulating the strings that are set up in the VAR-iable memory area.

e.g.

Code: Select all

1 REM *** Item Loader
2 CLEAR 32767
10 BORDER 0 : PAPER 0 : INK 7 : CLS
20 LET u$="0>" 
30 LET a$="C:"
40 LET b$="PARTITIONNAME"
50 LET c$="FILENAME.EXT"
60 LOAD "ZXLEXE.BAS" CODE, 32768
70 RANDOMIZE USR 32768
80 LET d$ = u$ + a$ + b$ + c$
90 LOAD d$
The code at $32768 executes and overwrites the strings of a$, b$ and c$ - obviously once the code is complete it returns to the next line ( LINE 70 ) where the previous string elements are concatonated to d$ and then is parsed to the LOAD call.

While this "WORKS" its far from optimal.

My hope is to have within a contained program the bare requirements of a Window Icon Menu and Pointer system (skinable) providing a very lightweight OS/ Graphical GUI - File commander for the spectrum +3e environment and a platform to write some interesting software and a dungeon crawler of sorts.

If its at all possible I would like to open this open and post a build log and any code that is written for it, I would like to publish it here as this forum is an invaluable resource in my research and begging for help.

Besides it would be a great way to give back, get some feedback on the approach and execution, and no doubt a billion and one ways to optimise it.

And Lastly -

Thank you for reading :)
Zetr0
Member
Posts: 33
Joined: Mon Aug 22, 2011 12:38 pm

Post by Zetr0 »

*update

Surprisingly I found this link - http://www.worldofspectrum.org/zxplus3e/idedos.html -

and even more surprising it's starting to make some more sense ;)


MMmmm ASM code testing at 9am...... the breakfast of champions!
stefano
Well known member
Posts: 1628
Joined: Mon Jul 16, 2007 7:39 pm

Post by stefano »

Since you mentioned basic, have you seen zxbasctl.lib ?
Bouncing in and out the basic interpreter can be harmful, but the many interfaces based on a shadow rom are even worse and sometimes you have no other way..
stefano
Well known member
Posts: 1628
Joined: Mon Jul 16, 2007 7:39 pm

Post by stefano »

Post Reply