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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 259
» Latest member: DonaldDeade
» Forum threads: 1,074
» Forum posts: 6,434

Full Statistics

Online Users
There are currently 147 online users.
» 0 Member(s) | 145 Guest(s)
Bing, Google

Latest Threads
.tap file code not execut...
Forum: Help & Support
Last Post: Zoran
04-28-2025, 10:59 AM
» Replies: 4
» Views: 325
Exit from more than one l...
Forum: Wishlist
Last Post: Duefectu
04-23-2025, 10:06 PM
» Replies: 3
» Views: 300
put small ASM programs li...
Forum: How-To & Tutorials
Last Post: Zoran
04-18-2025, 02:02 PM
» Replies: 6
» Views: 1,601
Creating +3 Menus - Loadi...
Forum: Help & Support
Last Post: merlinkv
04-16-2025, 02:08 PM
» Replies: 6
» Views: 557
Randomize not very random...
Forum: Help & Support
Last Post: Zoran
04-08-2025, 10:40 AM
» Replies: 4
» Views: 893
Scope rules
Forum: Bug Reports
Last Post: Zoran
04-04-2025, 09:46 AM
» Replies: 2
» Views: 330
Using constants not allow...
Forum: Bug Reports
Last Post: baltasarq
03-19-2025, 10:00 PM
» Replies: 8
» Views: 1,066
404 page not found
Forum: Documentation
Last Post: boriel
03-08-2025, 07:16 PM
» Replies: 5
» Views: 2,887
Spectrum keywords codes
Forum: Bug Reports
Last Post: boriel
03-08-2025, 11:00 AM
» Replies: 1
» Views: 419
ZXodus][Engine
Forum: ZX Basic Compiler
Last Post: boriel
02-19-2025, 11:43 PM
» Replies: 69
» Views: 213,811

 
  64 char print - 32 lines version
Posted by: nitrofurano - 10-08-2011, 01:11 PM - Forum: Wishlist - Replies (20)

Since zxbasic compiler has a library for 4x8 characters, how possible or easy to implement would be a 4x6 characters version?
[Image: charset4x6.png]

Print this item

  how MojonTwin's fourspriter.bas, from library, works?
Posted by: nitrofurano - 10-06-2011, 05:29 PM - Forum: Help & Support - Replies (3)

while browsing the compiler's content, i found './library/mj/fourspriter.bas'
supposed that '#include <fourspriter.bas>' or '#include <mj/fourspriter.bas>' should be part of our snippets, but i have no idea about how to used...
some ideas?
thanks! Smile

Print this item

  asm/endasm DEFB not accepting 0xFE or FEh instead of 254
Posted by: nitrofurano - 10-06-2011, 04:02 PM - Forum: Help & Support - Replies (2)

hi!
i always had some idea that z80 assemblers accepts byte values in hexadecimal format, instead of only decimals - i'm i wrong, or is this zxbasic compiling missing this feature? (or can we suggest this feature?)

Code:
guest@macbook_mint1 /mnt/sda4/trabalhos/programacao/8bit/zxspectrum/ftpupload/zxspectrumstuff_20111001/borielzxbasiccompiler/snippets $ zxb.py -t -B -a asm.bas Generating LALR tables
WARNING: Token 'BIN' defined, but not used
WARNING: There is 1 unused token
Generating LALR tables
WARNING: Token 'UMINUS' defined, but not used
WARNING: There is 1 unused token
asm.bas:2: Error: Syntax error. Unexpected token 'x00' [ID]
guest@macbook_mint1 /mnt/sda4/trabalhos/programacao/8bit/zxspectrum/ftpupload/zxspectrumstuff_20111001/borielzxbasiccompiler/snippets $ zxb.py -t -B -a asm.bas
Generating LALR tables
WARNING: Token 'BIN' defined, but not used
WARNING: There is 1 unused token
Generating LALR tables
WARNING: Token 'UMINUS' defined, but not used
WARNING: There is 1 unused token
asm.bas:3: Error: Undefined label 'ffh'
guest@macbook_mint1 /mnt/sda4/trabalhos/programacao/8bit/zxspectrum/ftpupload/zxspectrumstuff_20111001/borielzxbasiccompiler/snippets $

Code:
asm
DEFB 0,1,2,3,4,5,6,7
DEFB 00h,01h,02h,03h,04h,05h,06h,07h
DEFB 0xff,0xfe,0xfd,0xfc,0xfb,0xfa,0xf9,0xf8
end asm

Print this item

  found a bug on draw command
Posted by: nitrofurano - 10-01-2011, 02:15 PM - Forum: Help & Support - Replies (2)

Code:
10 cls:out 254,6

12 let x1=60:let y1=60
14 let x2=70:let y2=50
16 plot x1,192-y1
18 draw x2-x1,y1-y2

22 let x1=80:let y1=60
24 let x2=90:let y2=70
26 plot x1,192-y1
28 draw x2-x1,y1-y2

30 pause 0


this code should draw two lines, not one line and one dot...

[Image: zxbasiccompilerbug.png]

Print this item

  bug on a bezier draw attempt
Posted by: nitrofurano - 09-29-2011, 06:28 PM - Forum: Help & Support - Replies (2)

i'm trying to draw a kind of custom simplified vectorial file, converted from postscript or svg, with a code like this:

Code:
1000 CA=49152:LET XT=0: LET YT=0:LET CT=0

1004 PAPER 7:BORDER 7: BRIGHT 0: INK CT: CLS: OUT 254,0

1100 REM FILE READING

1102 LET CM=PEEK(CA):LET CA=CA+1

1104 IF CM=ASC("M") THEN GOSUB 5002

1106 IF CM=ASC("L") THEN GOSUB 5102

1108 IF CM=ASC("C") THEN GOSUB 5202

1110 IF CM=ASC("F") THEN GOSUB 5302

1112 IF CM=ASC("I") THEN GOSUB 5402

1114 IF CM=ASC("Z") THEN GOSUB 5502

1116 GOTO 1102

5000 REM _M_ MOVE

5002 LET XT=PEEK(CA):LET CA=CA+1:LET YT=191-PEEK(CA):CA=CA+1:RETURN

5100 REM _L_ LINE

5102 LET X1=PEEK(CA):LET CA=CA+1:LET Y1=191-PEEK(CA):CA=CA+1

5104 INK CT: PLOT XT,YT: DRAW XT-X1,YT-Y1 :LET XT=X1:LET YT=Y1:RETURN

5200 REM _C_ BEZIER

5202 LET X1=PEEK(CA):LET CA=CA+1:LET Y1=191-PEEK(CA):LET CA=CA+1

5204 LET X2=PEEK(CA):LET CA=CA+1:LET Y2=191-PEEK(CA):LET CA=CA+1

5206 LET X3=PEEK(CA):LET CA=CA+1:LET Y3=191-PEEK(CA):LET CA=CA+1

5208 LET XA=(X3)-(3*X2)+(3*X1)-(XT):LET YA=(Y3)-(3*Y2)+(3*Y1)-(YT)

5210 LET XB=(3*X2)-(6*X1)+(3*XT):LET YB=(3*Y2)-(6*Y1)+(3*YT)

5212 LET XC=(3*X1)-(3*XT):LET YC=(3*Y1)-(3*YT)

5213 LET X=0: LET Y=0

5214 FOR T=0 TO 1 STEP 0.25

5215 LET XO=X:LET YO=Y

5216 LET X=(((((XA*T)+XB)*T)+XC)*T)+XT

5218 LET Y=(((((YA*T)+YB)*T)+YC)*T)+YT

5220 IF T=0 THEN INK CT: PLOT X,Y

5222 IF T<>0 THEN INK CT: DRAW X-XO,Y-YO

5224 NEXT T

5226 LET XT=X3:LET YT=Y3:RETURN

5300 REM _F_ FILL

5302 LET XT=PEEK(CA):LET CA=CA+1:LET YT=191-PEEK(CA):LET CA=CA+1

5304 REM PAINT (XT,YT),CT

5306 RETURN

5400 REM _I_ INK COLOUR

5402 LET CT=PEEK(CA):CA=CA+1:RETURN

5500 REM _Z_ END OF DOCUMENT

5502 GOTO 5502

but when i try to compile it:

Code:
guest@macbook_mint1 /mnt/sda4/emulation/zxspectrum/basic/BorielZxBasicCompiler $ zxb.py /mnt/sda4/emulation/zxspectrum/basic/bin2tap_py/zvfreader_
zxspectrum.bas -t -S 32768
zvfreader_zxspectrum.bas:31: Syntax Error. Unexpected token 'NEXT' <NEXT>
guest@macbook_mint1 /mnt/sda4/emulation/zxspectrum/basic/BorielZxBasicCompiler $

very weird... what could cause this?

Print this item

  zxb.py as command from Bash
Posted by: nitrofurano - 09-29-2011, 05:21 PM - Forum: Help & Support - Replies (2)

do someone know how can we have zxb.py as command from Bash, and having Boriel's zx-spectrum compiler placed in some directory inside '/opt/'?
this question is because:

1- would be great having a more comfortable way to use the compiler from the terminal, without having to do a 'cd' inside the compiler directory, just like using tools like zmakebas (available in Ubuntu and Debian repository)

2- would help package maintainers to help creating a package, in formats like .deb, .rpm, etc., and having it available defaulty in their repositories, like on Ubuntu or Debian, we only needed to enter 'sudo apt-get install borielzxspectrumcompiler' (if this could be the name of the package), for installing it

any help is very welcome! thanks! Smile

Print this item

  tool for converting binaries into .tap files
Posted by: nitrofurano - 09-29-2011, 02: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 - 09-09-2011, 10: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 - 09-04-2011, 12: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 - 08-28-2011, 08: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: 893)

Print this item