Skip to content

Unable to load files in FB.COM after modifying editor colors #110

Closed
@taylor-madeak

Description

@taylor-madeak

Summary

I am encountering the oddest issue. What I'm trying to do is very simple, on the face of it: just modify the editor colors to white-on-black instead of the Atari default light-grey-on-blue. I was able to track that down in the source code to this section:

fastbasic/src/editor.bas

Lines 654 to 659 in 55dc52f

' Initializes editor device
PROC InitScreen
graphics 0
poke @@LMARGN, $00
poke @KEYREP, 3
ENDPROC

The change I'm making is incredibly small, simply adding two setcolor statements to the InitScreen procedure to end up with:

 PROC InitScreen 
   graphics 0 
   setcolor 1,0,14
   setcolor 2,0,0
   poke @@LMARGN, $00 
   poke @KEYREP, 3 
 ENDPROC 

It compiles without issue and, when loaded up in either an emulator or on real hardware, the colors work as expected.

But I can't load files from any device. The initial HELP.TXT file is loaded on start, but attempting to load any other file - even the same HELP.TXT file - results in 130 I/O ERROR.

For a sanity check, I did a hard reset to HEAD a clean make. The resulting ATR and FB.COM binary is able to load files without issue. It's only when I modify that editor.bas file that I encounter this problem.

I'm not sure if I'm doing something wrong here, or if this is a bug, or a problem with my toolchain. Any guidance this community can offer me would be awesome.

Reproduction Steps

  1. Check out the v4.7 tag to ensure working from the current stable source.
  2. Edit src/editor.bas and insert setcolor 1,0,14:setcolor 2,0,0 into the InitScreen procedure.
  3. Compile the code.
  4. Boot the fastbasic.atr in either an emulator or on hardware.
  5. Run FB.COM.
  6. Press CTRL+L and attempt to load D:HELP.TXT.

Dev Environment

OS: Ubuntu 24.04 derivative (Pop!_OS)

Run Environment

Emulator: Atari800 v4.2.0
Hardware: Atari 800XL w/U1MB (SpartaDOS X 4.49)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions