DSKBuilder - New Windows utility

Anything related to the tools Tap2Wav, Tap2CD, Tap2Dsk, Sedoric Disc Manager, Tape Header Creator, WriteDsk, and generaly speaking tools related to the management of Oric data files and devices.
User avatar
Twilighte
Game master
Posts: 819
Joined: Sat Jan 07, 2006 12:07 am
Location: Luton, UK
Contact:

DSKBuilder - New Windows utility

Post by Twilighte » Sun Apr 27, 2008 10:19 pm

DSKBuilder is a brand spanking new windows based GUI utility that allows anyone to create a new Oric Disk and populate it with up to 80 files of any type.
The generated disk is not Sedoric compatable but provides its own multi-boot system and will contain a suite of disk access routines. All of these fit in just 2 sectors (1024 Bytes) thanks to Fabrice France's wonderful fantasmagoric boot sector routine. 8)
Disk file sizes are limited to multiples of 512 (The size of each sector) and the load address must always be page alligned (XX00).

On startup, select File/New project to create a new project file and begin compiling a new disk.
  • + Adds files to the compilation
    The first file in the list should have a start address (Use a .tap) or it will default to $400 and also execute from this address (passing control to it from the boot routine).
  • - Removes the file that the cursor in the list is over
  • The up and down buttons moves the selected file up and down through the list
  • The Ring Arrow is the refresh button and will rescan all files for size and existance
  • The Disk button will create and compile the disk.
  • Options/Scripts provide a way to execute .bat files before and after the build process.
  • Reports are also available in the Tools menu
The utility can also be run from command prompt as follows..

Code: Select all

>DSKBUILDER -PProjectFilename
This is very limited atm and only provides another means to get into dskbuilder.

On bootup, memory $FE00-FFF9 holds the FAT and a load routine (ROM and EPROM disabled) which may be called as follows..
Load A with the High byte Load Address, X with the File Index number (Left most column in DSKBuilder) then JSR $FE00 to load the selected file.
Interrupts will be disabled on return but are not used during the load process.

No Manual provided yet, but it will come in due time.
The generated disk has only been tested on euphoric microdisc, so if others could test against real thing, that could be great.

I've probably missed out alot of info, but feedback is welcome :)
Have Fun

You can download DSKBuilder here:
http://www.defence-force.org/ftp/forum/ ... uilder.zip
The files provided in the zip must be unzipped to the OSDK/BIN folder. (DSKBuilder will only work in OSDK since it relies on some utilities (RAW2MFM) provided by this package.)

User avatar
Dbug
Site Admin
Posts: 2324
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Post by Dbug » Mon Apr 28, 2008 9:02 pm

Sounds cool :)

Is it possible to have a small sample project that show an example of something, like a small slide show with HIRES pictures loading from disk, using the loader ?

It's always easier for people to figure out how something work if they can tweak and play some existing thing instead of starting from scratch.

User avatar
Chema
Game master
Posts: 1972
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Re: DSKBuilder - New Windows utility

Post by Chema » Tue Apr 29, 2008 8:55 am

Twilighte wrote:DSKBuilder is a brand spanking new windows based GUI utility that allows anyone to create a new Oric Disk and populate it with up to 80 files of any type.
The generated disk is not Sedoric compatable but provides its own multi-boot system and will contain a suite of disk access routines. All of these fit in just 2 sectors (1024 Bytes) thanks to Fabrice France's wonderful fantasmagoric boot sector routine. 8)
It is an splendid idea indeed! Just the kind of thing that we always needed!

I tried it but only got an error message stating "Can't not locate Boot sector 1" or something similar...

I wonder if it could be possible to build a multi platform Space:1999 version!!!

Cheers.

User avatar
Twilighte
Game master
Posts: 819
Joined: Sat Jan 07, 2006 12:07 am
Location: Luton, UK
Contact:

Post by Twilighte » Tue Apr 29, 2008 9:55 pm

Chema, i have not yet been able to recreate the issue you have. Did you place all 3 files in your osdk/bin directory?
Also, you must have the osdk environment variable set to the osdk directory for the program to work.

User avatar
Chema
Game master
Posts: 1972
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Post by Chema » Wed Apr 30, 2008 8:42 am

Twilighte wrote:Chema, i have not yet been able to recreate the issue you have. Did you place all 3 files in your osdk/bin directory?
Also, you must have the osdk environment variable set to the osdk directory for the program to work.
Ah, ok. My fault. Just let those files on the application directory and not in the osdk/bin directory.

Will check as soon as possible if everything works.

User avatar
Twilighte
Game master
Posts: 819
Joined: Sat Jan 07, 2006 12:07 am
Location: Luton, UK
Contact:

Post by Twilighte » Wed Apr 30, 2008 3:57 pm

Ok, am at work today but i did try some stuff last night and there are some issues.
1) Tape files are not stripped of header properly.
2) filesize shown in listview is incorrect for Tapes
3) The boot ends with an "A" in top left corner of screen and no further (Test code still left in).
4) Loading from disk using the user load routine doesn't work correctly.
5) The pre-script batch file is not always found. Strange issue.
6) Closing the dskbuilder window should prompt if you want to save project but it doesn't.
7) Some Menu settings are not saved in project file or are unreliable.

I have fixed the first 3 issues now. Please continue to report any more issues you find.

User avatar
Twilighte
Game master
Posts: 819
Joined: Sat Jan 07, 2006 12:07 am
Location: Luton, UK
Contact:

Post by Twilighte » Mon May 05, 2008 8:45 pm

All of the above issues have been addressed now.

The Application is now provided with a demo and some rudimentary documentation.

http://www.defence-force.org/ftp/forum/ ... er1001.zip

Have fun. For the moment, i am back to Wurlde.

User avatar
Chema
Game master
Posts: 1972
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Post by Chema » Tue May 06, 2008 9:09 am

Twilighte wrote:All of the above issues have been addressed now.

The Application is now provided with a demo and some rudimentary documentation.

http://www.defence-force.org/ftp/forum/ ... er1001.zip

Have fun. For the moment, i am back to Wurlde.
Fantastic tool Twilighte!

This is really useful!

Have not played with it too much, but may I add something I would like to see in the next release? :)

1. A routine for switch overlay ram in and out, and maybe switch to FDC eprom. Many programs (nearly all of those compiled with the C library of the OSDK) need access to the ROM routines.

This could be useful in order to have a BASIC or small C program as loader which does things like getting into HIRES mode, printing a message, set up things... Space:1999 does this... even for deciding if the intro or the game has to be loaded.

A BASIC loader should probably need to enable interrupts back. I think there is a ROM address to do this (posted on another thread, IIRC). Else an address to a cli/rts pair inside the already loaded code would be appreciated.

2. A small C interface for accessing the disk functions. It is easy to add it into the OSDK library as sources (so only included if needed). Should be quite easy to do...

3. Booting is VERY fast, and if it is to be like that, maybe this is something useless, but maybe a start-up message such as Fantasmagoric Booting... could be nice... even if it could be enabled/disabled.

Anyway this is a very nice step ahead for future Oric titles... and not only games!

Cheers

User avatar
Twilighte
Game master
Posts: 819
Joined: Sat Jan 07, 2006 12:07 am
Location: Luton, UK
Contact:

Post by Twilighte » Tue May 06, 2008 7:03 pm

Chema wrote:1. A routine for switch overlay ram in and out, and maybe switch to FDC eprom. Many programs (nearly all of those compiled with the C library of the OSDK) need access to the ROM routines.
The advantage of this disk routines is that they occupy just 1K from FE00 to FFF9 and don't use Page 0 or Page 2.
Switching ROM can only be done in a program that resides below C000, so i can provide a routine but it will never be integrated into the Disk Routines.
Please also note that Each machines method of enabling ROM is different. This is some of the reason why i supply the Machine type in FFF4.
Chema wrote:A BASIC loader should probably need to enable interrupts back. I think there is a ROM address to do this (posted on another thread, IIRC). Else an address to a cli/rts pair inside the already loaded code would be appreciated.
I have no intention to create any interrupts in the Disk boot. However i will add a PHP/PLP to the Disk Load routine to ensure the previous interrupt state is restored.
A CLI/RTS pair is inappropriate since the disk routine will always assume Interrupts are enabled.
I hate all access to the ROM because it is slow and requires BASIC resources that mess around with Page 2 and 0.
Chema wrote:2. A small C interface for accessing the disk functions. It is easy to add it into the OSDK library as sources (so only included if needed). Should be quite easy to do...
This is Dbug Territory, perhaps he can comment. Please note though that i have not provided the Save or Drive set routine yet. This has to be the next stage. I will be visiting Fabrice on the 15th, and will hopefully get some pointers on how to save data.
Chema wrote:3. Booting is VERY fast, and if it is to be like that, maybe this is something useless, but maybe a start-up message such as Fantasmagoric Booting... could be nice... even if it could be enabled/disabled.
I fail to see why this would be required?
It is wasteful of a very tight 1K already. :P

User avatar
Chema
Game master
Posts: 1972
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Post by Chema » Tue May 06, 2008 7:45 pm

Twilighte wrote: The advantage of this disk routines is that they occupy just 1K from FE00 to FFF9 and don't use Page 0 or Page 2.
Switching ROM can only be done in a program that resides below C000, so i can provide a routine but it will never be integrated into the Disk Routines.
Please also note that Each machines method of enabling ROM is different. This is some of the reason why i supply the Machine type in FFF4.
I see the point... Maybe that could also be a routine to add to the C interface? Problem is that if you are to work with asm only, things are fantastic as they are now, but at the moment you use the C library, the ROM should be active or it won't work...

Anyway it is something that could be well addressed at a later stage indeed.
I have no intention to create any interrupts in the Disk boot. However i will add a PHP/PLP to the Disk Load routine to ensure the previous interrupt state is restored.
A CLI/RTS pair is inappropriate since the disk routine will always assume Interrupts are enabled.
I hate all access to the ROM because it is slow and requires BASIC resources that mess around with Page 2 and 0.
Sorry... my fault there. I thought booting returned with interrupts disabled, so if the first program to launch is a BASIC routine it will fail. I also hate acces to the ROM and BASIC... just imagining how to make it easy to use for everyone (and besides I use a BASIC program to launch Space:1999 :) )
Chema wrote: This is Dbug Territory, perhaps he can comment. Please note though that i have not provided the Save or Drive set routine yet. This has to be the next stage. I will be visiting Fabrice on the 15th, and will hopefully get some pointers on how to save data.
Completely agree. Should be easy to do (I can provide code also, but Dbug knows better the insights of C and how to create routines that behave well, saving registers and such).

If saving data is included it would be really cool!
I fail to see why this would be required?
It is wasteful of a very tight 1K already. :P
Yep. Not required and a waste... I was just stating it would be nice :)

Anyway I would have loved to have such a tool some time ago... Congratulations.

Cheers

User avatar
Twilighte
Game master
Posts: 819
Joined: Sat Jan 07, 2006 12:07 am
Location: Luton, UK
Contact:

Post by Twilighte » Tue May 06, 2008 8:21 pm

Chema wrote:Yep. Not required and a waste... I was just stating it would be nice


To some extent i agree.
Chema wrote:Anyway I would have loved to have such a tool some time ago... Congratulations.
Oh absolutely, such a tool should have been written 10 years ago, then we'd not be facing the prospect now of converting existing demos to this format.

I would also welcome feedback regarding the dskbuilder utility. Currently it handles just binary and tape files, eventually though it would be so cool if it could handle importing images and even samples.
This is all possible, linking into pictconv to convert images.
I also discussed the possibility of using Dbugs packer utility for files.

Ideally this sort of functionality would be best done in a drag drop environment, but at time of going to press i could not get the appropriate code to do that.
Dbug has already suggested things like interleaving, music during load, etc.
Interleaving consists of spacing sectors more widely to make for a smoother and potentially faster load routine.
The fact is that whilst the FDC buffer may be telling the load routine it has bytes for sector 1, the physical disk head is already into sector 2, so by the time the cpu is ready for the next sector, the disk must make a full turn before this sector is available to read again.
This interleaving would be something like the data held on Sectors 1 then 3 then 5 then 7 then 9 then 2 then 4 then 6 then finally 8 before the track is incremented. :P
All a bit complex one may think but perhaps it is more down to sector allocation in dskbuilder than the load routine. :/

User avatar
Dbug
Site Admin
Posts: 2324
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Post by Dbug » Tue May 06, 2008 10:36 pm

I guess bindings for the OSDK should be trivial to do :)
I guess it's also possible to develop a small module, installed in page 4, allowing BASIC or C access to the ROM switching mechanism, and file loading with simple DOKE/POKE/CALL commansd.

As everything, it's probably a first iteration, will be improved with feedback when people start using it.

Having something that helps create compatible disks easily is already something very nice to have :)

User avatar
Twilighte
Game master
Posts: 819
Joined: Sat Jan 07, 2006 12:07 am
Location: Luton, UK
Contact:

Post by Twilighte » Wed May 07, 2008 5:41 pm

One small bug that has cropped up is after you press the refresh button, a tape file will be taken with header for the calculation of number of sectors.
For example, if you create a binary that is 512 bytes long and add a tape header then add to compilation, whilst DSKBuilder recognises it as a tap the calculated number of sectors is 2, not 1 after refreshing the list.
This has now been fixed.
I have also added the PHP/PLP change mentioned previously.
Also added drive selection routine, though not tested yet.
I will also supply the sources for both sectors soon. :P

For the import picture facility, and based on the many options available in pictconv my initial plan is to trigger a second form on adding a recognised picture format which will show a preview and settings for the image file, i will also provide a way out so that the file can just be included as a binary.
If people have other ideas, please let me know. :)

Incidentally, regards EPROM control of FDC, I am not too sure how easy this will be since Jasmin's switch to enable the eprom seems to be mixed into resetting the fdc.
For ROM it is quite straightforward though. However a little unsure if Telestrat has same control register structure($314) as microdisc for controlling ROMDIS?

User avatar
Twilighte
Game master
Posts: 819
Joined: Sat Jan 07, 2006 12:07 am
Location: Luton, UK
Contact:

Post by Twilighte » Sat May 10, 2008 12:00 pm

Hopefully most of the above bugs have now been removed.
I have also added an Import BMP Image file facility, although as yet no resize options are available and only BMP is supported.
However the import facility allows you to preview the PictConv output for the various settings applied. Thanks to Dbug for this great tool. :D

The main window has now slightly changed in that the progress bar has been removed and replaced with the Build Disk Button. And in place of that there is now a modify Image Settings button (Not sure about icon :P).
Also the old "Start Address" column has been changed to "Attributes" (although may change again to "Properties") and shows the conversion options for imported images aswell as Tape start addresses.

Also when you attempt to add a file that doesn't exist DSKBuilder will kick a new window where you can create a new file (enter fill value and size).

Also added Recent projects in Files which picks keeps a record of all projects in osdk/bin/dskb_projects.cfg.

I have also included the boot sector sources in the compilation. They are called Fantasboot.s (fantasmagoric boot sector) and Generic512.s (Load routine, settings and FAT).
http://www.defence-force.org/ftp/forum/ ... er1002.zip

For ROM Switching routine, i wrote this a couple of days ago, not tried it yet and i need to check with Fabrice this is correct switching for all Orics but i provide below as is.

Code: Select all

#define tFDC_Offset     $FFF3

Example
        ;Enable ROM
        lda #2
        jsr ROMSelect
        ...

        ;Disable ROM
        lda #0
        jsr ROMSelect
        ...

;Acc
; Bit 1(2)   ROM Disable(0) or Enable(1)
; Bit 7(128) EPROM Disable(0) or Enable(1) (Only for Microdisc for now)
ROMSelect
        ldy tFDC_Offset
        bmi j_ROMSelect
M_ROMSelect
        eor #128
        sta poke1+1
        lda $0304,y
        and #%01111101
poke1   ora #00
        sta $0304,y
        rts
J_ROMSelect
        and #2
        lsr
        ;Disable/Enable Overlay
        sta $03FA
        eor #1
        ;Disable/Enable ROM
        sta $03FB
        rts

User avatar
Twilighte
Game master
Posts: 819
Joined: Sat Jan 07, 2006 12:07 am
Location: Luton, UK
Contact:

Post by Twilighte » Mon Aug 11, 2008 9:52 am

One bug i have recently found is that if a file in the compilation is not found, the system removes the file from the compilation but continues to build the disk.

I originally thought this a good idea but since discovered it to be an extremely bad idea. Unfortunately my desktop is still inoperable and it won't be fixed until i get that machine back (The language i wrote the util in is on that machine only) :(

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest