English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. Blitz Basic

 
 
Thread Tools
Old 20 November 2015, 15:45   #1
LuMan
Amigan - an' lovin' it!!
 
LuMan's Avatar
 
Join Date: Nov 2010
Location: Nottingham, UK
Age: 55
Posts: 557
File Access From Within Blitz Basic 2

Hi all. Apologies if this has been covered, but I've searched EAB and Google, but can't quite see what I'm after....

Issue:
I have been working more on my GogoPogo game and have built routines to load levels from disk. This is working fine when using the 'Compile/Run' command within Blitz, as well as creating an executable which I then run from a command line within Workbench (i.e. I hit R-A+E and type in 'Pogo1ogo' to launch from the floppy).
However, when I use the 'pogo' instruction from within a Startup-Sequence the game starts to load and then stops.....

What I know:
In order to use file access you need to drop out of BLITZ mode and into AMIGA mode. I actually use the QAMIGA directive, as it maintains the display. I also throw in a VWait 100 to ensure the drive has stopped before going back into BLITZ mode. This works fine within workbench, but still hangs when using a bootable floppy.

Solution?
I'm of the impression that when I boot from the floppy there is no semblance of WB (or CLI, probably) and the executable is not able to access the drive following the QAMIGA (or even AMIGA) command. This means that the program will sit and wait until it gets the OK from either WB or CLI... Which won't happen..

Is there a way around this?

For example, can I have a minimalist OS running that allows file access from within a Blitz-made executable? Or is there another way of instructing Blitz to access files without using the native OS approach?

Am I missing something bloody obvious????

In the interim, I'll continue with my GogoPogo game (which now runs super-fast, even on my 2MB A600, and has a title screen and opening tune) as a WB-launch game only and then add boot-ability if I get too tight on RAM.

Thanks in advance
LuMan is offline  
Old 20 November 2015, 20:05   #2
Graham Humphrey
Moderator
 
Graham Humphrey's Avatar
 
Join Date: Jul 2004
Location: Norwich, Norfolk, UK
Age: 37
Posts: 11,168
Looking at your description of the problem, I think you're probably heading down the wrong path here. You should be able to boot from floppy and it should just work, if it works from your WB (presumably from a hard drive?).

Two reasons why it wouldn't that spring to mind are:

1) You're using paths for your files that exist on your HD but aren't the same from floppy (unlikely I think), or

2) You've got some libraries missing that are on your system but not your boot floppy, which can cause it to lock up like you describe (I've had this myself).

It's not easy to know exactly what libraries it needs so maybe it's worth running something like SnoopDOS from your Workbench and inspect its output to see what it's accessing? Or just make sure you've got mathrans.library at least in your floppy's Libs directory, and if you're using different fonts, make sure diskfont.library is there too. If that doesn't work, when I'm home I'll check what libraries are on my Maxwell Mouse boot floppy and let you know so you can replicate that. Good luck (and looking forward to seeing the game finished)!
Graham Humphrey is offline  
Old 22 November 2015, 21:23   #3
LuMan
Amigan - an' lovin' it!!
 
LuMan's Avatar
 
Join Date: Nov 2010
Location: Nottingham, UK
Age: 55
Posts: 557
Thanks, Graham. Although I've been stretching my Blitz knowledge with respect to coding, I've not really looked into what other bits and bobs may be required when popping in and out of Blitz mode..!

I'm back in front of my miggy in the morning, so I'll try moving those libraries across and see what happens. Failing that, I'll crank up SnoopDOS.

Thanks v much for the hint
LuMan is offline  
Old 23 November 2015, 21:07   #4
LuMan
Amigan - an' lovin' it!!
 
LuMan's Avatar
 
Join Date: Nov 2010
Location: Nottingham, UK
Age: 55
Posts: 557
Well, Mr H, you are a genius!

I created a Libs directory and copied the mathtrans and diskfont libraries across. I got an "Insert Env: in any drive" error on the first reboot, but a quick addition of 'C/assign' and a line in the Startup-Sequence resulted in the thing loading up without issue

Thanks again for the steer
LuMan is offline  
Old 24 November 2015, 08:23   #5
Graham Humphrey
Moderator
 
Graham Humphrey's Avatar
 
Join Date: Jul 2004
Location: Norwich, Norfolk, UK
Age: 37
Posts: 11,168
Nice one, really glad you got it working and cleared another little obstacle
Graham Humphrey is offline  
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
[blitz basic] How much amiga-blitz friendly is this? saimon69 Coders. Blitz Basic 105 21 April 2022 19:45
Blitz basic 2 Help Havie Coders. Blitz Basic 30 08 September 2013 09:15
blitz basic petza request.Apps 11 08 April 2007 01:49
Blitz Basic 2 anyone? jobro request.Apps 12 28 November 2005 18:15
Blitz Basic 2 LaundroMat Retrogaming General Discussion 5 24 July 2001 08:10

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 07:02.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.07407 seconds with 12 queries