16 March 2016, 20:27 | #1 |
Registered User
Join Date: Mar 2016
Location: Australia
Posts: 881
|
trackdisk.device after system takeover
I assume trackdisk.device off limits once you have taken over the system and almost certainly overwritten system data structures in chip ram ?
I am talking about a non system friendly, bootblock launched program here. I am guessing this is why people use custom track loaders ? If this is the case, any pointers to a good track loader ? |
16 March 2016, 21:14 | #2 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,360
|
Rob northen track loader is very good. Can be ripped from most team 17, core design or renegade titles. Ex qwak
|
17 March 2016, 00:47 | #3 |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,652
|
Trackdisk.device I remember I used it at the very start before I made my own. Should be no problem to use it after turning off the system tho? Just don't disable disk DMA or overwrite all chipmem down to $100.w obviously.
|
17 March 2016, 21:54 | #4 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,553
|
It isn't that simple. trackdisk.device needs interrupts, needs working timer.device and other parts of the system. Also track buffer is in low chip RAM (and not that low if system is chip ram only with multiple disk drives..)
Just don't do it |
17 March 2016, 22:00 | #5 | |
Going nowhere
Join Date: Oct 2001
Location: United Kingdom
Age: 50
Posts: 9,016
|
Quote:
However, the main reason for not using it is simply down to memory usage.....it just eats up too much damn ram. Everything has to be system friendly allocated, and then allocate programs on the fly and not have them hardcoded to specific addresses. With system resources, any open libraries/devices, and trackbuffer for trackdisk.device, you simply lose to much ram if for instance you wish to make the game load on 512k machines, hence why people binned the system and were able to access all memory. |
|
17 March 2016, 22:05 | #6 | |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,553
|
Quote:
EDIT: I am just too annoyed with old demos and others that breaks if more than 1 floppy drive is enabled only because they used far too low absolute load or decrunch address. (I don't mind absolute addresses in old productions, as long as it isn't used too stupidly) Last edited by Toni Wilen; 17 March 2016 at 22:17. |
|
17 March 2016, 23:22 | #7 |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,652
|
Cowering as if expecting a hammer blow from above, I still ask: are you sure?
Well obviously as for a hardware loader you'd need the two disk interrupts on, but that's still OS off for me Reason is as you've said a lot of old prods do this and it seems to work fine for just loading parts sequentially if you don't overwrite low mem. I still recommend a hardware trackloader, for the same reason as you, more memory usable for the good stuff. And much faster speed. To soften the blow, since Amiga Future Magazine #116 is now sold out I guess it's OK to upload BootLoader.S to my repository. It's just my old tested and true trackloader in a bootblock, nothing too special but fast and simple to use. Any include files it needs will be in the repository or in the first two articles on Coppershade. Last edited by Photon; 17 March 2016 at 23:33. |
18 March 2016, 01:08 | #8 |
Registered User
Join Date: Mar 2016
Location: Australia
Posts: 881
|
Thanks everyone. And thanks Photon, that's exactly what I was looking for. Can't wait to give it a try.
Didn't want to try and re-invent the wheel. The few trackloaders I did try didn't seem to work on newer machines. |
18 March 2016, 08:06 | #9 | |
Registered User
Join Date: Mar 2016
Location: Australia
Posts: 881
|
Quote:
|
|
18 March 2016, 11:16 | #10 |
ex. demoscener "Bigmama"
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 1,637
|
if you just need to load something from the boot block, trackdisk.device is already open. IIrc, the IO struct is pointed to by A1.
|
18 March 2016, 21:04 | #11 | |
Registered User
Join Date: Mar 2016
Location: Australia
Posts: 881
|
Quote:
Also I like the way with Photon's boot loader that now I am in complete control of all ram. |
|
19 March 2016, 04:46 | #12 |
Registered User
Join Date: Mar 2016
Location: Australia
Posts: 881
|
In case anyone reading this uses Photon's bootloader with vasm, there is a small catch.
Code:
MFMchk: dc.l 0 dc.w 0 ;reserved for your use. LoadVector: bra.w LoadMFMB ;for external calls, JSR ($11c).w LoadScript: ;At $120, sysinfo in 4 regs, a6=$dff002 lea CPUinfo(PC),a3 ;Use this for PC-rel in a pinch. Last edited by alpine9000; 19 March 2016 at 04:47. Reason: typo |
19 March 2016, 16:37 | #13 | |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,537
|
Quote:
By default vasm will never optimize a branch when a size-extension was specified. Either you are using the -phxass compatibility flag, or -opt-allbra. |
|
19 March 2016, 18:15 | #14 |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,652
|
Auto-optimization isn't a bad option per se (nor is manually invoked branch optimization), it's just that for jump tables (that use relative branches, to get 0 relocs), you want an assembler directive to not optimize the table. It's the same with any decrunch routines, music players, etc. You just have to look out for it.
Last edited by Photon; 19 March 2016 at 22:41. |
19 March 2016, 18:36 | #15 |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,537
|
Right. The developer should always have the full control about which sequences may be optimized and which not.
With vasmm68k you can control it by explicitely writing the instruction's size-extension, which you did, so everything is fine. |
19 March 2016, 19:41 | #16 |
Registered User
Join Date: Mar 2016
Location: Australia
Posts: 881
|
Yes - my fault. I am/was using -phxass as I was originally using vbcc then copied it's options when I switched to vasmm68k.
|
20 March 2016, 06:38 | #17 |
Registered User
Join Date: Mar 2016
Location: Australia
Posts: 881
|
Wow, what a ride I just went on.
After incorporating Photon's trackloader into my bootblock, I moved onto using it to load data in my main application. Everything was working nicely (I still need to ask what the "step0" thing it all about ). I was loading image data from various places on the disk and displaying it. However there was one group of sectors on the disk that always showed corrupt or missing data (About 10 interlaced HAM scan lines worth). I obviously assumed it was something I was doing wrong, so spent quite a while double checking things, but while I found lots of things I was doing wrong, none of them caused that problem. This was using FS-UAE on a mac. I was about to start debugging the trackloader to help work out what I was doing wrong and I switched to WinUAE on a PC, and all of a sudden no problem. Then I tried FS-UAE on the same PC and no problem. Then I nuked my "FS-UAE" folder on my mac, and loaded it fresh and no problem. Strangely on the bad FS-UAE config, it also worked fine as an A1200 or A4000. Still no idea what caused that weirdness. I have a copy of the bad config folders, so will probably look into it again one day. Might have been related to trying a development version of FS-UAE. |
20 March 2016, 16:12 | #18 | |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,537
|
Quote:
When I'm preparing DD disks for real hardware tests then I have to format them two or three times before they keep the data without read/write errors. |
|
21 March 2016, 03:51 | #19 |
Registered User
Join Date: Mar 2016
Location: Australia
Posts: 881
|
Probably punishment for me abandoning the amiga for so long. Hopefully the punishment doesn't last 25 years
|
21 March 2016, 08:35 | #20 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,553
|
Probably not reason for this problem but it can make testing in emulator tricky because emulators in accurate modes are usually designed to not be "random" (for easier debugging).
Starting same program twice (by stopping and starting emulator and having disk in drive when starting) will make 100% identical runs. If program has some timing bug that for example can happen only every 1000th run on real hardware but if it happens in emulator, it will also happen every time! (and vice versa). In worst case you can have bug that happens every second run on real hardware but never in emulator.. Fortunately it is easy to confirm: boot without disk in drive and insert it only after "insert disk" screen appears or use keyboard reset (not GUI reset button). This changes timing/disk initial rotational position. Do the reset few times to be sure. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
startup/system takeover | sidewinder | Coders. General | 15 | 28 February 2016 16:33 |
PC-size floppy disk image loads as trackdisk format | mark_k | support.WinUAE | 1 | 02 January 2015 20:06 |
REMAKE: Fatboy slim - Rockafeller Skank (Mulder Urban Takeover Remix) | adrdesign | request.Modules | 2 | 26 November 2013 22:09 |
Trackdisk and Diskspare | exoticaga | support.Other | 11 | 09 April 2009 20:27 |
uaehf.device and HDToolbox: Error 224 reading device description | Ebster | support.WinUAE | 3 | 16 September 2008 09:24 |
|
|