mmoec Posted May 1, 2020 Share Posted May 1, 2020 Hello, I have a bit of a dilemma I was hoping I could get some advice on. I am writing a game in Atari Basic on my 800XL, with a Happy 1050 drive, version 7.1. I wrote a separate program to design the rooms, add them to a string variable, and then save them to a disk. Each room contains one full DD sector of information (256 bytes), using MyDos 4.53. I'm using the Atari NOTE and POINT commands to randomly access files on the disk, so that I can edit and save information one room at a time. The problem I'm having is that Happy will not save the information immediately, rather it will wait until it accumulates several sectors (I'm not sure how many) before it will write to the disk. I've read the Happy Instruction Manual, and apparently this is normal. I've tried leaving Fast Write turned off, and setting the Off Delay to it's fastest and slowest settings (A-Z), and even setting the drive to UnHappy mode, but still the same thing occurs. This just won't do for what I'm trying to do, and I was wondering if someone here knows of a way to "Force" Happy to write to a disk, please keeping in mind my programming skills are limited to just Basic. Thanks! Quote Link to comment Share on other sites More sharing options...
evilmoo Posted May 1, 2020 Share Posted May 1, 2020 Are you sure this is a function of the Happy drive and not of DOS? Have you tried closing the file and reopening it to flush any buffers? Are you checking for errors upon return from POINT and WRITE? Quote Link to comment Share on other sites More sharing options...
mmoec Posted May 1, 2020 Author Share Posted May 1, 2020 1 hour ago, evilmoo said: Are you sure this is a function of the Happy drive and not of DOS? Have you tried closing the file and reopening it to flush any buffers? Are you checking for errors upon return from POINT and WRITE? Several people suggested opening and closing the file every time, as apposed to just leaving the file open, and that actually did the trick. Thanks all! 1 Quote Link to comment Share on other sites More sharing options...
+Larry Posted May 16, 2020 Share Posted May 16, 2020 On 5/1/2020 at 12:32 AM, mmoec said: Several people suggested opening and closing the file every time, as apposed to just leaving the file open, and that actually did the trick. Thanks all! You may have already thought of this, but since this is Basic, what I always do is set up a "housekeeping" subroutine at 32000, then you can "GOTO" in immediate mode. I always add this on in sections depending on what you are trying to accomplish. At a minimum, I always have 32767 SAVE "D:programx.BAS" Saves a lot of typing. I think this would work in your situation, too (although I didn't try it). Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.