BasinC oddnesses

The place for codemasters or beginners to talk about programming any language for the Spectrum.
User avatar
Fahnn
Microbot
Posts: 135
Joined: Sun Jan 27, 2019 7:56 pm
Location: Redcar, UK
Contact:

Re: BasinC oddnesses

Post by Fahnn »

Joefish wrote: Mon May 13, 2019 7:34 pm It's a tool for programming BASIC to run on a real Spectrum or under emulation. I'd expect it to do exactly what a Spectrum does.
If you want correct answers - not to mention a faster response - I'd suggest using another BASIC. I hear BBC BASIC is pretty fast... :lol:

I suppose you could try out your BASIC on an emulator with an enhanced version of the spectrum ROM, but that's not the point of BasinC. There are other better BASICs out there.
Yeah. I guess I didn't really think about this properly. I'm not normally this dense but sometimes I get a bit frustrated.

I'd still be interested to know why some of my lines go missing though. I still can't figure out what's causing that. Possibly it's just me.
User avatar
Turtle_Quality
Manic Miner
Posts: 504
Joined: Fri Dec 07, 2018 10:19 pm

Re: BasinC oddnesses

Post by Turtle_Quality »

BasinC is an emulator with a brilliant front end, that apparently has line number issues some times.

It's not made to improve Spectrum basic, but to make it easier create Spectrum Basic. If you made your porn simulator with a tweaked rom, you'd likely be the only one playing it, and the world would not be quite so culturally enriched.

There are altered ROMs out there, I found a list here http://zxspectrum.it.omegahg.com/_48.htm

In the docs for the most well known, Gosh Wonderful Rom the division issue was discussed and the author decided it was not a bug and should not be fixed. It looks like the Plus4 Rom does fix it but also makes a host of other improvements that you might not want or would likely interfere with BasinC.

For what it's worth, I remember banging my head on the desk as a 16 year old because the simplest basic line wasn't working correctly... until I realised it was the Spectrum that was getting the answer wrong.
Definition of loop : see loop
User avatar
Turtle_Quality
Manic Miner
Posts: 504
Joined: Fri Dec 07, 2018 10:19 pm

Re: BasinC oddnesses

Post by Turtle_Quality »

Ok seems while researching my answer the conversation had left me behind :)
Definition of loop : see loop
User avatar
ZXDunny
Manic Miner
Posts: 498
Joined: Tue Nov 14, 2017 3:45 pm

Re: BasinC oddnesses

Post by ZXDunny »

Fahnn wrote: Mon May 13, 2019 7:49 pm
Joefish wrote: Mon May 13, 2019 7:34 pm It's a tool for programming BASIC to run on a real Spectrum or under emulation. I'd expect it to do exactly what a Spectrum does.
If you want correct answers - not to mention a faster response - I'd suggest using another BASIC. I hear BBC BASIC is pretty fast... :lol:

I suppose you could try out your BASIC on an emulator with an enhanced version of the spectrum ROM, but that's not the point of BasinC. There are other better BASICs out there.
Yeah. I guess I didn't really think about this properly. I'm not normally this dense but sometimes I get a bit frustrated.

I'd still be interested to know why some of my lines go missing though. I still can't figure out what's causing that. Possibly it's just me.
I doubt it. There are some pretty nasty bugs in BASin, and it's not been left in a very good state, at least originally.

I have no problem with BASin supporting modified ROMs, but it will require a rebuild of BASin as it hooks x86 code directly into the ROM to do what it does. If anyone wants to do that, I have no issue with it - as long as it still supports the original ROM.
User avatar
Fahnn
Microbot
Posts: 135
Joined: Sun Jan 27, 2019 7:56 pm
Location: Redcar, UK
Contact:

Re: BasinC oddnesses

Post by Fahnn »

ZXDunny wrote: Mon May 13, 2019 8:15 pm
Fahnn wrote: Mon May 13, 2019 7:49 pm Yeah. I guess I didn't really think about this properly. I'm not normally this dense but sometimes I get a bit frustrated.

I'd still be interested to know why some of my lines go missing though. I still can't figure out what's causing that. Possibly it's just me.
I doubt it. There are some pretty nasty bugs in BASin, and it's not been left in a very good state, at least originally.

I have no problem with BASin supporting modified ROMs, but it will require a rebuild of BASin as it hooks x86 code directly into the ROM to do what it does. If anyone wants to do that, I have no issue with it - as long as it still supports the original ROM.
I really appreciate your answers here and please don't make any changes on my account. My frustrations were borne of ignorance and I know that anything I'm finding problematic can easily be worked around. I'm still kind of new to this, and it's amazing to find that there are easier alternatives to programming on an emulator, to be honest. Basically (pun intended), ignore me.
User avatar
ZXDunny
Manic Miner
Posts: 498
Joined: Tue Nov 14, 2017 3:45 pm

Re: BasinC oddnesses

Post by ZXDunny »

Oh, I don't ignore people - I do listen, but I have strict criteria as to what BASin is, and what it can do. I will be going back to it at some point and fixing the bugs - once I've gotten bored of SpecBAS, that is. I've a ZXSpin re-write on the cards too, and that will likely be getting all of BASin's functionality embedded in there too.

So much to do, so little time. But SpecBAS comes first.
hikoki
Manic Miner
Posts: 576
Joined: Thu Nov 16, 2017 10:54 am

Re: BasinC oddnesses

Post by hikoki »

Fahnn wrote: Mon May 13, 2019 5:14 pm 1. Lines or parts of lines seem to be deleted on saving and reloading. I think it's something to do with where the cursor is on saving; if it's outside of a line, all is fine, but if it's within a line, parts sometimes go missing.
A couple of things that seem to alleviate this issue: Press control+z and your lines will reappear. Press Enter often, above all before navigatigating through lines with cursors when you are still editing the current line.
User avatar
ZXDunny
Manic Miner
Posts: 498
Joined: Tue Nov 14, 2017 3:45 pm

Re: BasinC oddnesses

Post by ZXDunny »

Ah, I know what's going on there. BASin works on the code held in Spectrum RAM - it doesn't store it as text anywhere while editing. If you don't press ENTER to submit the line, then it doesn't exist. There may be other bugs. As I said previously, I'll look into it when I get time.
User avatar
Joefish
Rick Dangerous
Posts: 2058
Joined: Tue Nov 14, 2017 10:26 am

Re: BasinC oddnesses

Post by Joefish »

That explains why the saving is done as a snapshot (although it's not always a reliable one!)
I always take care to save a text copy of the listing in case I can't recover the snapshot.
It's a great tool, and it's handy for writing editors for Speccy graphics and data in BASIC for games (particularly if you transfer them to ZXSpin and whack the speed up). Then you can load the machine code in to display and test your graphics alongside the BASIC editor you've written.
User avatar
Fahnn
Microbot
Posts: 135
Joined: Sun Jan 27, 2019 7:56 pm
Location: Redcar, UK
Contact:

Re: BasinC oddnesses

Post by Fahnn »

Thanks to everyone for the replies, there's a lot here that I'd not considered and will bear it all in mind. Obviously I'm going to persevere with it, I do genuinely think it's great. It might seem trivial, but not having to remember where all the keywords and symbols are is such a time-saver in itself!
User avatar
Fahnn
Microbot
Posts: 135
Joined: Sun Jan 27, 2019 7:56 pm
Location: Redcar, UK
Contact:

Re: BasinC oddnesses

Post by Fahnn »

OK, here's an odd one. I've been messing with something for the last couple of days and saving it as a .bas file. Everything was fine, the file was saved and re-opened probably ten times or more with no problems, until today. Attempting to open it does nothing, there is apparently no program.

It's not actually a problem as I have a .txt listing of what I'd written so far (interestingly, I got this from uploading the .bas file and then trying to download it; instead of a download, I got a text listing of variables from its last run and then the entire program, which was helpful).

I'm a little bit wary of using BasinC again if this kind of thing is going to happen. Prior to this I'd only had lines going missing (or randomly re-numbered) and I could deal with that, but potentially losing entire programs is another issue (even though it's possible to get them back, it's a pain to have to do that). It's a shame because I think it's generally a really great environment for writing BASIC.

Tell me what I'm doing wrong. I must be doing something wrong.
hikoki
Manic Miner
Posts: 576
Joined: Thu Nov 16, 2017 10:54 am

Re: BasinC oddnesses

Post by hikoki »

Did you rename the file with a really long name?
Something like that happened to me after renaming, Basinc erased the content not only in ram but also on the saved file.
User avatar
Fahnn
Microbot
Posts: 135
Joined: Sun Jan 27, 2019 7:56 pm
Location: Redcar, UK
Contact:

Re: BasinC oddnesses

Post by Fahnn »

hikoki wrote: Sat Aug 17, 2019 7:44 pm Did you rename the file with a really long name?
Something like that happened to me after renaming, Basinc erased the content not only in ram but also on the saved file.
Nope, it was called "d".bas. Maybe too short names also mess it up!
ASH-II
Drutt
Posts: 11
Joined: Sun Jun 16, 2019 11:48 am

Re: BasinC oddnesses

Post by ASH-II »

As the author of BASin has said it might have a few bugs and it will be fixed but not yet (and he is hinting it will be merged into a shiny new Spin :) )

so if you are having an issue with saving then save as a .bas and before you exit basin just copy the text into notepad and save that.
if the .bas fails (1 in 10 chance) then paste the text from the saved notepad. nothing has been lost.

As you yourself say the advantages to using BASin far outway a little save/load glitch.
llewelyn
Manic Miner
Posts: 205
Joined: Thu Feb 22, 2018 3:27 pm
Location: virginias eastern shore
Contact:

Re: BasinC oddnesses

Post by llewelyn »

Mine won't work at all and I don't know why. I downloaded it, installed it into my Programs folder and it comes up when clicked but all the directories show up as names, such as 'welcome' but have a question mark where the icons are and clicking on them gets an empty screen! Its been unzipped properly and checking file size shows that there's something there alright. So frustrated, I just leave it in place, hoping someday perhaps I'd find a solution.

Oddly enough the first time I used it a couple of years ago, it all worked properly! Computer weirdness beyond my ken.
User avatar
Fahnn
Microbot
Posts: 135
Joined: Sun Jan 27, 2019 7:56 pm
Location: Redcar, UK
Contact:

Re: BasinC oddnesses

Post by Fahnn »

ASH-II wrote: Sun Aug 18, 2019 8:08 am As the author of BASin has said it might have a few bugs and it will be fixed but not yet (and he is hinting it will be merged into a shiny new Spin :) )

so if you are having an issue with saving then save as a .bas and before you exit basin just copy the text into notepad and save that.
if the .bas fails (1 in 10 chance) then paste the text from the saved notepad. nothing has been lost.

As you yourself say the advantages to using BASin far outway a little save/load glitch.
Yes, I'll persevere, as it really is a fantastic tool for writing BASIC. Knowing that the listing can be retrieved from a non-working .bas file certainly makes it easier to deal with any potential errors of this kind that might happen in the future. Fingers crossed it doesn't become a regular thing though!
User avatar
ZXDunny
Manic Miner
Posts: 498
Joined: Tue Nov 14, 2017 3:45 pm

Re: BasinC oddnesses

Post by ZXDunny »

You might like to send me the offending .bas file for examination. When I do eventually get around to working in BASin again I can fix the issue.

[email protected]
hikoki
Manic Miner
Posts: 576
Joined: Thu Nov 16, 2017 10:54 am

Re: BasinC oddnesses

Post by hikoki »

ZXDunny wrote: Sun Aug 18, 2019 7:57 pm You might like to send me the offending .bas file for examination. When I do eventually get around to working in BASin again I can fix the issue.

[email protected]
[mention]ZXDunny[/mention] please try this, rename a .bas file with a very long name and open it with Basin
Post Reply