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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 263
» Latest member: BexlasGrowl
» Forum threads: 1,075
» Forum posts: 6,440

Full Statistics

Online Users
There are currently 111 online users.
» 0 Member(s) | 109 Guest(s)
Bing, Yandex

Latest Threads
Красивые букетики
Forum: News
Last Post: AnthonyGaxia
Yesterday, 04:00 AM
» Replies: 0
» Views: 26
Printing with FZX
Forum: Help & Support
Last Post: boriel
07-17-2025, 09:08 PM
» Replies: 1
» Views: 372
Strange Happenings
Forum: Bug Reports
Last Post: boriel
05-23-2025, 09:15 AM
» Replies: 4
» Views: 2,541
.tap file code not execut...
Forum: Help & Support
Last Post: Zoran
04-28-2025, 10:59 AM
» Replies: 4
» Views: 2,719
Exit from more than one l...
Forum: Wishlist
Last Post: Duefectu
04-23-2025, 10:06 PM
» Replies: 3
» Views: 2,276
put small ASM programs li...
Forum: How-To & Tutorials
Last Post: Zoran
04-18-2025, 02:02 PM
» Replies: 6
» Views: 5,277
Creating +3 Menus - Loadi...
Forum: Help & Support
Last Post: merlinkv
04-16-2025, 02:08 PM
» Replies: 6
» Views: 3,702
Randomize not very random...
Forum: Help & Support
Last Post: Zoran
04-08-2025, 10:40 AM
» Replies: 4
» Views: 3,442
Scope rules
Forum: Bug Reports
Last Post: Zoran
04-04-2025, 09:46 AM
» Replies: 2
» Views: 1,959
Using constants not allow...
Forum: Bug Reports
Last Post: baltasarq
03-19-2025, 10:00 PM
» Replies: 8
» Views: 4,751

 
  Clarification about HEAP
Posted by: LukeBord1 - 04-18-2018, 08: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 !?

Print this item

  [gameatron-gotya] first test
Posted by: nitrofurano - 03-06-2018, 12:35 PM - Forum: Other Archs - No Replies

first test for the Game-A-Tron’s Got-Ya arcade machine
( the wiki page related to this thread will be at <!-- m --><a class="postlink" href="http://www.boriel.com/wiki/en/index.php/ZX_BASIC:Released_Programs_-_GameatronGotya">http://www.boriel.com/wiki/en/index.php ... atronGotya</a><!-- m --> not there yet because that wiki bug )

( <!-- m --><a class="postlink" href="http://i.xomf.com/hcjvm.png">http://i.xomf.com/hcjvm.png</a><!-- m --> )



Attached Files
.zip   example01g_improving.zip (Size: 23.38 KB / Downloads: 903)
Print this item

  [irem-m58] first test
Posted by: nitrofurano - 03-06-2018, 12:32 PM - Forum: Other Archs - No Replies

first test for the Irem’s M58 arcade machine (10 Yard Fight)
( the wiki page related to this thread will be at <!-- m --><a class="postlink" href="http://www.boriel.com/wiki/en/index.php/ZX_BASIC:Released_Programs_-_IremM58">http://www.boriel.com/wiki/en/index.php ... _-_IremM58</a><!-- m --> not there yet because that wiki bug )

( <!-- m --><a class="postlink" href="http://i.xomf.com/cnmvh.png">http://i.xomf.com/cnmvh.png</a><!-- m --> )



Attached Files
.zip   example01d_improving.zip (Size: 31.81 KB / Downloads: 878)
Print this item

  [murogemonaco] first test
Posted by: nitrofurano - 03-03-2018, 06:06 PM - Forum: Other Archs - No Replies

first test for the Muroge Monaco arcade machine
( the wiki page related to this thread will be at <!-- m --><a class="postlink" href="http://www.boriel.com/wiki/en/index.php/ZX_BASIC:Released_Programs_-_MurogeMonaco-">http://www.boriel.com/wiki/en/index.php ... ogeMonaco-</a><!-- m --> not there yet because that wiki bug )



Attached Files
.zip   example01c_improve.zip (Size: 25.36 KB / Downloads: 929)
Print this item

  [jaleco-parallelturn] first test
Posted by: nitrofurano - 03-03-2018, 05:58 PM - Forum: Other Archs - No Replies

first test for the Jaleco’s Parallel Turn arcade machine
( the wiki page related to this thread will be at <!-- m --><a class="postlink" href="http://www.boriel.com/wiki/en/index.php/ZX_BASIC:Released_Programs_-_JalecoParallelTurn">http://www.boriel.com/wiki/en/index.php ... rallelTurn</a><!-- m --> - not there yet because that wiki bug )



Attached Files
.zip   example01c_improving.zip (Size: 28.53 KB / Downloads: 867)
Print this item

  [nintendo-mariobros] first test
Posted by: nitrofurano - 03-03-2018, 11:03 AM - Forum: Other Archs - No Replies

first test for the Nintendo’s Mario Bros arcade machine
( at <!-- m --><a class="postlink" href="http://www.boriel.com/wiki/en/index.php/ZX_BASIC:Released_Programs_-_NintendoMarioBros">http://www.boriel.com/wiki/en/index.php ... oMarioBros</a><!-- m --> as soon the wiki gets fixed )

(temporary: screenshot to be placed in the wikipage: <!-- m --><a class="postlink" href="http://i.xomf.com/dfmml.png">http://i.xomf.com/dfmml.png</a><!-- m --> )



Attached Files
.zip   example01e_improving.zip (Size: 26.63 KB / Downloads: 922)
Print this item

  [nintendo-donkeykong] first test
Posted by: nitrofurano - 03-03-2018, 10:52 AM - Forum: Other Archs - No Replies

first test for the Nintendo’s Donkey Kong arcade machine
( at <!-- m --><a class="postlink" href="http://www.boriel.com/wiki/en/index.php/ZX_BASIC:Released_Programs_-_NintendoDonkeyKong">http://www.boriel.com/wiki/en/index.php ... DonkeyKong</a><!-- m --> as soon the wiki gets fixed )


(temporary: screenshot to be placed in the wikipage: <!-- m --><a class="postlink" href="http://i.xomf.com/jzvdc.png">http://i.xomf.com/jzvdc.png</a><!-- m --> )



Attached Files
.zip   example01e_improving.zip (Size: 54.4 KB / Downloads: 909)
Print this item

  1.8.1 error unexpected token 'ELSEIF'
Posted by: ximokom - 02-07-2018, 09:16 PM - Forum: Help & Support - Replies (2)

Estaba compilando correctamente con la version estable 1.7.2 y al actualizar a la version 1.8.1 en desarrollo me sale esto: Alguna idea?
Was compiling correctly with the stable version 1.7.2 and update to the version 1.8.1 in development I get this: any idea?

if n=0 then c="\a"
elseif n=1 then c="\{i6}\b" -->error unexpected token 'ELSEIF'
elseif n=2 then c="\{i2}\c"
end if

Print this item

  [ballyastrocade] Just Another Snake Game
Posted by: nitrofurano - 01-23-2018, 07:41 PM - Forum: Other Archs - No Replies

Just Another Snake Game for Bally Astrocade game console. Still has bugs.
( <!-- m --><a class="postlink" href="http://www.boriel.com/wiki/en/index.php/ZX_BASIC:Released_Programs_-_BallyAstrocade#Just_Another_Snake_Game">http://www.boriel.com/wiki/en/index.php ... Snake_Game</a><!-- m --> )



Attached Files
.zip   justanothersnakegame_ballyastrocade_201801231938.zip (Size: 22.43 KB / Downloads: 947)
Print this item

  How to manage part of a STRING?
Posted by: LukeBord1 - 01-08-2018, 11:29 PM - Forum: How-To & Tutorials - Replies (4)

In standard Basic, we have this example correctly working:

Code:
10 LET a$="123456789012345678901234567890xy"
20 PRINT AT 0,0; a$
30 IF INKEY$="0" THEN LET a$=a$(32) + a$(1 TO 31)
40 GOTO 20

...but it doesn't seem to work in ZXB:

Code:
DIM test AS STRING
test="123456789012345678901234567890xy"
mainloop:
PRINT AT 0,0; test
IF INKEY="0" THEN
test=test(32) + test(1 TO 31)
END IF
GOTO mainloop

Thoughts?

Print this item