English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 10 September 2017, 16:45   #1
ross
Omnia fert aetas

ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 47
Posts: 520
My non-system floppy DOS\0 files loader (OCEAN)

Time for some new goodies.

After some research i've not found a good non-system file loader for floppy
(something exists but w/o source or poorly written or bugged or overbloated or slow or...)
so i've written mine from scratch.

Very dense code ($290 bytes), fast, documented, error resistant and with some nice features.

Attached a .68k (that can be INCBINed, totally PC relative, no buffer required excluding Chip RAM for DMA) and commented source code.

Parameters (from source):
Code:
;****************************** OCEAN LOADER ******************************

;input:		a0=loadaddress (word aligned)
;		a1=filename\0 (""\0 safe)
;		a2=mfmbuffer (chip_ram, word aligned)
;		a3=callback (suba.l a3,a3 if unused)
;		d0=select drive (0,1,2,3)
;		  bit7=1 use previous status (drive/motor), add #-128
;		  bit6=1 no motor off at exit, add #+64
;		  -3 seek to early head position (special), moveq #-3
;		  (imply bit7=bit6=1, used for a clean exit to system)
;
;output:	Z=0->success, d1=file lenght (can be 0, file as a flag)
;		Z=1->error, static.retry=0->read error else file not found
;		[static] contain static data usable by subsequent calls
;
;register:	all preserved but Z and d1 as return code
Why OCEAN? It's a tribute to the famous C64 loader.
With the callback feature I've recreated for fun a loading system with screen color stripes exactly like the original C64 cassettes

Feel free to make comments, suggestions and bugs report.

Enjoy!
ross
Attached Files
File Type: s ocean_loader.s (10.7 KB, 61 views)
File Type: 68k ocean_loader.68k (656 Bytes, 22 views)
ross is offline  
AdSense AdSense  
Old 10 September 2017, 18:16   #2
phx
Natteravn

phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 1,004
Quote:
Originally Posted by ross View Post
Time for some new goodies.
Nice!

Some feedback:

Quote:
documented
Maybe you want to define some offset-symbols with RS for your static structure?

Quote:
error resistant
I didn't study the source in detail, but AFAICS it only reads OFS (DOS\0) file systems? Shouldn't you check that? For example by reading the boot block first?

Quote:
Why OCEAN? It's a tribute to the famous C64 loader.
With the callback feature I've recreated for fun a loading system with screen color stripes exactly like the original C64 cassettes
Now I'm only missing the famous Ocean-loader theme playing in the background!
phx is offline  
Old 10 September 2017, 19:57   #3
ross
Omnia fert aetas

ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 47
Posts: 520
Quote:
Originally Posted by phx View Post
Maybe you want to define some offset-symbols with RS for your static structure?
Static is really tiny and used 'contortively' so better no RS (is definitely a private structure)

Quote:
I didn't study the source in detail, but AFAICS it only reads OFS (DOS\0) file systems? Shouldn't you check that? For example by reading the boot block first?
Yes, only OFS and no check.
You have and need total control; but a base 'return to system loading' is expected and guaranteed (param. d0=-3).
FFS is the next step, but with a separate loader.
It must be usable from bootblock, together with relocator/take_over/decruncher/.. , so dimensions matter
(well, eventually emulating even the behavior of startup-sequence, but this is another story..)

Quote:
Now I'm only missing the famous Ocean-loader theme playing in the background!
Yeahh, my idea too

Best regards,
ross
ross is offline  
AdSense AdSense  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using DOS routines after a system take over majikeyric Coders. General 38 06 July 2017 19:12
Using System DOS commands within SAS-C Zetr0 Coders. System 5 23 April 2017 19:14
Add ability to select PC floppy drive so you can read ADF files from PC Floppy Unicron request.UAE Wishlist 6 07 February 2017 17:12
Legends ( krisalis) DOS version CD or floppy Sandro request.Old Rare Games 10 04 May 2016 21:37
I need Elf (ocean) version for JST hd-loader Iena request.Old Rare Games 2 29 January 2003 01:52

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 11:24.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Page generated in 0.11172 seconds with 15 queries