Welcome, Guest
You have to register before you can post on our site.



Search Forums

(Advanced Search)

Forum Statistics
» Members: 288
» Latest member: edtoo
» Forum threads: 1,025
» Forum posts: 6,206

Full Statistics

Online Users
There are currently 159 online users.
» 0 Member(s) | 157 Guest(s)
Bing, Google

Latest Threads
ScrollLeft function scrol...
Forum: Bug Reports
Last Post: boriel
Yesterday, 09:17 AM
» Replies: 1
» Views: 31
string.bas errors when co...
Forum: Bug Reports
Last Post: rbiondi
03-01-2024, 10:10 AM
» Replies: 2
» Views: 98
Using Beepola with ZX BAS...
Forum: How-To & Tutorials
Last Post: edtoo
02-29-2024, 09:47 AM
» Replies: 15
» Views: 28,632
Johnny Bravo
Forum: Gallery
Last Post: zarsoft
02-11-2024, 11:20 PM
» Replies: 0
» Views: 146
Compiling +D G+DOS progra...
Forum: ZX Basic Compiler
Last Post: boriel
01-22-2024, 08:32 AM
» Replies: 4
» Views: 7,635
VAL = ? (solved)
Forum: Bug Reports
Last Post: zarsoft
01-03-2024, 11:44 PM
» Replies: 8
» Views: 1,445
Wrong math (solved)
Forum: Bug Reports
Last Post: zarsoft
01-03-2024, 11:38 PM
» Replies: 4
» Views: 762
Version 1.7.2 released!
Forum: ZX Basic Compiler
Last Post: boriel
01-01-2024, 07:38 PM
» Replies: 0
» Views: 237
Forum: Gallery
Last Post: rbiondi
12-31-2023, 11:08 PM
» Replies: 0
» Views: 214
Rounding float numbers to...
Forum: How-To & Tutorials
Last Post: rbiondi
12-31-2023, 02:33 PM
» Replies: 2
» Views: 417

  ScrollLeft function scrolling more than 1 pixels left
Posted by: rbiondi - 03-01-2024, 10:42 AM - Forum: Bug Reports - Replies (1)


I'm trying to use the ScrollLeft function to create a scrolling chart and the ScrollLeft function seems to be scrolling more than 1 pixel left. 
The screening area on the left also seems to be not to be pixel acurate. 

Sample program:

#include <scroll.bas>

sub square(x1 as UBYTE, y1 as UBYTE, x2 as UBYTE, y2 as UBYTE, color as UBYTE)
    DIM x AS UBYTE = 0
    DIM y AS UBYTE = 0
    FOR x = 0 TO x2 - x1
        PLOT INK color; x1 + x, y1
        PLOT INK color; x1 + x, y2
    NEXT x
    FOR y = 0 TO y2 - y1
        PLOT ink color; x1, y1 + y
        PLOT ink color; x2, y1 + y
    NEXT y
SUB plott(x as FLOAT, y as FLOAT, sx as FLOAT, sy as FLOAT, x1 as UBYTE, y1 as UBYTE, x2 as UBYTE, y2 as UBYTE, color as UBYTE)
    alfa = ((x/sx) * (x2 - x1)) + x1
    beta = ((y/sy) * (y2 - y1)) + y1 + ((y2-y1)/2)
    ' Limites da tela
    IF alfa >= x2 - 1 then alfa = x2 - 1
    IF beta <= y1 + 1 then beta = y1 + 1
    mx = alfa mod x2
    IF alfa >= (x2-1) then
        ScrollLeft(x1 + 1, y1 + 1, x2 - 1, y2 - 1)
        alfa = x2-1
    END IF
    PRINT at 10,10; "alfa: "; alfa
    PRINT at 11,10; "beta: "; beta
    PLOT ink color; alfa, beta
square(10, 15, 80, 60, 6)
DIM valor AS float = 0
DIM incremento AS FLOAT = 1
' Create a sample scrolling chart
FOR dia = 1 TO 5000
    plott(dia, valor, 360, 100000, 10, 15, 80, 60, 6)
    valor = valor + 1000 * incremento
    IF valor > 49000 then incremento = -1
    IF valor < -49000 then incremento = 1
NEXT dia

Thank you very much!

Print this item

  string.bas errors when compiling with strict
Posted by: rbiondi - 02-23-2024, 11:29 AM - Forum: Bug Reports - Replies (2)


I'm trying to compile my program with --strict option and getting some errors in string.bas:

zxbasic/src/arch/zx48k/library/string.bas:124: error: strict mode: missing type declaration for 's$'

I just fixed and tried to create a branch and send a merge request to zxbasic git repository but I'm not authorized.

Thank you,

Print this item

  Johnny Bravo
Posted by: zarsoft - 02-11-2024, 11:20 PM - Forum: Gallery - No Replies

To play online, click HERE.

[Image: Johnny%20Bravo%20-%20Run%20Johnny%20Run%...oft%5d.png]

Print this item

  Version 1.7.2 released!
Posted by: boriel - 01-01-2024, 07:38 PM - Forum: ZX Basic Compiler - No Replies

Well, long time I don't announce new releases here (usually goes to Twitter or Mastodon).

  • ! Fixes bugs related to using CONST strings
  • ! Fixed a bug with local Arrays of Floats
  • ! Fix PEEK (ULong, ...)
  • Other minor errors fixes and improvements
  • NextTool is now directly executable

Download it here: https://zxbasic.readthedocs.io/en/latest/archive/

Print this item

Photo Mimex
Posted by: rbiondi - 12-31-2023, 11:08 PM - Forum: Gallery - No Replies


I hope you and your families had a Merry Christmas.

I'm publishing this post before the end of this year (2023)  to announce a new game in development for the ZX Spectrum Computers (ZX Spectrum 128 and ZX Spectrum Next).

BOVESPA (B3) is the Brazilian Stock Exchange. It was formerly called "Bolsa de Valores de São Paulo"  before changing its name to B3 (Brasil, Bolsa, Balcão), founded on August 23, 1890.

If you want to know more about B3, follow this link.

MIMEX is a game inspired by the Magnavox Odyssey 2 game "The Great Wall Street Treasure Hunt" from the Strategy Series. 
Odyssey 2  was marketed here in Brazil by Philips and this was my first videogame.  I received it from my parents as a Christmas Gift, in 1983, with the large Wall Street box, that was the first game I played on this system. It was a deception because I was only 8 years old and could barely pass the Level 1 game (buy and sell stocks). But 40 years passed since then and now I'm older, stronger, smarter and faster Wink , and I'm finishing my MBA in Capital Markets and Investments, so I just wanted to recreate a much improved version of the childwood game with the following features:

- Buy and Sell Stocks (Level 1);
- Buy and Sell Treasure Bills (Improved Level2);
- Buying on Margin (Improved Level 3);
- Buy and Sell PUT or CALL Options (Improved  Level 4);
- IR (Investor Relations Events) - 1:2 splits, 2:1 grouping, dividend payments, judicial recoveries and bankruptcies;
- Much Improved Market Engine, written from scratch;
- Updated tickers (Brazilian B3);
- Updated news headlines; 

Other improvements in consideration:

- 4 Players (instead of the original 2 players);
- Game length selection (1 - 5 years) ;
- Other secret improvements to be disclosed in the future;

[Image: dI%2BeNV.png]

Best regards and a happy new year to all!
Rogerio Biondi

More info:

Game Page

Print this item

  Rounding float numbers to 2 decimal places
Posted by: rbiondi - 12-29-2023, 10:41 PM - Forum: How-To & Tutorials - Replies (2)


I need to round or at least truncate a Float variable to 2 decimal places.
Do you know how this could be accomplished since there's no ROUND function?

Thank you very much,

Print this item

  Jesus versus The Romans
Posted by: zarsoft - 12-27-2023, 12:51 AM - Forum: Gallery - No Replies

To play online click HERE
[Image: Jesus%20versus%20The%20Romans%20(Boriel)...oft%5d.png]

Print this item

  From Forum
Posted by: zarsoft - 12-07-2023, 02:54 PM - Forum: Wishlist - Replies (1)

Email notifications from the Forum come from "Forum".


Can you change 
Forum <forum@boriel.com>
Boriel Forum <forum@boriel.com>
ZX BASIC Forum <forum@boriel.com>

or something like that?


Print this item

Posted by: zarsoft - 12-07-2023, 02:47 PM - Forum: Help & Support - No Replies

I want to include the file "utils.h" on all my programs.

Is there a way I can do this automatically 
without writing inside my program 
and without writing on the compiler command line?

Can I put this line
#include <utils.h>
inside some compiler file from src\arch\zx48k\library ?

I want this behave like it was on the first line of my program.

Print this item

  Array FLOAT only works if global (solved)
Posted by: zarsoft - 11-14-2023, 12:45 AM - Forum: Bug Reports - Replies (4)

This program only works if the array is global.

Is this supose to work like this?

SUB Test
DIM T(3) AS FLOAT => {0.5,1.5,2.5,3.5}

FOR i = 0 TO 3
  PRINT "T(";i;")= ";T(i)

T(0) = 0.5
T(1) = 1.5
T(2) = 2.5
T(3) = 3.5

FOR i = 1 TO 3
  PRINT "T(";i;")= ";T(i)



Print this item