Welcome, Guest |
You have to register before you can post on our site.
|
Online Users |
There are currently 313 online users. » 0 Member(s) | 309 Guest(s) Bing, Facebook, Google, Yandex
|
Latest Threads |
Includes in ASM
Forum: How-To & Tutorials
Last Post: bracckets
04-04-2024, 12:17 AM
» Replies: 2
» Views: 566
|
Intermittent errors
Forum: Help & Support
Last Post: zarsoft
03-12-2024, 12:39 PM
» Replies: 0
» Views: 323
|
Store array information i...
Forum: Help & Support
Last Post: rbiondi
03-10-2024, 09:42 PM
» Replies: 0
» Views: 419
|
ScrollLeft function scrol...
Forum: Bug Reports
Last Post: rbiondi
03-07-2024, 03:57 PM
» Replies: 2
» Views: 829
|
string.bas errors when co...
Forum: Bug Reports
Last Post: rbiondi
03-01-2024, 10:10 AM
» Replies: 2
» Views: 738
|
Using Beepola with ZX BAS...
Forum: How-To & Tutorials
Last Post: edtoo
02-29-2024, 09:47 AM
» Replies: 15
» Views: 32,861
|
Johnny Bravo
Forum: Gallery
Last Post: zarsoft
02-11-2024, 11:20 PM
» Replies: 0
» Views: 488
|
Compiling +D G+DOS progra...
Forum: ZX Basic Compiler
Last Post: boriel
01-22-2024, 08:32 AM
» Replies: 4
» Views: 8,689
|
VAL = ? (solved)
Forum: Bug Reports
Last Post: zarsoft
01-03-2024, 11:44 PM
» Replies: 8
» Views: 3,256
|
Wrong math (solved)
Forum: Bug Reports
Last Post: zarsoft
01-03-2024, 11:38 PM
» Replies: 4
» Views: 1,781
|
|
|
Includes in ASM |
Posted by: bracckets - 03-27-2024, 03:16 PM - Forum: How-To & Tutorials
- Replies (2)
|
|
Is it possible to use assembler includes in the inline ASM code blocks
so the assembler can be broken down into files, e.g.
INCLUDE maths.asm
Also is it possible to include binary files in the assembler e.g.
BINARY 'test.bin'
Thanks
|
|
|
Intermittent errors |
Posted by: zarsoft - 03-12-2024, 12:39 PM - Forum: Help & Support
- No Replies
|
|
I have a subroutine that works well most of the time but sometimes gives an error.
Once every few hundred iterations it gives an error.
I tried changing the mathematical expression but it continues to give errors - sometimes in the old expression, other times in the new expression.
Intermittent errors also occur on other lines of this routine.
I tried changing the type of variables but it also gave errors.
Am I doing something wrong or is the compiler wrong?
If I delete most of the program the intermittent error may continue to appear or may stop appearing.
Does anyone have any idea what could be causing this?
Simplified routine:
Code: SUB print_sprite (x0 AS LONG, y0 AS LONG)
DIM x,y AS LONG
DIM Width,Height AS LONG
DIM xold AS LONG
LET xold=x0-INT(SPRITES(ix_SpriteWidth)/2)
LET Width=SPRITES(ix_SpriteWidth)
LET x=x0-INT(Width/2)
IF x<>xold THEN PRINT AT 10,10;" xold=";xold;" x=";x: PAUSE 0
END SUB
LET SPRITES(ix_SpriteWidth) = 8
print_sprite(236,46)
' sometimes printout is
xold=232 x=236
'x in error
print_sprite(84,90)
' sometimes printout is
xold=84 x=80
'xold in error
|
|
|
ScrollLeft function scrolling more than 1 pixels left |
Posted by: rbiondi - 03-01-2024, 10:42 AM - Forum: Bug Reports
- Replies (2)
|
|
Hello,
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:
Code: #include <scroll.bas>
INK 7
PAPER 0
CLS
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
END SUB
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)
DIM alfa AS UINTEGER
DIM beta AS UINTEGER
DIM mx AS UINTEGER
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
END SUB
square(10, 15, 80, 60, 6)
DIM dia AS INTEGER
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!
|
|
|
string.bas errors when compiling with strict |
Posted by: rbiondi - 02-23-2024, 11:29 AM - Forum: Bug Reports
- Replies (2)
|
|
Hello,
I'm trying to compile my program with --strict option and getting some errors in string.bas:
Code: 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,
Rogerio
|
|
|
Mimex |
Posted by: rbiondi - 12-31-2023, 11:08 PM - Forum: Gallery
- No Replies
|
|
Hi,
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 , 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;
Best regards and a happy new year to all!
Rogerio Biondi
More info:
https://rbiondi.itch.io/mimex
|
|
|
|