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 > $01 register
2010-09-10 01:25
Kickback

Registered: Apr 2004
Posts: 97
$01 register

I know this was asked most-likely 1000 times already but my mind isn't as it use to be because of age and all LOL!!!

If I swap out all of the rom (store $34 into $01) do I need to have some sort of interrupt enabled? I seem to remember if you have the ROM off to long the system will crash? Is this the case or is it just plain ol bad programming LOL!!!

So basically I have my exomizer decrunch and I do the following....

lda #$34
sta $01

jsr decrunch

lda #$37
sta $01

Which I know the decrunch can take some time and not sure is this is why the system is getting hosed out!

 
... 30 posts hidden. Click here to view all posts....
 
2010-09-12 10:48
Stryyker

Registered: Dec 2001
Posts: 465
Can you tell us more about the decrunch routine? Perhaps that is cuasing all the issues.
2010-09-12 16:51
Kickback

Registered: Apr 2004
Posts: 97
Quote: @Kickback: give $30 a try instead of $34 for the first $01 value.

sei
lda #$30
sta $01

ldx
ldy
jsr decrunch

lda #$37
sta $01
cli

if it works, i'll explain the reason :)


I tried the #$30 and it worked and then tried #$34 and it worked. I also found so stupid shit in my decruncher which was changing $01 also LOL! UGH!!

@Stryyker:
It's a typical Exomizer decruncher nothing special?

Now hopefully this works with the IRQ's turned on and I will be all set!

(keeping fingers crossed!)
2010-09-12 21:34
Skate

Registered: Jul 2003
Posts: 492
@Kickback: yes, crunchers usually ask for $01 value and sets it at the initialization level. you seem to have missed that part.
2010-09-18 13:43
MC
Account closed

Registered: Jul 2009
Posts: 71
To clarify the #$30 / #$34 thing read the CHAREN bit in this:
6510 input/output port ($0001)

NAME 	BIT 	DIRECTION 	DESCRIPTION

LORAM 	0 	OUTPUT		Control for RAM/ROM at
				$A000-$BFFF (BASIC)

HIRAM	1	OUTPUT		Control for RAM/ROM at
				$E000-$FFFF(KERNAl)

CHAREN	2	OUTPUT		Control for I/O/ROM at
				$D000-$DFFF

	3 	OUTPUT 		Cassette write line

	4	INPUT		Cassette switch sense

	5	OUTPUT		Cassette motor control


LORAM (bit 0) can generally be thought of as a control line which banks the 8K byte BASIC ROM in and out of-the microprocessor address space. Normally, this line is HIGH for BASIC operation. If this line is programmed LOW, the BASIC ROM will disappear from the memory map and be replaced by 8K bytes of RAM from $A000-$BFFF.

HIRAM (bit 1) can generally be thought of as a control line which banks the 8K byte KERNALROM in and out of the microprocessor address space. Normally, this line is HIGH for BASIC operation. If this line
is programmed LOW, the KERNALROM will disappear from the memory map and be replaced by 8K bytes of RAM from $E000-$FFFF.

CHAREN (bit 2) is used only to bank the 4K byte character generator ROM in or out of the microprocessor address space. From the processor point of view, the character ROM occupies the same address space as the I/O devices ($D000-$DFFF).When the CHAREN line is set to 1 (as is normal), the I/O devices appear in the microprocessor address space, and the character ROM is not accessable. When the CHAREN bit is cleared to 0, the character ROM appears in the processor address space, and the I/O devices are not accessable. (The microprocessor only needs to access the character ROM when downloading the character set from ROM to RAM. Special care is needed for this... CHAREN can be overridden by other control lines in certain memory configurations. CHAREN will have no effect on any memory configuration without I/O devices. RAM will appear from $D000-$DFFF instead.


Puzzled by the CHAREN stuff which was copied directly from the C64's programmers manual? Short version: Setting the bit enables I/O devices, clearing the bit disables them thus allows the 4K of RAM space from $D000-$DFFF to be used instead.

Ofcourse, you don't want any possible interrupts left running in the ROM areas when switching those ROMS off.

#$30 is therefor probably your best bet when running a decruncher/decompressor type of thing, just switch all the ROM and I/O off to have as much as possible memory.

Just my 2 bits.
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
Knight Rider/TREX
Radd Maxx/SWIM
Guests online: 48
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.7)
5 Edge of Disgrace  (9.6)
6 Comaland 100%  (9.6)
7 Uncensored  (9.6)
8 No Bounds  (9.6)
9 Aliens in Wonderland  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 Layers  (9.6)
2 Cubic Dream  (9.6)
3 Party Elk 2  (9.6)
4 Copper Booze  (9.6)
5 Rainbow Connection  (9.5)
6 It's More Fun to Com..  (9.5)
7 Dawnfall V1.1  (9.5)
8 Birth of a Flower  (9.5)
9 Daah, Those Acid Pil..  (9.5)
10 Quadrants  (9.5)
Top Groups
1 Nostalgia  (9.4)
2 Oxyron  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Offence  (9.3)
Top Logo Graphicians
1 Sander  (9.9)
2 Facet  (9.5)
3 Mermaid  (9.4)
4 Pal  (9.4)
5 Shine  (9.3)

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