Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in 
CSDb User Forums


Forums > C64 Coding > Basic emulator
2020-12-22 15:57
Sasq

Registered: Apr 2004
Posts: 146
Basic emulator

How much of the C64 do you need to emulate to run (poke free) basic programs ?
 
... 29 posts hidden. Click here to view all posts....
 
2020-12-26 16:49
Sasq

Registered: Apr 2004
Posts: 146
So it's just RUN with no argument that doesn't work.

10 PRINT "HEY"
20 GOTO 10
RUN 10

works

maybe the parser seems some extra character at EOL ?

Does the line parser look at the screen or does it remember typed chars ? Because cursor blinking does not work properly.
2020-12-26 17:15
Martin Piper

Registered: Nov 2007
Posts: 417
The line parser looks at the screen data.

"RUN" with something in the screen other than spaces can produce "UNDEF'D STATEMENT" errors.
2020-12-26 17:18
Martin Piper

Registered: Nov 2007
Posts: 417
Cursor flash is done by the standard IRQ routine usually found at $ea31:

>> Flash cursor code starts
EA34 A5 CC LDA $CC ; flash cursor
EA36 D0 29 BNE $EA61
EA38 C6 CD DEC $CD
EA3A D0 25 BNE $EA61
EA3C A9 14 LDA #$14
EA3E 85 CD STA $CD
EA40 A4 D3 LDY $D3
EA42 46 CF LSR $CF
EA44 AE 87 02 LDX $0287
EA47 B1 D1 LDA ($D1),Y
EA49 B0 11 BCS $EA5C
EA4B E6 CF INC $CF
EA4D 85 CE STA $CE
EA4F 20 24 EA JSR $EA24
EA52 B1 F3 LDA ($F3),Y
EA54 8D 87 02 STA $0287
EA57 AE 86 02 LDX $0286
EA5A A5 CE LDA $CE
EA5C 49 80 EOR #$80
EA5E 20 1C EA JSR $EA1C ; display cursor
2020-12-26 18:16
tlr

Registered: Sep 2003
Posts: 1431
Quoting Sasq
So.. the weird error messages turned out to be because my PLA did not affect flags (need to use a better 6502 reference :)

As suspected, though it really surprises me that the Dormann tests wouldn't check that PLA sets flags correctly.
As an alternative I can recommend Wolfgang Lorenz' testsuite which seems to be fairly extensive. I used that for the nu6502 core in blitz.
2020-12-26 18:32
Sasq

Registered: Apr 2004
Posts: 146
Checking screen memory, "RUN" is followed by SPACE so that looks right...
2020-12-26 19:16
tlr

Registered: Sep 2003
Posts: 1431
Quote: Checking screen memory, "RUN" is followed by SPACE so that looks right...

Test with "RUN:" and see if that changes anything.

If there are uncertainties about the CPU, debugging this may be really tedious though. Maybe there are other flag issues?
2020-12-26 19:30
Sasq

Registered: Apr 2004
Posts: 146
I actually just tried colon and it didn't help. Yeah next step should be checking out the suggested test suite
2020-12-26 19:37
tlr

Registered: Sep 2003
Posts: 1431
The CHRGET/CHRGOT routine at $0073 does a bit of flag setting related to parsing, might be another clue.
2020-12-27 02:21
chancer

Registered: Apr 2003
Posts: 286
due to how poor the basic is, maybe making routines based on other machines would be good. OR an optimized Simons basic etc. the BBC micro is good basic wise BUT that has it's issues also. i.e. 20k of ram taken with screen (out of 32k)

things like laser basic / oasis.. etc. ran too slow and took up too much ram.

I doubt I'm the only one who had another machine, and thought WHY is the basic so poor, given the nice hardware.
2020-12-27 10:09
Oswald

Registered: Apr 2002
Posts: 4667
I had no other machine and had no idea basic could be any better for a long time :) Graphics Basic is the best extension btw it has things you havent even dreamed off.
Previous - 1 | 2 | 3 | 4 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Flex/Artline Designs
A3/AFL
Fred/Channel 4
Brittle/Demozoo
psych858o/MSL/Elysiu..
sailor/Triad
JackAsser/Booze Design
Frostbyte/ALD/Siesta
Guests online: 59
Top Demos
1 Christmas Megademo  (9.7)
2 Uncensored  (9.6)
3 Edge of Disgrace  (9.6)
4 Unboxed  (9.6)
5 Coma Light 13  (9.6)
6 Memento Mori  (9.6)
7 Lunatico  (9.6)
8 Comaland 100%  (9.6)
9 The Shores of Reflec..  (9.5)
10 Protogeo 100%  (9.5)
Top onefile Demos
1 Copper Booze  (9.8)
2 To Norah  (9.8)
3 Lovecats  (9.6)
4 Elite Code Mechanics  (9.6)
5 The Sprite Demo  (9.6)
6 Square Booze  (9.5)
7 Daah, Those Acid Pil..  (9.5)
8 Dawnfall V1.1  (9.5)
9 Quadrants  (9.5)
10 Hyperborea  (9.5)
Top Groups
1 Booze Design  (9.4)
2 Censor Design  (9.4)
3 Fossil  (9.4)
4 Oxyron  (9.3)
5 PriorArt  (9.3)
Top Graphicians
1 Lobo  (10)
2 Mirage  (9.8)
3 Archmage  (9.7)
4 Razorback  (9.6)
5 Mikael  (9.6)

Home - Disclaimer
Copyright © No Name 2001-2021
Page generated in: 0.049 sec.