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 > Reading RAM under ROM at $e000 doesn't work
2014-02-19 15:44
Peabrain
Account closed

Registered: Feb 2003
Posts: 24
Reading RAM under ROM at $e000 doesn't work

hello,

i try to read the memory under the kernal rom, but it doesn't work.
my $01 config is $35. so the processor should read it.
if i use another config my program crashed. so what could i do?

please help.

thanks.
2014-02-19 15:47
JackAsser

Registered: Jun 2002
Posts: 2014
That should work. Did it crash? Perhaps you're using IRQ on kernel-vector $0314/15? If you set $01 to #$35 then the HW IRQ-vector at $fffe/ffff will also be seen as RAM by the CPU hence point to oblivion unless you've explicitly set it.
2014-02-19 15:53
algorithm

Registered: May 2002
Posts: 705
Did you check the data direction port register at $00? By default if you have left this location as it is, then this should not be a problem.

and i know you may have done this already but check that it is #$35 instead of $35 :-)
2014-02-19 17:55
Peabrain
Account closed

Registered: Feb 2003
Posts: 24
i use the hw irq vector. and it don't crash if #$35 in $01. in $00 is #$2f.

if:
$e000 -> $00

and i do

lda $e000
sta $e000

then:

$e000 -> ?? but not $00

that my problem. :-/
2014-02-19 17:59
Zyron

Registered: Jan 2002
Posts: 2381
So what do you get in $e000?
2014-02-19 17:59
Peabrain
Account closed

Registered: Feb 2003
Posts: 24
ok, i got the problem. thats happen, if you use cc65 and assembler.
it seems to be that the cc65 overwrites my value in $01.

thats bad.

if i write:

ldx $01
lda #$35
sta $01

lda $e000
sta $e000

stx $01

this is running.
damned.
2014-02-19 17:59
chatGPZ

Registered: Dec 2001
Posts: 11386
you really should post a snippet of code that doesnt work... else it is shooting in the dark :=) it must be some stupid little trival thing that you are overlooking =)
2014-02-19 18:15
Peabrain
Account closed

Registered: Feb 2003
Posts: 24
thats a little bit too huge. :D
but i checked the cc65 specs. the normal projectseting are with kernelroms enabled.
and i must visit the documentation. its not a problem of my code :)
2014-02-19 18:16
Oswald

Registered: Apr 2002
Posts: 5094
if you dont have high expectations from an assembler other than compiling your lda sta code, maybe macro a bit, and generate some tables, then you better use 64tass. cc65 is an overcomplicated bloated shit if you are not close to a genius.
2014-02-19 18:17
enthusi

Registered: May 2004
Posts: 677
+ cc65 is no assembler
2014-02-19 18:21
Peabrain
Account closed

Registered: Feb 2003
Posts: 24
yes. but i use cc65 for my c code and as linker for my assembler stuff.
2014-02-19 18:45
Mace

Registered: May 2002
Posts: 1799
You don't have to post the enitre code, just the relevant parts.
If you don't put effort in it, don't expect us to solve the problem.
2014-02-19 18:46
Oswald

Registered: Apr 2002
Posts: 5094
then bad news.. probably you got the complicated memory / linker / whatever config wrong somewhere.

in 64tass sei lda #$35 sta $01 just works.
2014-02-19 19:17
chatGPZ

Registered: Dec 2001
Posts: 11386
Quote:
cc65 is an overcomplicated bloated shit if you are not close to a genius.

bullshit. only because the only thing you can deal with are trivial onefile assemblers, more featured ones arent made for geniuses. or well, maybe they are, and thats why certain people struggle so much with them :o)

peabrain: if you are using a C/asm combination, then make sure to understand the runtime environment - which has kernal enabled and basic disabled and kernal irq running. if you need to modify $01 to access ram under kernal, you should disable interrupts while the kernal is disabled (else it will crash)
2014-02-19 20:10
Oswald

Registered: Apr 2002
Posts: 5094
how about checking what cc65 actually assembled? maybe its a totally different adress there.

"hats happen, if you use cc65 and assembler. it seems to be that the cc65 overwrites my value in $01."

and from this its clear peabrain doesnt really understand whats going on in cc65, perhaps not for the average coder if even ROM mapping is problematic... I think its still overcomplicated for the average c64 project. I know guys like ninja can really use it well, but definitly not for me!
2014-02-19 20:19
chatGPZ

Registered: Dec 2001
Posts: 11386
ninja never used cc65 at all =) don't mix up cc65 (the c-compiler) and ca65 (the assembler).

doing a mixed asm and C project isnt trivial and not for the average coder in any case, any platform, and using any compiler. you definately need to know some stuff about the compiler internals and its runtime environment in such projects - but thats just natural.

that said, it really isnt all that complicated either - and it is documented as well. as an example on accessing the ram under kernal, look at the default "extended memory" driver source for c64 (which does just that).
2014-02-19 21:08
Beastifire
Account closed

Registered: Mar 2013
Posts: 40
I guess it's a bit of a general problem in modern computing - to have so many layers of complexity that problems get hard to debug. With today's cross-platform development systems, these problems were bound to enter our scene too.
2014-02-19 21:37
chatGPZ

Registered: Dec 2001
Posts: 11386
except this problem has nothing to do with all that. the exact same problem exists when doing the same thing using a native compiler on a PET.
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
Guests online: 91
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 Edge of Disgrace  (9.6)
6 What Is The Matrix 2  (9.6)
7 The Demo Coder  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 No Listen  (9.6)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 Dawnfall V1.1  (9.5)
7 Rainbow Connection  (9.5)
8 Onscreen 5k  (9.5)
9 Morph  (9.5)
10 Libertongo  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Triad  (9.3)
5 Censor Design  (9.3)
Top Logo Graphicians
1 t0m3000  (10)
2 Sander  (9.8)
3 Mermaid  (9.5)
4 Facet  (9.4)
5 Shine  (9.4)

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