| |
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.... |
| |
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. |
| |
Martin Piper
Registered: Nov 2007 Posts: 634 |
The line parser looks at the screen data.
"RUN" with something in the screen other than spaces can produce "UNDEF'D STATEMENT" errors. |
| |
Martin Piper
Registered: Nov 2007 Posts: 634 |
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 |
| |
tlr
Registered: Sep 2003 Posts: 1714 |
Quoting SasqSo.. 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. |
| |
Sasq
Registered: Apr 2004 Posts: 155 |
Checking screen memory, "RUN" is followed by SPACE so that looks right... |
| |
tlr
Registered: Sep 2003 Posts: 1714 |
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? |
| |
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 |
| |
tlr
Registered: Sep 2003 Posts: 1714 |
The CHRGET/CHRGOT routine at $0073 does a bit of flag setting related to parsing, might be another clue. |
| |
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. |
| |
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 |