The following warnings occurred:
Warning [2] Undefined array key "rar" - Line: 4649 - File: inc/functions.php PHP 8.2.31 (Linux)
File Line Function
/inc/class_error.php 157 errorHandler->error
/inc/functions.php 4649 errorHandler->error_callback
/inc/functions_post.php 1034 get_attachment_icon
/portal.php 673 get_post_attachments
Warning [2] Trying to access array offset on value of type null - Line: 4649 - File: inc/functions.php PHP 8.2.31 (Linux)
File Line Function
/inc/class_error.php 157 errorHandler->error
/inc/functions.php 4649 errorHandler->error_callback
/inc/functions_post.php 1034 get_attachment_icon
/portal.php 673 get_post_attachments
Warning [2] Undefined array key "attachments" - Line: 20 - File: portal.php(680) : eval()'d code PHP 8.2.31 (Linux)
File Line Function
/inc/class_error.php 157 errorHandler->error
/portal.php(680) : eval()'d code 20 errorHandler->error_callback
/portal.php 680 eval
Warning [2] Undefined array key "attachments" - Line: 20 - File: portal.php(680) : eval()'d code PHP 8.2.31 (Linux)
File Line Function
/inc/class_error.php 157 errorHandler->error
/portal.php(680) : eval()'d code 20 errorHandler->error_callback
/portal.php 680 eval
Warning [2] Undefined array key "attachments" - Line: 20 - File: portal.php(680) : eval()'d code PHP 8.2.31 (Linux)
File Line Function
/inc/class_error.php 157 errorHandler->error
/portal.php(680) : eval()'d code 20 errorHandler->error_callback
/portal.php 680 eval
Warning [2] Undefined array key "attachments" - Line: 20 - File: portal.php(680) : eval()'d code PHP 8.2.31 (Linux)
File Line Function
/inc/class_error.php 157 errorHandler->error
/portal.php(680) : eval()'d code 20 errorHandler->error_callback
/portal.php 680 eval
Warning [2] Undefined array key "attachments" - Line: 20 - File: portal.php(680) : eval()'d code PHP 8.2.31 (Linux)
File Line Function
/inc/class_error.php 157 errorHandler->error
/portal.php(680) : eval()'d code 20 errorHandler->error_callback
/portal.php 680 eval
Warning [2] Undefined array key "attachments" - Line: 20 - File: portal.php(680) : eval()'d code PHP 8.2.31 (Linux)
File Line Function
/inc/class_error.php 157 errorHandler->error
/portal.php(680) : eval()'d code 20 errorHandler->error_callback
/portal.php 680 eval
Warning [2] Undefined array key "attachments" - Line: 20 - File: portal.php(680) : eval()'d code PHP 8.2.31 (Linux)
File Line Function
/inc/class_error.php 157 errorHandler->error
/portal.php(680) : eval()'d code 20 errorHandler->error_callback
/portal.php 680 eval
Warning [2] Undefined array key "attachments" - Line: 20 - File: portal.php(680) : eval()'d code PHP 8.2.31 (Linux)
File Line Function
/inc/class_error.php 157 errorHandler->error
/portal.php(680) : eval()'d code 20 errorHandler->error_callback
/portal.php 680 eval




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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 277
» Latest member: Elemento26
» Forum threads: 1,087
» Forum posts: 6,490

Full Statistics

Online Users
There are currently 89 online users.
» 0 Member(s) | 88 Guest(s)
Bing

Latest Threads
GuSprites
Forum: Help & Support
Last Post: zedex82
2026-06-19, 06:39 PM
» Replies: 2
» Views: 355
New video Couse / Nuevo c...
Forum: News
Last Post: Duefectu
2026-04-29, 11:02 PM
» Replies: 0
» Views: 2,699
location of heap manageme...
Forum: Help & Support
Last Post: boriel
2026-03-07, 12:13 AM
» Replies: 1
» Views: 745
non-paged supervisor code...
Forum: Help & Support
Last Post: sdo303
2026-02-20, 06:38 PM
» Replies: 8
» Views: 1,848
How to open fuse as an ex...
Forum: How-To & Tutorials
Last Post: Duefectu
2026-02-09, 01:52 PM
» Replies: 3
» Views: 1,742
Old zxbasic game errors
Forum: Help & Support
Last Post: boriel
2025-11-09, 11:52 AM
» Replies: 7
» Views: 2,538
Error: Undefined GLOBAL l...
Forum: Help & Support
Last Post: ardentcrest
2025-11-04, 05:46 PM
» Replies: 3
» Views: 1,395
A Fast(er) Plot Routine f...
Forum: How-To & Tutorials
Last Post: tubz74
2025-10-30, 03:16 PM
» Replies: 2
» Views: 1,479
Hall of Fame - Include fo...
Forum: How-To & Tutorials
Last Post: tubz74
2025-10-28, 03:48 PM
» Replies: 0
» Views: 819
[SOLVED] Array layout bug...
Forum: Bug Reports
Last Post: Zoran
2025-10-25, 05:48 PM
» Replies: 2
» Views: 1,539

 
  ZX ZOO A full ZOO inside 48 K at 3.5Mhz :)
Posted by: maeloterkim - 2019-04-27, 01:48 PM - Forum: Gallery - Replies (1)

ZX ZOO A full ZOO inside 48 K at 3.5Mhz Smile

Made with ZX Basic Compiled. Only tested on Emulators

included here -> zxZOO(48K).rar

If someone can try it in a real zx spectrum hardware and comment here if it works Smile

Enjoy the zoo Smile

DEMO VIDEO here -> https://www.facebook.com/millionthanksbo...212159304/



Attached Files
.rar   zxZOO(48K).rar (Size: 31.03 KB / Downloads: 29)
Print this item

  i don't know if is a bug or what with beeper sound routine
Posted by: maeloterkim - 2019-04-17, 02:14 PM - Forum: Help & Support - Replies (3)

Hi Smile

THIS CODE WORKS AS EXPECTED

1) CLS
2) Print "Hello"
3) Make a sound with assembler subroutine
4) Print "World"
5) Make the STOP

--------INI CODE ---------------------------------------------------------------------------------------------

SUB mySound()
ASM
LD B,5
loop:
PUSH BC
LD HL,768
anotherLoop:
LD DE,1
PUSH HL
CALL 949 ;'ROM BEEPER ROUTINE 949 = $3B5
POP HL
LD DE,16
AND A
SBC HL,DE
JR NZ, anotherLoop
POP BC
DJNZ loop
RET
END ASM
END SUB

CLS : REM 'Clear screen

PRINT "Hello" : REM 'Print Hello on screen

mySound() : REM 'Make the sound

PRINT "World" : REM 'Print World on screen

STOP : REM STOP the program

----------------- END CODE ----------------------------------------------------------------------------------------------------

But if i change something, doesn't work

Per example :

1) ¿BUG ERROR?
If i change the assembler code and i put PUSH IX AT THE BEGINNING AND POP IX AT THE END
that is the advice in this forum to all assembler routines

SUB mySound()
ASM
PUSH IX ; This make the program not work properly
LD B,5
......
......
......
DJNZ loop
POP IX ; This make the program not work properly
RET
END ASM
END SUB

doesn't work


2) ¿BUG ERROR?
If i add some blank space to the words printed per example "hello " blank space at the end or somewhere
or at the printed word "world " make the program not work properly and don't execute the last print and the stop

3) ¿BUG ERROR?
If i add ; at the end of the word "Hello" per example "Hello"; doesn't work either

4) ¿BUG ERROR?
If i make the words "Hello" and "World" variables Per example a$ = "Hello", b$ = "World"
anfd i make

PRINT a$ : REM 'Print Hello on screen

mySound() : REM 'Make the sound

PRINT b$ : REM 'Print World on screen

doesn't work either


-----------------------------------------------------------------------------------------------------------------

I don't know what is going on ¿?¿?¿

Thanks Smile

Print this item

  v1.8.9 bright 8 does not work (*solved*)
Posted by: Eqx - 2019-04-14, 10:52 PM - Forum: Bug Reports - Replies (6)

Hello Boriel,
I found a problem wih bright 8
I'm coding some routines for a game and I need use bright 8 to draw four lines on a square with attributes: ink 2 and bright 1
I set paper 8, ink 8 and bright 8 to draw lines in this zone but zxbasic changes the brightness to zero and seems doesn't works.

Thanks

Code:
ink 2: bright 1 plot 117,154: draw 0,-8: draw 1,0: draw 0,-5: draw -1,0: draw 0,-8: draw 8,0: draw 0,1: draw 5,0: draw 0,-1: draw 8,0: draw 0,8: draw -1,0: draw 0,5: draw 1,0: draw 0,8: draw -8,0: draw 0,-1: draw -5,0: draw 0,1: draw -8,0 do ..... if IN 32766 = 190 go sub fire print paper 6;over 1; INK 0;AT 5,15;" ";AT 6,15;" " loop fire: ink 8: paper 8: bright 8: over 1 for n=1 TO 2 plot 0,191:draw 126,-47 plot 255,191:draw -126,-47 plot 80,75: draw 48,69 plot 175,75:draw -48,69 next n over 0 return

Print this item

  Error "4 Out of memory, 0:1"
Posted by: LukeBord1 - 2019-04-01, 11:32 AM - Forum: Help & Support - Replies (6)

Hi to all,
I've completed a program which I'd like to fit into a 16K Spectrum using the lastest 1.8.9 ZXB version. After a long play, the program crashes returing an annoying "4 Out of memory, 0:1", this happens in 48K mode too.

I incuded a couple of libraries: attr.bas and screen.bas, got no string variables (all the strings are included directly in PRINT commands), so i set a low value for the heap: --heap=256.

The program starts at --org=24000 and the generated memory_map.txt file says that the heap starts at "7337: .ZXBASIC_MEM_HEAP" (29495).
The rest of my custom machine code starts at 30.000 and ends at 32767... so all seems at the right place!

Any idea about the cause of the damned crash, which happens after some minutes of normal and working play?! It seems something like an accumulation of data in memory which goes out of bounds, needing some kind of reset :-(

Print this item

  ¿Posible bug ?
Posted by: maeloterkim - 2019-03-29, 12:41 PM - Forum: Bug Reports - Replies (5)

Hola Smile

Estoy compilando con la versión-1.8.9 de ZX BASIC y me pasa lo siguiente:

Cuando pongo

10 DIM valor, sum AS UBYTE

20 LET sum = 3

30 LET valor = 1 * (sum=3)

el valor debería ser solamente: 0 o 1 dependiendo del valor de sum

pero devuelve 0 o 255 ( que me parece que es, el máximo valor de UBYTE)

En el basic del zx spectrum si funciona correctamente

Para solucionarlo pongo

30 LET valor = 1 * ( (sum=3)/255 )

y ahora si da los valores correctos, pero claro añade más procesamiento

¿Debería funcionar así o es un bug?

Saludos

Print this item

  Scroll x 2 pixels, 4 pixels and 8 pixels (char level)
Posted by: Joflof - 2019-03-28, 02:31 AM - Forum: Help & Support - Replies (4)

I am still learning and reading about most stuff, and I run across the scroll.bas library from Boriel that comes with ZXBasic. It was kinda impressive to see that kind of smooth scroll on a spectrum, and even if it is "attribute free", you can get nice results with clever programming of the colors.

As I am trying to scroll a big screen, even if the function is fast, I would like to do it by 2 pixels instead of one. Of course I can execute the function 2 times, but it shows the scroll when it moves every pixel so the result is the same. Is the code modificable in any way so the scroll is done by 2, 4 or even 8 pixels? That last option would be a great way to scroll screens, though I will have to deal with attributes of course.

If it is not possible, is there any "print" alternative fast enough to be able to simulate a scroll by char?

Thanks Smile

Print this item

  Some general questions from a novice ZX programmer
Posted by: Joflof - 2019-03-22, 08:44 AM - Forum: Help & Support - Replies (3)

Hi there!

Long story short, I coded some "games" in the 90s as a child with +3 Basic. Basically shit. I always wanted to code something decent and playable for my beloved speccy and well... better late than never!

I started reading, and reading, and reading a looot of information from a bunch of forums everytime I had a doubt and more or less I solved most things, but for a start, here is something that is bloking me from going on.

I managed to compile, with ZX Basic, a program where I can draw and print stuff into the screen, check keypresses, manage the charset and the udg's, use 4 sprites with fourspriter... and everything in a pretty reasonably-easy way, and also load compressed screens with aplib. The thing is that so far more or less everything is working, but there is a concept I don't understand. This is where I am stuck:

In my test program, I load a new entire charset with a set of tiles to draw a background, from a binary file, using aplib and included through asm code "incbin namefile.bin". I also add another compressed file for the udg graphics, and finally another one which stores the screen data and colors to create using the previously loaded charsets.

Followint instructions from other forums, with asm I prepared a space of memory following this example suggested by the god and lord nathan:

Code:
Sub mapContainer () mapdata: Asm mymap: defs 2400, 0 End Asm level1: Asm binary "level1c.bin" End Asm level2: Asm binary "level2c.bin" End Asm level3: Asm binary "level3c.bin" End Asm End Sub

Which I changed to this:

Code:
Sub loadroom() roombg: Asm roombg: defs 768, 0 End Asm roomtiles: Asm roomtiles: defs 768, 0 End Asm roomudg: Asm roombg: defs 168, 0 End Asm room01bg: Asm binary "room01.bgc" End Asm room01tiles: Asm binary "room01.tic" End Asm room01udg: Asm binary "room01.udc" End Asm End Sub

That should load the 3 compressed files, but I am not sure where. Are those memory adresses? Arrays? That is confusing me. Applying the udg to the system was easy and worked, I just poked it to the specific adress. With the tiles though I had a problem, cause I had to add on the poke (0) + 256 (not sure why) and when I try that, it complains that @roomtiles is not an array. Finally, I solved it deleting the definition for @roomtiles in the asm part and defining it as an array with DIM roomtiles (787) etc.

Then the poking of the charset worked, but I had to change the (0) + 256 to (0) + 259 to get it right. Does it have something to do with being an array and having extra header info? I am really confused with arrays / memory adresses.

And finally, with all those loaded, I tried to load roombg, with my tile and attributes information, and to read it byte per byte... but I can't. Defining it in the asm code doesnt allow me to use it like roombg(15) to read the 15th byte, and defining it as an array makes it crash when I try to read it, giving incoherent values.

Which is the correct way to read byte per byte information of that memory adress? I tried peek, but dont know how to do it well, I tried value = peek 15 + @roombg, for example, but I also failed.

Everything is working great, in general, but this problem got me stuck.

Also, I would like to know where in the memory I am loading stuff and how much memory I have free... cause in the future, for sure, I will need to use banking switching if I want to load like 50 rooms :lol:

Well, thanks for everything! I will wait to see if I can understand exactly how to use this Smile

Print this item

  v1.8.9 : IF / ULONG > ULONG() array comparison bug (*solved*)
Posted by: JMcGibbitts - 2019-02-05, 09:03 PM - Forum: Bug Reports - Replies (3)

Hello Boriel, my first post here, so I'm sorry it's to report a bug.

I found a problem when comparing a ULONG variable with any entry in an array of ULONGs.
Saving the array entry to a temporary ULONG variable to compare with is a workaround.

The problem seems to happen with v1.87, so is perhaps an older bug.

A working code comparison sample is pasted below. 
The code purpose is to find where to insert a page number in an array of page numbers, where the pages are stored in correct sequence but are not simply incrementing numbers.
Switch between SUBs v1() / v2() to compare the output.

Thanks

Code:
' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Declarations DIM ulStoryPage, ulTemp AS ulong  DIM ulLongStory (5) AS ulong  => { 900000, 700000, 500000, 300000, 100000, 0 } DIM uiCounter, uiPosition, uiYPos AS ubyte ' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Inits. LET uiCounter = 5 : LET uiPosition = 5 : LET uiYPos = 10 LET ulStoryPage = 500001 ' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Cosmetics BORDER 0 INK 1 PAPER 0 BRIGHT 1 CLS PRINT AT 0,0; "Story Page = "; ulStoryPage ' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Toggle this between v1() and V2() to compare. v1()  ' v1() fails the comparison against the array. 'v2()  ' v2() uses a temp variable to store / compare array value. DO LOOP ' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' SUB v1() ' Find the page position in the story - V1...  This fails the comparison, so the page is never inserted. DO LET uiCounter = uiCounter - 1 IF ulStoryPage > ulLongStory(uiCounter) '  Trying to compare the ULONG against the ULONG in the array. LET uiPosition = uiCounter PRINT AT uiYPos,0; INK 4; "Slot=";uiCounter; " Page="; ulLongStory(uiCounter); " insert @"; uiPosition ELSE PRINT AT uiYPos,0; INK 2; "Slot=";uiCounter; " Page="; ulLongStory(uiCounter) ENDIF LET uiYPos = uiYPos + 1 LOOP UNTIL uiCounter = 0 END SUB ' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' SUB v2() ' Find the page position in the story V2...  Assigns the array value to a temp value to compare.  (This works) DO LET uiCounter = uiCounter - 1 LET ulTemp = ulLongStory(uiCounter) ' Using a temporary ULONG to compare with instead of the array. IF ulStoryPage > ulTemp LET uiPosition = uiCounter PRINT AT uiYPos,0; INK 4; "Slot=";uiCounter; " Page="; ulLongStory(uiCounter); " insert @"; uiPosition ELSE PRINT AT uiYPos,0; INK 2; "Slot=";uiCounter; " Page="; ulLongStory(uiCounter) ENDIF LET uiYPos = uiYPos + 1 LOOP UNTIL uiCounter = 0 END SUB

Print this item

  O-EYES
Posted by: oblo - 2018-12-11, 03:23 PM - Forum: Gallery - No Replies

Hi all

I've just finished my last game: O-EYES, a ZX Spectrum port of the arcade game EYES. Don't know why but I like it to play some quick rounds, so I decided to make this version. Oh, and as you can see, I've used the ol' and cheap trick to print in the inlay an arcade screenshot, instead of an actual Spectrum screenshot :wink:

[Image: O-Eyes-v1-0-1.jpg] [Image: O-Eyes-v1-0-2.jpg]

You can download O-EYES from this link and it contains:

- TZX with the playable version 1.0 of the game
- Source code (Boriel's ZX Basic .bor files)
- Cassette inlay
- Readme.txt

As always, all comments are welcome and hope you enjoy it Smile



Attached Files
.7z   O-Eyes.7z (Size: 156.28 KB / Downloads: 1,121)
Print this item

  List of ZX Basic supported engines
Posted by: oblo - 2018-12-10, 08:56 AM - Forum: ZX Basic Compiler - Replies (6)

Hi all

I'm gathering information about engines that support ZX Basic. So far, I found those:

- FASE: here and here
- Nirvana: here
- Nirvana+: here and here
- Bifrost* Engine: here
- Bifrost*2 Engine: here
- ZXodus][Engine: here and here (but engine download link is not found)

Do you have more information about them or more engines to add to the list? It would be nice to have a repository with all of them.

Cheers.

Print this item