Giter Site home page Giter Site logo

foenixretro / f256-superbasic Goto Github PK

View Code? Open in Web Editor NEW
17.0 17.0 10.0 144.05 MB

SuperBASIC for the F256 computers

License: MIT License

Shell 0.13% Makefile 2.51% Assembly 53.63% Python 13.30% C++ 5.33% HTML 6.91% BASIC 1.29% FreeBasic 0.56% C 10.66% TeX 5.19% Batchfile 0.04% ActionScript 0.02% Visual Basic 6.0 0.44%

f256-superbasic's People

Contributors

autismuk avatar csoren avatar paulscottrobson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

f256-superbasic's Issues

Add memory checking

  1. Out of identifier space
  2. Out of alloc() space (also used for arrays)
  3. String temp allocate fails
  4. Insert out of program memory

Image 6 bug

image 6 colour $FF,$0 to 0,0
HFlip / VFlip corrupts centre part - 6 only.

Cascading string parameters don't work.

100 name$ = "Hello"
110 printme(name$)
120 end
130 proc printme(name$)
135 print "[";name$;"]"
140 endproc

prints [] ; if you change 100/110 to name1$ it works fine.

Input without a variable should throw an error

When an input doesn't have a variable argument it basically functions as a print command. This can lead to confusing behaviour as it might not be immediately clear what is wrong. An explicit error would make it immediately clear something is wrong.

Unable to 'ctrl-c' the listing of a procedure

When listing a long procedure (like ml_routines() in Ernesto's sprite editor), it does not seem possible to break the listing with ctrl-c, like you can with 'regular' listing. It would be very handy if this is possible.

Feature request: cursor off/on during storage operations

Since there is no "Loading..." or "Saving..." text and no READY prompt, it would be handy to simply turn the cursor OFF while loading or saving, then back on when complete.

In fairness, it does say "Complete", but cursor control could take care of the indeterminate time required to load/save.

Thanks

Mike / EMwhite

Load etc. fixes

  1. Load EOF is 0 / CS e.g. it's an error
  2. LoadByte vs LoadChar
  3. Validate FN for length, chars contained
  4. Save
  5. Verify (sort of)
  6. Update documentation
  7. Fix release system , make release 19

Math rounding error causing wild out of range results.

Consider the following example:

print 3.14592/2
1.57079

This is okay, though the actual value is 1.57296, some precision loss is to be expected.

And if we subtract these two formulas, the result is still as expected:

print 3.14592/2-3.14592/2
0.00000

But the problem arises if we would try to pass in the first number (already rounded) by the formula:

print 1.57079-3.14592/2
-0.00000

Uh oh. Negative zero? I get that it's an approximation of some negative number very close to zero (-0.00217), but this seems to lead to more significant problems that can crash your program.

Watch what happens if we multiply these formulas:

print (1.57079-3.14592/2)*(1.57079-3.14592/2)
0.00000

In a weird way, this makes sense... but it's not actually any better.

I'll cut to the chase and just show you the whole pattern:

print 1.57079-3.14592/2
-0.00000

print (1.57079-3.14592/2)*(1.57079-3.14592/2)
0.00000

print (1.57079-3.14592/2)*(1.57079-3.14592/2)*(1.57079-3.14592/2)
-0.00000

print (1.57079-3.14592/2)*(1.57079-3.14592/2)*(1.57079-3.14592/2)*(1.57079-3.14592/2)
1073741824.00000

print (1.57079-3.14592/2)*(1.57079-3.14592/2)*(1.57079-3.14592/2)*(1.57079-3.14592/2)*(1.57079-3.14592/2)
-1073741824.1342177280167721600209715200131072000016384000....... continues

Here's a simple test program to illustrate this in a more consumable format:

10    pi#=3.141592
20    for i=1 to 360
30      rad#=i*pi#/180
40      cosrad#=rad#-pi#/2
50      print "Degree: ";:print i,"Rad: ";:print rad#,"CosRad: ";:print cosrad#;
60      print "        >>>    ",cosrad#*cosrad#*cosrad#*cosrad#
70    next

20231022_114205

Feature request: cursor off / on command

It would be very useful to be able to easily turn off and on the blinking cursor with a basic command like: cursor <on/off>.
This way programs can easily hide the cursor when in graphics mode for example and turn it on again when needed.

tabstop width not uniform

Could be by design or historical but the first tab stop (control-i) is at position 9 while the remaining are 8 chars apart.

Thanks
(Mike / EMwhite)

Write CSV functions

CSV Functions ?
-	ItemCount(String,Seperator)
-	ItemGet(String,Index,Seperator) (starts at 1)

SD Card access does not work

When using the latest released version of superbasic (Beta 1) on my Foenix 256 Jr. I am unable to list the directory of an SD card or save a basic program to an SD card. Because saving was not possible I also could not try to load a basic program. When issuing a dir command no error message is printed and no files are listed. A save command results in a storage error. The SD card LED on the board does not light up or blink.

I have tried several cards (16MB SD, 128MB SD, 512MD SD, 2GB SD, 4GB SDHC) which have been formatted on Linux and on Windows using FAT32. When formatting I have tried several different allocation unit sizes (512, 1024, 2048 and 4096 bytes) and I also have repartitioned the cards on Windows. I also had a look at https://github.com/ghackwrench/F256_Jr_Kernel_DOS for additional information but was not able to solve my problem.

Am I just unlucky with my selection of SD cards or is this is a known bug of this version?

As a side note: Listing a directory, save or load work for IEC bus devices (I have checked that with a real 1541 floppy drive and an sd2iec like device.

Description of call statement is missing in documentation and a question about the boot screen

While trying to familiarize myself with my F256 Jr. I stumbled over a few things which might be of interest.

  1. I tried to call an assembly routine which had been written to memory through the assemble statement but was unable to find any info in the documentation about how to achieve this. Through a look into the source code of superbasic I found the implementation of the call statement which does exactly that. To me it seems that some information about the call statement should be added to the documentation.

  2. On the boot screen displayed by my machine (a Revision B board using the latest release of superbasic and the kernel that comes with it) there are four characters which seem to have a different background colour:
    boot_screen
    After noticing that these characters had the correct colour in the boot screen of your emulator I ruled out that this was done on purpose. Even though this does not influence the usability of superbasic in any way I began to wonder whether there is a problem in the initialization of the screen memory.

I also stumbled over a few other minor things (mostly in the documentation). If you are interested in info like that I can open additional issues.

SolarFox, Demo2 and Invaders fail with Out of Range errors

After updating to the 01/03/2023 Beta 1 version of Basic/Kernel, I notice that these two demo games don't work anymore. Both fail in a routine that updates or draws all sprites with an Out of Range error. Perhaps this is caused by the changes in the sprite handling code.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.