Reply 20 of 37, by wd
Thanks, i tried different versions of GWBASIC but maybe it works on
basica, should have this somewhere.
Thanks, i tried different versions of GWBASIC but maybe it works on
basica, should have this somewhere.
Awesome solution! I cannot wait to get home and try it.
It sounds like you saying things are happening fast enough that it's triggering a line in the code that would not otherwise be trigged on an older slower computer?
If that's the case, I wonder if you could crank down the cycles on Dosbox enough to get past it as well.
Thanks again!
No, they're using a variable that is, on the basic version that it comes
with, a keyword thus not allowed to be used as variable.
You cannot do anything to/with dosbox to make it work besides patching
the game code (as Kippesoep posted) or find a different version of
basic that doesn't use the keyword.
I'll certainly try changing the code but if it's like was said, why does the game work with the version of BASIC it comes with on a slower machine? If that keyword/variable is not allowed then it should be not be allowed on slow and fast machines???
Thanks for the info!
I haven't tested to see what happens exactly but it is possible that the code will work, but also sets up a timer, which triggers and causes a problem. (Or maybe it simply never works and the difference was the result of timing differences in my own actions -- the old BASIC dialect is very difficult to debug)
My site: Ramblings on mostly tech stuff.
Works like a charm. Good call guys! Thanks!
> why does the game work with the version of BASIC it comes with on a slower machine?
If you have such a version of basic why don't you simply use that version
in dosbox as well???
It comes with the game. The game comes with basica.exe. That works on an old machine but fails in DOSBox. However, regardless of all that, Kippesoep's little fix makes it work with it's own version of basica in DOSBox.
wrote:> why does the game work with the version of BASIC it comes with on a slower machine?
If you have such a version of basic why don't you simply use that version
in dosbox as well???
BASICA.EXE relies on the original IBM ROM BASIC to be present (the ROM that allowed the original PC to boot into BASIC when no OS was detected), so it doesn't work in DOSbox. See e.g. http://en.wikipedia.org/wiki/Microsoft_BASICA_interpreter. I'm not sure how JEmplay can run it on a 286 (iirc) though.
JAL
wrote:I haven't tested to see what happens exactly but it is possible that the code will work, but also sets up a timer, which triggers and causes a problem. (Or maybe it simply never works and the difference was the result of timing differences in my own actions -- the old BASIC dialect is very difficult to debug)
TIMER is a read-only variable in GWBASIC returning the current system time as a floating point number. It doesn't set up any timers. It will therefore always fail. It is possible of course that with certain cycle settings, the offending line isn't executed at all, as it seems to do something with timing.
JAL
wrote:BASICA.EXE relies on the original IBM ROM BASIC to be present (the ROM that allowed the original PC to boot into BASIC when no OS was detected), so it doesn't work in DOSbox.
I'm not sure how JEmplay can run it on a 286 (iirc) though.
The same way as I now run it in DOSBox. I first played this game on a 8088. Then again later on a 286.
wrote:TIMER is a read-only variable in GWBASIC returning the current system time as a floating point number.
Actually, that's the TIMER function. There is also a TIMER statement, which sets up timers. The function is the more likely candidate, but I'm not really sure what old GWBASIC does with these in invalid code.
Either way, TIMER is a reserved word in whatever BASIC ROM is present in newer versions of windows, but was not a reserved word in whatever BASIC ROM was available on older machines.
Makes sense to me.
wrote:Either way, TIMER is a reserved word in whatever BASIC ROM is present in newer versions of windows, but was not a reserved word in whatever BASIC ROM was available on older machines.
Makes sense to me.
Except it doesn't. After the original IBM PC (maybe the XT, too, I'm not sure) PC's haven't had ROM BASIC. Nor does it have anything to do with Windows. BASICA.EXE used ROM BASIC. The EXE included with the game is GWBASIC.EXE (renamed to BASICA.EXE), though, which includes its own BASIC interpreter without depending on ROM BASIC.
This is probably what caused the problem. TIMER might not have been a reserved word in ROM BASIC. To get the game to run on newer PCs (286 or better), BASICA had to be replaced with GWBASIC, which has TIMER as a reserved word.
Well but JEmlay said that the game came with a basica.exe (GWBASIC)
that worked on his old pc.
I couldn't find any gwbasic version that worked with the game.
wrote:Well but JEmlay said that the game came with a basica.exe (GWBASIC)
that worked on his old pc.
I couldn't find any gwbasic version that worked with the game.
Later basica versions must have included a copy of the ROM in case the ROM wasn't present. I remember both BASIC.EXE and BASICA.EXE being present. Can't remember exactly though...
JAL
wrote:wrote:TIMER is a read-only variable in GWBASIC returning the current system time as a floating point number.
Actually, that's the TIMER function. There is also a TIMER statement, which sets up timers. The function is the more likely candidate, but I'm not really sure what old GWBASIC does with these in invalid code.
You are right, TIMER is a function. There's an ON TIMER(n) GOSUB statement to trap after n seconds after the last TIMER ON statement, but I cannot see how that could be a candidate. I attached a HTML version of the GW-BASIC manual.
JAL
Cool. The hardcopy version I have is quite literally falling apart.
My site: Ramblings on mostly tech stuff.