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 "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 101 online users.
» 0 Member(s) | 101 Guest(s)

Latest Threads
GuSprites
Forum: Help & Support
Last Post: zedex82
2026-06-19, 06:39 PM
» Replies: 2
» Views: 357
New video Couse / Nuevo c...
Forum: News
Last Post: Duefectu
2026-04-29, 11:02 PM
» Replies: 0
» Views: 2,702
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,849
How to open fuse as an ex...
Forum: How-To & Tutorials
Last Post: Duefectu
2026-02-09, 01:52 PM
» Replies: 3
» Views: 1,745
Old zxbasic game errors
Forum: Help & Support
Last Post: boriel
2025-11-09, 11:52 AM
» Replies: 7
» Views: 2,541
Error: Undefined GLOBAL l...
Forum: Help & Support
Last Post: ardentcrest
2025-11-04, 05:46 PM
» Replies: 3
» Views: 1,397
A Fast(er) Plot Routine f...
Forum: How-To & Tutorials
Last Post: tubz74
2025-10-30, 03:16 PM
» Replies: 2
» Views: 1,480
Hall of Fame - Include fo...
Forum: How-To & Tutorials
Last Post: tubz74
2025-10-28, 03:48 PM
» Replies: 0
» Views: 820
[SOLVED] Array layout bug...
Forum: Bug Reports
Last Post: Zoran
2025-10-25, 05:48 PM
» Replies: 2
» Views: 1,541

 
  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

  Parser bug (*solved*)
Posted by: einar - 2013-02-26, 05:16 PM - Forum: Bug Reports - Replies (4)

Trying to compile the following code:

Code:
#define BIFROSTstop() \ asm \ call 65012 \ end asm 10 PAUSE 0 : BIFROSTstop() : PAUSE 0
Produces the following error message:
Quote:illegal character ':'
However the following code compiles just fine:
Code:
#define BIFROSTstop() \ asm \ call 65012 \ end asm 10 PAUSE 0 : BIFROSTstop() PAUSE 0
This bug is relevant because BIFROST* interface library for ZX BASIC makes extensive use of defines as above, for performance reasons. I'm sure this is not the only case. Therefore I'm concerned about users getting confused by weird errors like this.

Print this item

  UDG definition bug (*solved*)
Posted by: wilco2009 - 2013-02-20, 11:55 PM - Forum: Bug Reports - Replies (10)

The ZXSpectrum hangs with the following code:

Code:
FOR n=0 TO 7: POKE USR "A"+n,255: NEXT n FOR n=0 TO 7: POKE USR "B"+n,255: NEXT n FOR n=0 TO 7: POKE USR "C"+n,255: NEXT n FOR n=0 TO 7: POKE USR "D"+n,255: NEXT n FOR n=0 TO 7: POKE USR "E"+n,255: NEXT n FOR n=0 TO 7: POKE USR "F"+n,255: NEXT n PRINT "\a \b \c \d \e \f"
Definition of UDG A & B works properly but program does not work from UDG C.

Print this item

  +3e FileBrowser
Posted by: BCH - 2013-02-19, 08:31 PM - Forum: Gallery - Replies (1)

Hello!

Im new in this forum.
First of all I would like to thanks to Boriel and the rest of the people involved in developing ZX Basic Compiler. Its really great!

Well, as the title says, Im writing a file browser/game launcher for the +3e (paired to an IDE device):
[Image: p3efilebrowser.png]


Also I uploaded a video on u-tube:
http://www.youtube.com/watch?v=SfcJkIZXxnc

Its an early version, but the basic functionality is working (cat and load from the selected partition). It can load .BAS files as well as snapshots (Z80 and SNA).
The idea is to add some basic partition management features (create, erase, rename, copy files from one to the other)...will see if I can manage to code that.
The code is probably rough and needs some tweeks, which hopefully will do as I learn more about the Boriel's ZX Basic features.

Here you can download the first working version:
http://www.mediafire.com/?72j5rq70va99jij

And if someone is interested having the source just let me know. Its nothing fancy but I can post it here anyway.

Cheers!

Print this item

  Hunt the wumpus
Posted by: LCD - 2013-02-19, 08:07 PM - Forum: Gallery - No Replies

So, after some lethargy I finally finished "Hunt the Wumpus", a game converted 1:1 from The TI99/4
[Image: Hunt%20the%20wumpus_ingame.png]
Download from my homepage.

Print this item

  Backgrounds for Tumbletop remake
Posted by: oblo - 2013-02-15, 11:31 AM - Forum: ZX Basic Compiler - Replies (2)

Hi all

A few months ago I planned to start a Tumbletop remake for Spectrum but I couldn't do it. At least I did the backgrounds using Mappy so here there are, uploaded in case that someone can use them.

Tumbletop backgrounds for Spectrum

Regards

Print this item

  Google+ community for Boriel's ZXBasic Compiler
Posted by: nitrofurano - 2013-02-10, 04:20 PM - Forum: ZX Basic Compiler - Replies (1)

be welcome there! Smile https://plus.google.com/communities/1031...5127244060

Print this item

  Joystick Library
Posted by: wilco2009 - 2013-02-08, 10:12 PM - Forum: Gallery - Replies (2)

Attached is included my joystick library to manage the joystick
Basically includes constants and macros to keep the same speed access that reading directly the keyboard ports.

The file keyboard.bas is a interface library to manage the keyboard.
Keyboard.bas is used by joystick.bas. It includes all the functions to manage the access to the joystick, The structure of joystick.bas as the following:

- Keyboard (OPQA/Enter), Kempston, Sinclair (Two players) and Cursor Joystick are supported.
- The active joystick is stored internally in the CtrlSelected variable and includes two functions to access it (SelectControl/GetSelectedControl).
- The other functions lets read the state of all joystick buttons.
- In order to let control two players (Sinclair case), are included in all functions a parameter called "played" with possible values PLAYER1/PLAYER2 (0/1).
- The Sinclair right player is used for player 2.

<!-- m --><a class="postlink" href="https://docs.google.com/folder/d/0B69T2laxW_ueenc4SmJBTzFEeEU/edit?usp=sharing">https://docs.google.com/folder/d/0B69T2 ... sp=sharing</a><!-- m -->

Print this item

  Stack
Posted by: na_th_an - 2013-02-08, 11:35 AM - Forum: How-To & Tutorials - Replies (1)

Maybe this has been solved before, but I can't search for "stack" in the forum 'cause the search engine tells me it's a very common word so it won't be included in the search XD

Were the stack is located? Can I control where it is located without messing things up?

I'm asking this 'cause I'll be trying using extra RAM pages in 128K models for storage.

Print this item

  fourspriter error with -O 2 option
Posted by: jevilon - 2013-02-07, 09:25 PM - Forum: Bug Reports - Replies (6)

When I try to build my game, using fourspriter 2.1, if you compile normal works, but if I put optimization level 2 or level 3 gives me the error:

main.bas: 5526: error: Undefined label '__LABEL__fsp21DataPool'

Na_th_an I asked and he said that you mentioned it to you.

greetings

Print this item