Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user maak ! (Registered 2024-04-18) 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-25 23:05
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?
2020-12-25 23:40
Krill

Registered: Apr 2002
Posts: 2825
Quoting JackAsser
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?
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? =)
2020-12-26 06:29
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.
2020-12-26 08:20
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).
2020-12-26 09:35
JackAsser

Registered: Jun 2002
Posts: 1987
Quote: Quoting JackAsser
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?
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
2020-12-26 10:58
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 ?
2020-12-26 11:44
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.
2020-12-26 12:37
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 :)
2020-12-26 13:24
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!
2020-12-26 16:28
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
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
E$G/hOKUtO fOrcE
Guests online: 67
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 Organizers
1 Burglar  (9.9)
2 Sixx  (9.8)
3 hedning  (9.7)
4 Irata  (9.7)
5 MWS  (9.6)

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