What is wrong with BASIC256 1.1.4.0, Windows version? (Documentation Bugs and Problems)

by cub256, Sunday, February 15, 2015, 20:27 (864 days ago)

Hi,

what is wrong with BASIC256 1.1.4.0, Windows version? I am using it on Windows 8, 64bit.

Many programs run ok, e.g., 99bottles (rosetta code), pacman (Pac Man - M Santos, 2015-02-15, 08:59) BUT, in my hands:

* traffic.kbs (http://www.basicbook.org/Games) has non-movable cars, mouse clicks won't work (but they do with BASIC256 version 0.9.9.1)

* spritepaddle.kbs (from the book, 2nd ed., see also thread Ch 12-Paddleball program from book - kbauch, 2015-01-29, 21:29 below). The STRANGE THING IS, when I insert 'wavplay "hit.wav"' as first program line, the program WORKS! Very strange indeed!

Can anybody helpe?

Thanks,

cub256

What is wrong with BASIC256 1.1.4.0, Windows version?

by Jim ⌂ @, Russell, KY, Tuesday, February 17, 2015, 07:39 (863 days ago) @ cub256

MMM.

On the traffic program. You need to change lines 91 and 92 to
x = int(clickx / (cellwidth + margin)) % width
y = int(clicky / (cellheight + margin)) % height

it seems that the modulo operator returns the decimal remainder if the dividend is a decimal number. That probably happened when the stack was rewritten a while ago.


Post the code for 99 bottles here so I can try that out.

Jim

What is wrong with BASIC256 1.1.4.0, Windows version?

by cub256, Tuesday, February 17, 2015, 14:58 (863 days ago) @ Jim

Hi Jim,

trafficNew, with your corrections, works fine! before I post the code of 99bottles, here is my summary:

On one and the same 64bit Notebook:

Windows 8, basic256 1.1.4.0:
* trafficNew, 99 bottles, both ok

Ubuntu 14.04, basic256 9.6.69 (Ubuntu repositories):
* traffic, trafficNew, 99 bottles, all ok

Ubuntu 14.04 basic256 1.0.0.7 on Wine 1.6.2:
trafficNew, 99 bottles, both ok

Ubuntu 14.04: basic256 1.1.2.3 (1.1.2.3-1~ppa1~trusty, maintainer: jim@renejm.com):
* trafficNew ok
* 99bottles negative, i.e., no sound

Siggi
------------------------------------------------------------------------------
Now the code from http://rosettacode.org/wiki/99_Bottles_of_Beer/Basic#BASIC256

#length of querter and eight note in ms
n4 = 1000 * 60 / 80 / 4*2
n8 = n4 / 2

print "hello"

#frequency of musical notes in hz
e = 330
ef = 311
b = 247
bf = 233
f = 349
c = 262
d = 294
ds = 311
a = 220

dim notes(1)
dim lengs(1)

# redim is automatic when using a {} list to assign an array
notes = {ef, ef, ef, bf, bf, bf, ef, ef, ef, ef, f , f , f , c , c , c , f , d , d , d , d , d , d , d , bf, bf, bf, c , c , ef, ef, ef, ef, ef}
lengs = {n8, n8, n8, n8, n8, n8, n8, n8, n8, n4, n8, n8, n8, n8, n8, n8, n4, n4, n8, n8, n8, n8, n8, n4, n8, n8, n8, n8, n8, n8, n8, n8, n8, n4 }

for x = 99 to 1 step -1
print x
for t = 0 to notes[?]-1
if t = 0 then print x + " bottles of beer on the wall"
if t = 11 then print x + " bottles of beer"
if t = 18 then print "Take one down, pass it around"
if t = 25 then print(x-1) + " bottles of beer on the wall"
sound notes[t], lengs[t]
# pause .002
next t
print
next x

3dplotter.kbs with 1.1.4.0 very slow compared with 0.9.6.69

by cub256, Tuesday, February 17, 2015, 18:56 (862 days ago) @ cub256

Jim, if it helps: just found that 3dplotter.kbs from http://basic256.blogspot.de/2010/12/3d-plotter.html is verrrry slow with BASIC-256 1.1.4.0 (Windows 8) compared with BASIC-256 0.9.6.69 (Ubuntu 14.04 repositories).

Siggi

RSS Feed of thread
powered by my little forum