| Welcome, Guest |
You have to register before you can post on our site.
|
| Online Users |
There are currently 169 online users. » 0 Member(s) | 166 Guest(s) Baidu, Bing, Google
|
| Latest Threads |
Old zxbasic game errors
Forum: Help & Support
Last Post: boriel
Yesterday, 11:52 AM
» Replies: 7
» Views: 139
|
Error: Undefined GLOBAL l...
Forum: Help & Support
Last Post: ardentcrest
2025-11-04, 05:46 PM
» Replies: 3
» Views: 108
|
A Fast(er) Plot Routine f...
Forum: How-To & Tutorials
Last Post: tubz74
2025-10-30, 03:16 PM
» Replies: 2
» Views: 159
|
Hall of Fame - Include fo...
Forum: How-To & Tutorials
Last Post: tubz74
2025-10-28, 03:48 PM
» Replies: 0
» Views: 91
|
[SOLVED] Array layout bug...
Forum: Bug Reports
Last Post: Zoran
2025-10-25, 05:48 PM
» Replies: 2
» Views: 217
|
3DOS Commands?
Forum: Help & Support
Last Post: boriel
2025-10-06, 02:54 PM
» Replies: 3
» Views: 380
|
How to open fuse as an ex...
Forum: How-To & Tutorials
Last Post: zedex82
2025-10-05, 07:36 PM
» Replies: 2
» Views: 280
|
CLS/Fade out ASM Sub-rout...
Forum: How-To & Tutorials
Last Post: tubz74
2025-10-05, 03:39 PM
» Replies: 2
» Views: 271
|
ZX Basic Studio Bugs
Forum: Bug Reports
Last Post: Duefectu
2025-09-23, 04:07 PM
» Replies: 5
» Views: 1,083
|
Printing with FZX
Forum: Help & Support
Last Post: boriel
2025-07-17, 10:08 PM
» Replies: 1
» Views: 1,965
|
|
|
| bug on --org command line argv, missing hex address support |
|
Posted by: nitrofurano - 2018-09-29, 12:03 PM - Forum: Bug Reports
- Replies (2)
|
 |
Since always i used hex values on --org command line argument (zxb.py), it always worked until few months ago - like:
zxb.py code.bas --org=0xC000
Now, since it stopped working, i had to fix all the code i had to something like:
zxb.py code.bas --org=$((0xC000))
(i only tested it on Ubuntu GNU/Linux - i have no idea how fine it works on other operating systems and distributions)
i have no idea what caused that... perhaps some code cleanup on ZX-Basic Compiler? or something else?
|
|
|
| bug on mod (*solved*) |
|
Posted by: nitrofurano - 2018-09-29, 11:36 AM - Forum: Bug Reports
- Replies (1)
|
 |
since few months ago i noticed some weird behaviour from mod operand
Code: dim i as uinteger
cls
do
for i=0 to 65535
print at 9,9;chr$( 48+(i mod 10) )
print at 9,8;chr$( 48+(int(i/10) mod 10) )
print at 9,7;chr$( 48+(int(i/100) mod 10) )
print at 9,6;chr$( 48+(int(i/1000) mod 10) )
print at 9,5;chr$( 48+(int(i/10000) mod 10) )
next
loop
as happened months ago, it is supposed to display a number on screen ranging from 0 to 65535, but the result gets totally messy
(tested on version 1.8.5 now, the result is as messy as 1.6.12)
|
|
|
| Looking for an Inkey$ routine. |
|
Posted by: ardentcrest - 2018-09-16, 01:54 AM - Forum: Help & Support
- Replies (12)
|
 |
I'm thinking of re-doing my spectranet client but I need a good inkey$ input routine. the one I have ether misses keys presses or does multi letters.
I am using
#include <input.bas>
#include <keys.bas>
Code: MAIN:
NETmainloop()
gosub NETinputloop
NETmainloop()
goto MAIN
NETinputloop:
for timeout=0 to 1500 : next timeout
if rowx=0 then printat64(22,0):print64(xx$+" "):goto NetJump1 : end if
FOR ii = 0 TO rowx : printat64(22,ii):print64(chr$(peek (@MyLabel + ii))) : NEXT ii : print64(xx$+" ")
NetJump1:
let k=code inkey$ : for timeout=0 to 1500 : next timeout
if k>31 and k<128 then goto NetKeyPress : end if
if k=13 then goto senddata : end if
if k=12 then goto NetDeleteKey : end if
return
NetDeleteKey:
if rowx=0 then goto NETinputloop : end if
POKE (@MyLabel + (rowx-1)), 0
let rowx = rowx - 1
return
NetKeyPress:
if rowx=length then goto NETinputloop : end if
POKE (@MyLabel + rowx), k
let rowx = rowx + 1
return
senddata:
printat64(22,0):print64(" ")
POKE (@MyLabel + rowx), 13
POKE (@MyLabel + rowx+1), 10
poke (@MyLabel2),(rowx+2)
poke (@MyLabel2+1),0
send2()
NETline()
for ii=0 to rowx+1 : POKE (@MyLabel + ii), 0 : next ii
let rowx=0
return
END
any hekp
|
|
|
| [msx] v9990 experiences |
|
Posted by: nitrofurano - 2018-09-09, 10:00 AM - Forum: Other Archs
- No Replies
|
 |
starting some experiences using Yamaha v9990 display processor - <!-- m --><a class="postlink" href="https://gitlab.com/nitrofurano/borielzxbasicexamples/tree/master/examples/z80/msx/demos/Experiences_Video9990">https://gitlab.com/nitrofurano/borielzx ... _Video9990</a><!-- m -->
|
|
|
| Inconsistency in RND |
|
Posted by: Alessandro - 2018-08-05, 07:21 PM - Forum: Help & Support
- Replies (5)
|
 |
If I write this simple program:
Code: DIM u as UBYTE
10 let u =rnd*40
print u
pause 0
if code inkey$=13 then stop
40 goto 10
a number between 0 and 40 will be shown at every pressing of ENTER.
However, inside of a larger program, this instruction:
Code: DIM x AS UBYTE
...
x = rnd*40
always returns 38 when executed.
Also, the RND of the first example always returns exactly the same sequence when started afresh, at least under emulation (Spectaculator): 9, 34, 15, 7, 16, 25, 13, 37, 7, 24, 19 etc.
In the past I used a simple routine (by John Connolly) to generate random numbers. Here it is, modified to let it return values from 0 to 31:
Code: LD A,R
AND %00011111
LD (address),A
When placed in a ZX-Basic listing as a subroutine, it will always return the first value. The only way to make it work is to assemble it elsewhere and call it from within ZX-BASIC with the usual RANDOMIZE USR call, then assign the PEEK [address] to a variable.
|
|
|
| Multiplication result greater than 255 in UINTEGER var |
|
Posted by: LukeBord1 - 2018-05-30, 09:42 AM - Forum: Help & Support
- Replies (2)
|
 |
First of all, as usual, sorry if this was discussed before... at a first sight around the arguments, i didn't find a solution.
The below code works till the "32*(PEEK 32044)" multiplicaton returns a a value within 255, but why?...
Code: REM 32043 and 32044 store line and column values
REM the routine should return the screen attr address
DIM a AS UINTEGER
a = 22528+PEEK 32043+(32*(PEEK 32044))
REM it doesn't work if the result of the multiplication exceeds 255!
|
|
|
| Clarification about HEAP |
|
Posted by: LukeBord1 - 2018-04-18, 09:49 PM - Forum: How-To & Tutorials
- Replies (6)
|
 |
I tried for months to make a compiled intro menu for my Arcade Game Designer projects without success... even storing the compiled menu program in a free memory area (below the AGD code), the game always crashed.
Finally I realized the importance of the HEAP setting in ZXB !
Reading various posts in this excellent forum, Boriel explained that the HEAP setting is a reserved memory area for string variables (please correct me if I'm wrong), and the memory allocation for this parameter is 4768 bytes by default !
So the light turned on and it seems I've finally discovered the cause of the memory collisions...
Since my Basic menu is very simple, including just a couple of UBYTEs without handling any string variable, I tried to set the HEAP to a minimum value like this:
Code: zxb menu.bas --org=25000 --heap=128
...the magic is done... no crashes and a perfect compiled intro menu for my AGD game!
Now... I just wonder what could be the minimum HEAP setting when there's no string variables at all... and the reason why such an important parameter is just quoted in the ZXB command-line page without any further information !?
|
|
|
|