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 "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 "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




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 97 online users.
» 1 Member(s) | 96 Guest(s)
boriel

Latest Threads
New video Couse / Nuevo c...
Forum: News
Last Post: Duefectu
2026-04-29, 11:02 PM
» Replies: 0
» Views: 210
location of heap manageme...
Forum: Help & Support
Last Post: boriel
2026-03-07, 12:13 AM
» Replies: 1
» Views: 483
non-paged supervisor code...
Forum: Help & Support
Last Post: sdo303
2026-02-20, 06:38 PM
» Replies: 8
» Views: 1,295
How to open fuse as an ex...
Forum: How-To & Tutorials
Last Post: Duefectu
2026-02-09, 01:52 PM
» Replies: 3
» Views: 1,389
Old zxbasic game errors
Forum: Help & Support
Last Post: boriel
2025-11-09, 11:52 AM
» Replies: 7
» Views: 2,075
Error: Undefined GLOBAL l...
Forum: Help & Support
Last Post: ardentcrest
2025-11-04, 05:46 PM
» Replies: 3
» Views: 1,080
A Fast(er) Plot Routine f...
Forum: How-To & Tutorials
Last Post: tubz74
2025-10-30, 03:16 PM
» Replies: 2
» Views: 1,178
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,217
3DOS Commands?
Forum: Help & Support
Last Post: boriel
2025-10-06, 02:54 PM
» Replies: 3
» Views: 1,380

 
  tool for converting binaries into .tap files
Posted by: nitrofurano - 2011-09-29, 03:59 PM - Forum: Wishlist - Replies (1)

btw, sorry if i'm posting this in a wrong place if it looks offtopic - i don't know where else to post it...

as i think some people here missed tools for converting binary files into .tap , i recoded this converter in python, which i don't know if this can be useful for you
(i think LCD knows the sdlBasic and Amos versions of this converter i coded since around 10 years ago)

http://pastebin.com/b8fm44ue

maybe a tool like this would be missing on the Boriel's zx-basic compiler package?

(btw, it provides a weird bug, the binary files are opening fine on Fbzx emulator, but not in Fuse... (both Linux versions) - i don't know what i'm doing wrong )

Print this item

  ZXodus Engine support
Posted by: cheveron - 2011-09-09, 11:23 AM - Forum: Wishlist - Replies (5)

Hola!

Various people have mentioned that they would like to see support for my ZXodus Engine in the compiler. However, I suspect they haven't actually mentioned it here.

ZXodus is a rainbow processor and tile engine that gives you a 9x9 grid of tiles (144x144 pixels with 8x1 attributes) on the original 48K Spectrum. It does work on other models but the timing may need tweaking.

The engine is available here (with source):
<!-- m --><a class="postlink" href="http://www.worldofspectrum.org/infoseekid.cgi?id=0026639">http://www.worldofspectrum.org/infoseek ... id=0026639</a><!-- m -->

A simple PNG to tile converter (by na_th_an) is available here:
<!-- m --><a class="postlink" href="http://www.mojontwins.com/warehouse/zxodus-conv-0.1.rar">http://www.mojontwins.com/warehouse/zxodus-conv-0.1.rar</a><!-- m -->

Cheers!

-chev

Print this item

  Kempston Mouse driver
Posted by: oblo - 2011-09-04, 01:30 PM - Forum: Wishlist - Replies (3)

Hi all

Boriel, how about to integrate this (<!-- m --><a class="postlink" href="http://www.worldofspectrum.org/infoseekid.cgi?id=0014620">http://www.worldofspectrum.org/infoseek ... id=0014620</a><!-- m -->) as a library?) Chris said that "You can use this code freely, but I would appreciate a credit!"

Cheers

Print this item

  Out of Memory error
Posted by: LCD - 2011-08-28, 09:46 PM - Forum: Help & Support - Replies (12)

I made a snapshot from my game I currently write. On level 4 after 6 moves it came with a out of memory error, but the code is not different from levels 1-3, where it works well. I suspect a memory leak. The included snapshot is just short before it happens (Controls: QAOPM). I can PM the source too. The same thing happen with Heap size 256 or 1500.

.zip   Level4_1.zip (Size: 9.44 KB / Downloads: 1,232)

Print this item

  Learning ASM and ZX Basic Compiler
Posted by: oblo - 2011-08-22, 02:57 PM - Forum: Help & Support - Replies (4)

Hi all

I know it's a bit odd to ask this, because the compiler doesn't ask us to learn ASM but...
I'm starting to learn some ASM and besides read some books, I'm trying to get some examples from <!-- m --><a class="postlink" href="http://stu.pido.us/wiki/retrogames:index">http://stu.pido.us/wiki/retrogames:index</a><!-- m --> and <!-- m --><a class="postlink" href="http://members.fortunecity.com/jonathan6/egghead/id2.html">http://members.fortunecity.com/jonathan ... d/id2.html</a><!-- m -->, but every piece of code I try to compile between ASM and END ASM, end with a compiler error, for instance:

Code:
ASM ld a,2 ; upper screen call 5633 ; open channel loop ld de,string ; address of string ld bc,eostr-string ; length of string to print call 8252 ; print our string jp loop ; repeat until screen is full string defb '(your name) is cool' eostr equ $ END ASM

...ends with "temp.bor:11: Error: illegal preprocessor character '$'. Compilation failed" And:

Code:
ASM ; scroll izquierda ; ld hl, 22527 ld c, 192 buc_2 ld b, 32 and a buc_1 rl (hl) dec hl djnz buc_1 jr nc, noca_1 ld (var), hl ld ix, (var) set o, (ix+32) noca_1 dec c jr nz, buc_2 ret ; ; scroll derecha ; ld hl, 16384 ld c, 192 buc_4 ld b, 32 and a buc_3 rr (hl) inc hl djnz buc_3 jr nc, noca_2 ld (var), hl ld ix, (var) set 7, (ix-32) noca_2 dec c jr nz, buc_4 ret var equ 23728 END ASM

...ends with "temp.bor:3: Error: Syntax error. Unexpected token 'LD' [LD]. Compilation failed"

Is there any consideration to use ASM code in the compiler, the code examples are wrong... or have I to use another compiler, like PASMO, to compile ASM?

Thanks in advance and cheers

EDIT: I've just found this post (<!-- l --><a class="postlink-local" href="https://forum.boriel.com/bug-reports/illegal-preprocessor-errors-on-some-files-solved-t603.html">bug-reports/illegal-preprocessor-errors-on-some-files-solved-t603.html</a><!-- l -->) but I can't manage to solve it Sad

Print this item

  O-Cman
Posted by: oblo - 2011-08-21, 08:59 PM - Forum: Gallery - Replies (11)

Hi All

After a month of developing, I'm proud to release O-Cman, a Pacman clone for the ZX Spectrum. Their main features are:

- A nearly clone of the original arcade.
- Smooth animations
- Each ghost has its own IA
- Sounds, high score and several minor details regarding the original game.

Things that I think can improve the game (but I'm a bit 'lazy' to do them right now)

- Better IA for all the ghost
- Smooth animation for the eyes (I realize it too late)
- Different graphics for 'eatables' ghosts (I realize it too late too)

I hope you enjoy it as much I enjoyed making it. Please, feel free to send any comments, bugs, etc... I'll be grateful to see them Smile

Cheers



Attached Files
.rar   O-Cman_v1.0.rar (Size: 20.19 KB / Downloads: 275)
Print this item

  Initialising an array of addresses
Posted by: LTee - 2011-08-10, 12:25 PM - Forum: Help & Support - Replies (2)

I was trying to keep a list of memory addresses (pointing to tile data) in an array to use as a cheap lookup table. I tried to do something like this:

Code:
'data Data: asm defb 0, 0, 191, 191, 191, 191, 191, 191, 0, 0, 253, 253, 253, 253, 253, 253 end asm 'array of addresses dim tsAddress(TSMAXTILES) as uinteger => {@Data}

... which doesn't work, because @Data isn't a constant so I get an "Initializer expression is not constant" compiler error.

I could write and call a method which loads the array with the correct information on startup, but I just wanted to check that I wasn't missing an obvious trick which would allow me to avoid that? Thanks for any tips! Smile

Print this item

  Using Beepola with ZX BASIC
Posted by: LTee - 2011-08-09, 10:09 AM - Forum: How-To & Tutorials - Replies (15)

Using Beepola to add tunes to your ZX BASIC projects is actually pretty easy. Beepola is able to export its players and songs as .TAP files, which you can then merge in with your own code and call from ZX BASIC using standard RANDOMIZE USR calls.

Here's a quick how-to:

1. Make your tune. I can't help much with this bit, but I've successfully managed to integrate the Music Box, Phaser1 and Special FX engines into ZX BASIC, so I surmise they will all work. You can download Beepola from here: http://freestuff.grok.co.uk/beepola/

2. Now you need to compile your tune so that it's useful from ZX BASIC. You do this by selecting 'Compile' from Beepola's 'Tools' menu, which pops up a window with some options. The most important thing here is to make sure you set the player and song to use an area of memory which won't interfere with your own program. I tend to set this high in memory (64000 and up), but bear in mind that each player uses a different amount of memory and you'll also need to leave room for your song data. Each player has a different set of options, but basically it's all up to you here - choose whatever's best for your tune and situation.

3. The easiest way to integrate the song and player is to choose to export from Beepola as a .TAP file. I usually choose the 'code block only' option because you're not going to need the BASIC loader. Once that's saved, you need to load your game AND the player into memory at the same time. It's actually pretty easy to automate all of this using batch files (or their equivalent if you're non-Windows), because .TAP files are remarkably easy to join together. During Dex development, I created a BASIC loader which loaded my game code and the music code and saved that as a .TAP file. Then I used a batch 'make' file like this to build and assemble the game into a single .TAP.

e.g. BASIC LOADER (saved as loader.tap)

Code:
10 CLEAR 29999: LOAD "" CODE: LOAD "" CODE: RANDOMIZE USR 30000

e.g. BATCH FILE (saved as make.bat)
Code:
"\program files\zxbasic\zxb.py" dex.bas --output=dexgame.tap --org=30000 -t -Z copy /b loader.tap + dexgame.tap + DexJingle.tap Dex.tap

The first line of the batch file compiles the game. Once done, the 'copy' command takes the loader, game code and tune and merges them all together into one large .TAP file (called Dex.tap) that I can just double-click and run. Don't forget the /b switch on the copy operation, otherwise the files will be copied as text rather than binary and probably won't work.

4. If your game is to have multiple tunes, you only need to have one copy of the player - you don't need a separate copy of the player for each tune. Each Beepola engine has a couple of POKEable memory addresses near the start of the player code which points to the tune to be played. If you make more than one tune, export those from Beepola as 'song data only' .TAP files. Make sure that you choose the same settings as for your main tune and that you place the song data at a memory location that is away from both your game code AND the first tune's code.

5. During all of these steps, remember to keep track of the memory addresses that you have compiled the music data to. This is rather important as without the addresses you won't know what to call from your game. Including the address in your filenames as a reminder might be a good idea! Smile

6. Once you have everything ready to go, all that's left to do is to call the player from within your own ZX BASIC code. This is actually very simple - just a standard RANDOMIZE USR xxxxx call (where xxxxx is the address you compiled the player to) will do the trick. However, if you're making this call from within a ZX BASIC sub or function block, be aware that you need to preserve the IX register or the Spectrum is likely to crash - more details on this below. If you wish to play one of the 'extra' tunes described in point 4, you'll first need to POKE the relevant memory addresses with the location of the new song data - Beepola's documentation will tell you how to calculate what these addresses are for each individual engine.

7. This all sounds a bit complicated, but it really isn't. It's probably easier to show in an example, so I'll show you how I created my music playing subroutine for Dex. See the code fragment below:

Code:
'some constants const TUNESON as UBYTE = 1 const TUNEPLAYERADDR as UINTEGER = 64000 const TUNE1 as UINTEGER = 64798 const TUNE2 as UINTEGER = 64850 const TUNE3 as UINTEGER = 64900 const TUNEMAIN as UBYTE = 1 const TUNELEVELSTART as UBYTE = 2 const TUNELEVELEND as UBYTE = 3 const TUNEGAMEOVER as UBYTE = 4 'plays a piece of music SUB playMusic(tune as UBYTE) DIM SongAddr as UINTEGER = 0 'select the correct tune if tune = TUNEMAIN then SongAddr = TUNE3 elseif tune = TUNELEVELSTART then SongAddr = TUNE1 elseif tune = TUNELEVELEND then SongAddr = TUNE3 elseif tune = TUNEGAMEOVER then SongAddr = TUNE2 end if 'call the music player if TUNESON = 1 and SongAddr > 0 then 'poke the values for the tune start poke TUNEPLAYERADDR + 1, SongAddr - 256 * INT(SongAddr / 256) poke TUNEPLAYERADDR + 2, INT(SongAddr / 256) 'and play the tune (remember to preserve IX register or it'll crash) asm push ix end asm randomize usr TUNEPLAYERADDR asm pop ix end asm end if END SUB

This routine is basically all of the stuff I described above squashed into a single sub. The main music player was compiled and loaded to 64000, which I've put into a constant. The three tunes I use also have their memory locations described by constants. To play a tune, I call 'playMusic(TUNEMAIN)' (or whatever) and the SUB does all the rest.

You'll see that the address of the tune is determined by the constant I pass - this address is then POKEd into the player engine as described in Beepola's docs. Because we're calling from a SUB, the IX register needs to be preserved - this is easily done with a simple 'push ix' in an ASM block. Once we've done that, it's safe to call the player with 'RANDOMIZE USR'. Once the player returns control to us, we 'pop' the value of IX to allow us to return safely from the subroutine.

Job done!


I hope this is clear, it seems a lot more complicated to write down than it is in my head. If anyone has further questions, please feel free to ask! Smile

Print this item

  IndexError: list index out of range (*solved*)
Posted by: oblo - 2011-08-05, 11:34 PM - Forum: Bug Reports - Replies (6)

Hi all

I'm trying to compile a piece of code but I get the following output:

zxb.exe my_program.bor --org=27000 --heap-size=1024 -t -B -
Traceback (most recent call last):
File "zxb.py", line 312, in <module>
File "zxb.py", line 246, in main
File "zxbtrad.pyc", line 316, in traverse
File "zxbtrad.pyc", line 1035, in traverse
File "zxbtrad.pyc", line 316, in traverse
File "zxbtrad.pyc", line 1040, in traverse
File "zxbtrad.pyc", line 316, in traverse
File "zxbtrad.pyc", line 1035, in traverse
File "zxbtrad.pyc", line 316, in traverse
File "zxbtrad.pyc", line 1035, in traverse
File "zxbtrad.pyc", line 316, in traverse
File "zxbtrad.pyc", line 1035, in traverse
IndexError: list index out of range

What does it means? I'm using 1.2.8s715 version

Cheers

Print this item

  Unexpected end of file error
Posted by: oblo - 2011-07-31, 02:45 PM - Forum: Help & Support - Replies (7)

Hi all

Sorry to bother you twice in the same day :? I'm falling back to the safe land of BASIC but I'm still struggling with problems. I'm getting an "Unexpected end of file. Compilation failed" error. I'm searching for a lost bracket, lost END IF or similar (another post suggests that could be a lost parenthesis but I can't find any). What others symbols/codes/etc must I look for?

I'm compiling with tha last version and with the following options:
zxb.exe oc_UTF8.bor -S 27000 -t -B -a -o oc_UTF8.tap -O 0 --heap-size=1024

Thanks and regards



Attached Files
.rar   oc_UTF8.rar (Size: 3.66 KB / Downloads: 167)
Print this item