| |
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.... |
| |
JackAsser
Registered: Jun 2002 Posts: 1987 |
Quote: I only handle dc00/dc01 keys and run the IRQ, and it seems to work, excpet if I try RUN I get:
READY.
RUN
?UNDEF'D STATEMENTBAD SUBSCRIPTREDIM'D A
RRAYDIVISION BY ZEROILLEGAL DIRECTTYPE M
ISMATCHSTRING TOO LONGFILE DATAFORMULA T
OO COMPLE ERROR
READY.
What could be wrong ?
Have you ”booted” up using the reset-vector at all? Is memory read/write under rom properly implemented so the free mem calcs gets correcto etc? |
| |
Krill
Registered: Apr 2002 Posts: 2825 |
Quoting JackAsserHave you ”booted” up using the reset-vector at all? Is memory read/write under rom properly implemented so the free mem calcs gets correcto etc? My bet is on what tlr suggested. BASIC VM needs very little physical machine action to function properly. Where does C-64's BASIC V2 actually reach to RAM beyond $9FFF? =) |
| |
Martin Piper
Registered: Nov 2007 Posts: 631 |
When I was running kernal and basic ROMs on my TTL CPU I didn't need to support ROM RAM banking. |
| |
Sasq
Registered: Apr 2004 Posts: 155 |
Banking is not implemented.
A000-BFFF and E000-FFFF is read only, ram below is not accessible.
IO areas does not wrap around correctly, and most registers just return 0.
CPU should be good, tested with the Klaus Dormann 6502 test.
(although interrupts are newly added and has not been well tested). |
| |
JackAsser
Registered: Jun 2002 Posts: 1987 |
Quote: Quoting JackAsserHave you ”booted” up using the reset-vector at all? Is memory read/write under rom properly implemented so the free mem calcs gets correcto etc? My bet is on what tlr suggested. BASIC VM needs very little physical machine action to function properly. Where does C-64's BASIC V2 actually reach to RAM beyond $9FFF? =)
Referring to the mem test loop to determine basic bytes free |
| |
Sasq
Registered: Apr 2004 Posts: 155 |
So write goes through to the underlying RAM, but there is no way to read so I don't see that it matters.
How does the memory test work ? |
| |
JackAsser
Registered: Jun 2002 Posts: 1987 |
Quote: So write goes through to the underlying RAM, but there is no way to read so I don't see that it matters.
How does the memory test work ?
Part of initialize sys constants: http://unusedino.de/ec64/technical/aay/c64/romfd50.htm
It writes forward in memory #$55 and reads it back until it doesn’t get #$55 anymore, i.e. hitting ROM.
Basic then calls http://unusedino.de/ec64/technical/aay/c64/rome3bf.htm to get min/max RAM pointers to calc avail memory for basic, and set up stack and string buffers properly. |
| |
chatGPZ
Registered: Dec 2001 Posts: 11100 |
just preload the initial ram dump (fish out of hoxs64 directory) and stub out the ram test/init junk :) |
| |
JackAsser
Registered: Jun 2002 Posts: 1987 |
Quote: just preload the initial ram dump (fish out of hoxs64 directory) and stub out the ram test/init junk :)
That works! |
| |
Sasq
Registered: Apr 2004 Posts: 155 |
So.. the weird error messages turned out to be because my PLA did not affect flags (need to use a better 6502 reference :)
I still now have the problem that RUN always reports
"UNDEF'ED STATEMENT" |
Previous - 1 | 2 | 3 | 4 - Next |