I posted this some time ago at the Lemon forum, but I figured it would not be out of place here:
I transfered some of my mathematical BASIC programs from floppy to the PC to use in emulators, but I noticed that some don't work as they should with CCS64.
I isolated a line that CCS64 did not like. Let's say that the { symbol represents the symbol you get if you type SHIFT with the move-cursor-right key on the C64 within quotes (which should give the effect of moving one space to the left with the INPUT and PRINT commands). For some reason, if I have a line such as INPUT"!{{";N in a program, when any number is entered for the input, the message ?REDO FROM START appears. The program is stuck like this -- any attempt to enter a number gives that message.
VICE has no such problem. Is this a bug with CCS64 or what?
By the way, the reason I have such an input line is to put the ! symbol at the left of the screen and have the user enter a number that appears right next to the ! symbol. I read there's a way to get rid of the ? that shows with INPUT lines, so I know I could just program it differently, but what I am curious about here is why CCS64 handles my INPUT line differently than my real C64 and VICE.
An odd BASIC INPUT problem
Moderator: Håkan Sundell
-
Stuart Toomer
- Site Co-Admin
- Posts: 786
- Joined: Wed Aug 20, 2003 2:46 pm
- Location: East Yorkshire, England
-
nicknicknickandnick
- Posts: 17
- Joined: Thu Jan 22, 2004 10:24 am
-
iAN CooG/HF
- Posts: 12
- Joined: Sat Jan 03, 2004 11:42 pm
- Contact:
nicknicknickandnick wrote:Next I replaced the kernal.rom file with VICE's. That fixed it -- the effect disappeared.
Another rev.2 kernal bug, then. Vice uses a rev.3 and many games/demos in CCS work correctly only with this.
What happens in vice if you put the CCS kernal? same bug?
-=[]=--- iAN CooG ---=[]=-
-
nicknicknickandnick
- Posts: 17
- Joined: Thu Jan 22, 2004 10:24 am
This sounds to me like a line-linking problem related to cursoring off the left side of the screen. That would be a C64 Kernal bug rather than an emulation bug. Obviously, switching to a newer ROM revision fixes it.
However, if there's any chance that you may distribute your program, you will probably want more compatibility. One possible workaround would be to put a space before the exclamation point, which would cause the prompt to look like "?!". The question mark can easily be hidden, though, with some fiddling with the horizontal scrolling register. However, other print statements would need to be changed, too, since the leftmost column of the screen is hidden. I'm not even sure that this will get around the problem!
More practical, although more complex, is to have a subroutine that uses GET to handle input. This is what I'd recommend, as it gives you full control over the prompt, what input to handle, and even the cursor if you really want to impress people.
I should probably get a copy of all the different ROM revisions so I can test them with the game I'm working on. It sounds to me like CCS64 has R2, Vice comes with R3... Do I hear R1 anywhere?
However, if there's any chance that you may distribute your program, you will probably want more compatibility. One possible workaround would be to put a space before the exclamation point, which would cause the prompt to look like "?!". The question mark can easily be hidden, though, with some fiddling with the horizontal scrolling register. However, other print statements would need to be changed, too, since the leftmost column of the screen is hidden. I'm not even sure that this will get around the problem!
More practical, although more complex, is to have a subroutine that uses GET to handle input. This is what I'd recommend, as it gives you full control over the prompt, what input to handle, and even the cursor if you really want to impress people.
I should probably get a copy of all the different ROM revisions so I can test them with the game I'm working on. It sounds to me like CCS64 has R2, Vice comes with R3... Do I hear R1 anywhere?
-
nicknicknickandnick
- Posts: 17
- Joined: Thu Jan 22, 2004 10:24 am
-
Stuart Toomer
- Site Co-Admin
- Posts: 786
- Joined: Wed Aug 20, 2003 2:46 pm
- Location: East Yorkshire, England