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


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

Registered: Apr 2004
Posts: 155
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: 155
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: 631
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: 631
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: 1705
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: 155
Checking screen memory, "RUN" is followed by SPACE so that looks right...
2020-12-26 19:16
tlr

Registered: Sep 2003
Posts: 1705
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: 155
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: 1705
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: 342
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: 5017
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
Courage
CA$H/TRiAD
Krill/Plush
ALIEN
Freeze/Blazon
JackAsser/Booze Design
jicas/Patagonia
Guests online: 78
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 Wonderland XIV  (9.6)
9 The Ghost  (9.6)
10 Bromance  (9.6)
Top onefile Demos
1 It's More Fun to Com..  (9.8)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 Rainbow Connection  (9.5)
6 Wafer Demo  (9.5)
7 TRSAC, Gabber & Pebe..  (9.5)
8 Onscreen 5k  (9.5)
9 Dawnfall V1.1  (9.5)
10 Quadrants  (9.5)
Top Groups
1 Oxyron  (9.3)
2 Nostalgia  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Fullscreen Graphicians
1 Carrion  (9.8)
2 Joe  (9.8)
3 Duce  (9.8)
4 Mirage  (9.7)
5 Facet  (9.7)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.04 sec.