Harry Potter Posted June 1, 2021 Share Posted June 1, 2021 Hi! I am working on a port of MadLib for the Atari 8-bit and ran into two problems: 1. the emulated computer beeps many time rapidly upon start-up, and 2. the program crashes after the first screen. I don't know what's causing the beeping--is this normal? But, I think I know what's causing the system crash: the overlays aren't loading properly. I am using cc65 and know how to use fopen() and other ANSI file functions. How do I access a file? Quote Link to comment Share on other sites More sharing options...
danwinslow Posted June 1, 2021 Share Posted June 1, 2021 The 'beeping' is probably the file access noise that is part of OS when reading data from a file, it's probably the boot disk loading. You access a file in CC65 the same way you do in any C environment - you use fopen, fread, fwrite, or fscanf, etc., depending on what you want to do. FILE *f; f=fopen("d1:filename.dat", "r"); ... fread(buffer,len,1,f); and so forth. There are lower levels of access such as the Atari CIO mechanism and even a lower level from C, but that's how you do it in straight C. Then D1: is the 'drive' specification, D1: is teh first drive, D2: is the second, etc. Quote Link to comment Share on other sites More sharing options...
Harry Potter Posted June 1, 2021 Author Share Posted June 1, 2021 Thank you. 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.