The following warnings occurred:
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 "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: 274
» Latest member: zxspecticle
» Forum threads: 1,086
» Forum posts: 6,487

Full Statistics

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

Latest Threads
New video Couse / Nuevo c...
Forum: News
Last Post: Duefectu
2026-04-29, 11:02 PM
» Replies: 0
» Views: 214
location of heap manageme...
Forum: Help & Support
Last Post: boriel
2026-03-07, 12:13 AM
» Replies: 1
» Views: 486
non-paged supervisor code...
Forum: Help & Support
Last Post: sdo303
2026-02-20, 06:38 PM
» Replies: 8
» Views: 1,302
How to open fuse as an ex...
Forum: How-To & Tutorials
Last Post: Duefectu
2026-02-09, 01:52 PM
» Replies: 3
» Views: 1,392
Old zxbasic game errors
Forum: Help & Support
Last Post: boriel
2025-11-09, 11:52 AM
» Replies: 7
» Views: 2,080
Error: Undefined GLOBAL l...
Forum: Help & Support
Last Post: ardentcrest
2025-11-04, 05:46 PM
» Replies: 3
» Views: 1,081
A Fast(er) Plot Routine f...
Forum: How-To & Tutorials
Last Post: tubz74
2025-10-30, 03:16 PM
» Replies: 2
» Views: 1,180
Hall of Fame - Include fo...
Forum: How-To & Tutorials
Last Post: tubz74
2025-10-28, 03:48 PM
» Replies: 0
» Views: 630
[SOLVED] Array layout bug...
Forum: Bug Reports
Last Post: Zoran
2025-10-25, 05:48 PM
» Replies: 2
» Views: 1,220
3DOS Commands?
Forum: Help & Support
Last Post: boriel
2025-10-06, 02:54 PM
» Replies: 3
» Views: 1,383

 
  Did I run out of Ram?
Posted by: slenkar - 2013-04-26, 04:42 PM - Forum: Help & Support - No Replies

my pathfinding function worked fine until recently, now it just crashes the spectrum
my wars.rzx file is 28K

EDIT- my mistake!
I was writing out of bounds to an array

Print this item

  How to "localize" (translate) your program
Posted by: boriel - 2013-04-26, 10:12 AM - Forum: How-To & Tutorials - Replies (8)

Yes, we are in the information era, Internet was a dream in the 80s, but a reality nowadays 8)
And we are in sort of Babel tower here. This tutorial proposes a simple but effective way to make your program multilingual.

Needless to say 48Kb (actually less than 40Kb) are too little room to store all localized program texts simultaneously. My proposal is simply a structure to make our programs easily translatable to other languages. Here we go:

ZXBASIC allows commandline defines now (1.2.3-s1022), so it's possible to do something like this:

FILE: LOCALIZE.BAS
This file will include the desired language

Code:
#ifndef LANG ' if no LANG defined, fallback to English as default #define LANG en #endif ' Now include the desired file #if LANG==en #include <english.bas> #endif #if LANG==es #include <spanish.bas> #endif #if LANG==ru #include <russian.bas> #endif
The above file will include the desired language definition file.

FILE: ENGLISH.BAS
This defines strings in English, using #define directive
Code:
' Just HELLO WORLD #define HELLO_WORLD "HELLO WORLD"
FILE: SPANISH.BAS
This defines strings in Spanish, using #define directive
Code:
' Just HELLO WORLD #define HELLO_WORLD "HOLA MUNDO"
FILE: hello.bas
A demo example, which will be localized.
Code:
#include <localize.bas> 10 REM This is the MAIN code 20 PRINT HELLO_WORLD
Now, to generate for English, compile as:
Code:
zxb -TaB -o hello_en.tzx -D LANG=en hello.bas
To generate the same program translated into Spanish, do:
Code:
zxb -TaB -o hello_es.tzx -D LANG=es hello.bas
NOTICE:
  • Use -o parameter to specify a different output file for each language
    (by default ZX Basic uses just the .bas name, but will replace .bas extension with .tzx or .tap accordingly)
  • Use -D <macro> = <value> to define macro values from the command line.

We all are different native-language speakers here, so if we open-source or .bas listings, some of us would be willing to translate into our mother tongue.

What do you think of this proposal?

Print this item

  ABYDOS
Posted by: JBGV - 2013-04-21, 11:01 PM - Forum: Gallery - Replies (8)

Hola !

This is my new game, if you want to give it a couple of times ...

Hope you like it!



.rar   ABYDOS.rar (Size: 94.56 KB / Downloads: 431)

Print this item

  compiler bug
Posted by: slenkar - 2013-04-13, 04:23 PM - Forum: Help & Support - Replies (1)

having problems with imports
please download the project
<!-- m --><a class="postlink" href="http://www.4shared.com/zip/sBALDAkZ/wars.html">http://www.4shared.com/zip/sBALDAkZ/wars.html</a><!-- m -->

and compile wars.bas

it says the function findpath is not found but its in pathfinding.bas

also it says the error is in wars.bas on line 23

but its really in movingfunctions.bas

Print this item

  End if
Posted by: Darkstar - 2013-04-12, 05:22 PM - Forum: Wishlist - Replies (12)

Is there a way so you can write:

IF a = b THEN PRINT "A and B are equal";

Instead of:
IF a = b THEN PRINT "A and B are equal";: END IF

To keep compatibillty with the original ZX BASIC?

Then you will not have to change all of those IF/THEN lines in old sorce code, and also perhaps some kind of swithc or a #pragma directive so
you will not have to rewrite draw and plot commands while also keeping the new way of using those commands and then without the directive
of course.

The original BASIC version would also not allow to PLOT or DRAW on the bottom two lines.
Example:
PLOT x+100,y-100 ' original BASIC version
PLOT x+100,96-y ' zxb version

This would greatly simplify things and keep bugs to the minimum.

READ/RESTORE/DATA is not that important compared to the other stuff.

Print this item

  Save bug (*solved*)
Posted by: Darkstar - 2013-04-11, 06:52 PM - Forum: Bug Reports - Replies (20)

Code:
asm jr ZXBASICBorielVersionEnd db "ZX Boriel BASIC version 1.3.0-s979" ZXBASICBorielVersionEnd: end asm SAVE "SAVETEST"CODE 49152,8192

Heap size is 256
-O0

When saved to a blank .TAP file and that file is loaded back then the result is: "Bytes: SAVETEST??"
This of course kills any possibillty of loading it back with: LOAD "SAVETEST"CODE

The bug is present as far as I know in versions 1.3.0-s924, 1.3.0-s967 and 1.3.0-s979.

Print this item

  Rotating some points , seems slow
Posted by: slenkar - 2013-04-08, 01:59 AM - Forum: Help & Support - Replies (9)

I was going to make a vector graphics game like asteroids but different
I rotated some points around an origin but even that seems too slow

I was going to draw lines between the points


Code:
#include <FSin.bas> Dim trishipx(12) as UByte Dim trishipy(12) as UByte Dim drawtrishipx(12) as UByte dim drawtrishipy(12) as UByte trishipx(0)=62 trishipy(0)=58 trishipx(1)=58 trishipy(1)=58 trishipx(2)=58 trishipy(2)=62 trishipx(3)=58 trishipy(3)=54 trishipx(4)=60 trishipy(4)=58 trishipx(5)=60 trishipy(5)=62 Dim trishipangle as Integer Function rotate(degrees as Integer) as Integer dim transformedX as Ubyte=0 dim transformedY as ubyte=0 dim pointx as Ubyte=54 dim pointy as Ubyte=54 for x=0 to 5 'Local theta:Float=1 transformedX= fCos(degrees) * (trishipx(x)-pointx) - fSin(degrees) * (trishipy(x)-pointy) + pointx transformedY = fSin(degrees) * (trishipx(x)-pointx) + fCos(degrees) * (trishipy(x)-pointy) + pointy drawtrishipx(x) = transformedX drawtrishipy(x) = transformedY Next return 1 End Function Function drawship() as Integer for x=0 to 5 plotPoint(drawtrishipx(x),drawtrishipy(x)) next return 1 End Function While 1 trishipangle=trishipangle+1 if trishipangle>360 then trishipangle=0 end if rotate(trishipangle) drawship() Wend SUB plotPoint (x as uByte, y as uByte) ASM ld d,(IX+5) ;'X ld e,(IX+7) ;'Y ld a, 191 sub e ret c ld e, a and a rra scf rra and a rra xor e and 248 xor e ld h, a ld a, d rlca rlca rlca xor e and 199 xor e rlca rlca ld l, a ld a, d and 7 ld b, a inc b ld a, 1 plotPoint_loop: rrca djnz plotPoint_loop ;cpl ld b, a ld a, (hl) or b ld (hl), a END ASM END SUB

Print this item

  ELSIF
Posted by: einar - 2013-03-27, 03:46 AM - Forum: Wishlist - Replies (5)

For instance, suppose a game with 5 levels of difficulty, that needs to perform certain tasks depending on this. In ZX BASIC it will look like this:

Code:
IF level = 1 THEN ... ELSE IF level = 2 THEN ... ELSE IF level = 3 THEN ... ELSE IF level = 4 THEN ... ELSE ... END IF END IF END IF END IF

My suggestion is to add a new keyword "ELSIF", so the code above could be simplified as follows:

Code:
IF level = 1 THEN ... ELSIF level = 2 THEN ... ELSIF level = 3 THEN ... ELSIF level = 4 THEN ... ELSE ... END IF

I know this is not an important feature (the kind of stuff they call "syntactic sugar"), but since this is probably very easy to implement in the compiler and should be very convenient for several programs, I'm suggesting it anyway Smile

Print this item

  How to put zxbasic code in memory banks
Posted by: oblo - 2013-03-09, 10:00 PM - Forum: How-To & Tutorials - Replies (10)

Hi all

I'm testing and expanding this code (without the CLEAR command) from a post from speccy.org forum in order to test memory bank paging:

Code:
10 CLEAR 49151 20 POKE 23388,16: OUT 32765,16: POKE 50000,1 30 POKE 23388,17: OUT 32765,17: POKE 50000,2 40 POKE 23388,19: OUT 32765,19: POKE 50000,3 50 POKE 23388,20: OUT 32765,20: POKE 50000,4 60 POKE 23388,22: OUT 32765,22: POKE 50000,5 70 POKE 23388,16: OUT 32765,16: PRINT PEEK 50000 75 POKE 23388,17: OUT 32765,17: PRINT PEEK 50000 80 POKE 23388,19: OUT 32765,19: PRINT PEEK 50000 85 POKE 23388,20: OUT 32765,20: PRINT PEEK 50000 90 POKE 23388,22: OUT 32765,22: PRINT PEEK 50000

Poking&Peeking memory addresses are working ok, but I'd like to know is there is a way to "put" zxbasic code in the memory bank I want to and, if yes, how I can achieve it.

Thanks and regards

Print this item

  Reading, storing and writing screen values
Posted by: oblo - 2013-03-05, 06:33 PM - Forum: Help & Support - Replies (4)

Hi all

I'm starting to learn how to manipulate screen directly at memory address level. Right now, I'm messing with this code

Code:
rem screen values paper 0: border 0: ink 7: cls dim conta as byte dim x,y,n,adres,dirb as uinteger bucle: y=RND*10 x=RND*32 adres=0 POKE attrAddress(x,y),RND*256 Print at 10,0; "X="; x; " - "; "Y="; y; print at 11,0; "Attrib address is.......: "; attrAddress(x,y); print at 12,0; "Attrib value is.........: "; PEEK attrAddress(x,y); print at 13,0; "The 8 screen addresses..: " for conta=0 to 7 poke scrAddress(x,y)+adres,RND*256 print scrAddress(x,y)+adres;","; PEEK (scrAddress(x,y)+adres) adres=adres+256 next conta pause 0 cls goto bucle rem funciones FUNCTION scrAddress(x AS UBYTE, y AS UBYTE) AS UINTEGER ASM ; This FUNCTION returns the address into HL of the screen address ; x,y in character grid notation. ; Original CODE was extracted by BloodBaz ; x Arrives in A, y is in stack. AND 31 ld l,a ld a,(IX+7) ; Y value ld d,a AND 24 add a,64 ld h,a ld a,d AND 7 rrca rrca rrca OR l ld l,a END ASM END FUNCTION FUNCTION attrAddress (x AS UBYTE, y AS UBYTE) AS UINTEGER 'This function returns the memory address of the Character Position 'x,y in the attribute screen memory. 'Adapted from code by Jonathan Cauldwell. 'Rebuilt for ZX BASIC by Britlion from NA_TH_AN's fourspriter, with permission. ASM ld a,(IX+7) ;ypos rrca rrca rrca ; Multiply by 32 ld l,a ; Pass TO L AND 3 ; Mask with 00000011 add a,88 ; 88 * 256 = 22528 - start of attributes. ld h,a ; Put it in the High BYTE ld a,l ; We get y value *32 AND 224 ; Mask with 11100000 ld l,a ; Put it in L ld a,(IX+5) ; xpos add a,l ; Add it TO the Low BYTE ld l,a ; Put it back in L, AND we're done. HL=Address. END ASM END FUNCTION

Questions are:

- Are there any better options to read and write given a X and Y coordinates?
- What is the best way to storage screen memory addresses and their values? Integer (for addresses) and Ubyte (for values) arrays, right?

Thanks and regards

Print this item