[Coco] GIME questions

jdaggett at gate.net jdaggett at gate.net
Mon Aug 16 08:40:09 EDT 2004


David

Okay lets understand what you are doing:

1) You are trying to copy something from ROM to RAM and you are  not sure that it 
is copied. 

First off when the startup code writes $0A to $FF90 the MMU is turned off and  you 
have 32K of internal ROM mapped from $8000 to $FFFF and 32K of RAM mapped 
from $0000 to $7FFFF. This is your logical address space. The way I understand 
the GIME operation is when the MMU is turned off the top 64K of physical memeory 
is used. That is A16 to A18 are set to "1".

A question about what you are doing:

1) is the write to $FF90 with $0A your code? If so why are you turning the MMU off 
while in COCO3 mode? 

2) in copying ROM to RAM, I see that you are using the Y-register to point to RAM. 
Is the X-register pointing to ROM? 

3) Are you reading back RAM after every byte copied from ROM or after the block 
is copied?

4) Does you code turn the MMU back on after copying ROM?

It wou ld  help to see a bit of the code fragment to get a better idea of what is going 
on. Initially it looks as if you are turning the MMU off and when verification is ran 
you are pointing to ROM insteread of RAM. 

To copy from $C03F to $4000 I would do something like this

	rombase equ $c03f
	rambase equ $4000
	romtop equ rombase+$XXXX	;how many words to copy plus 1
write	ldx rombase   	;X pointing to ROM
	ldy rambase   	;Y pointing to RAM
loop	ldd ,x++  	; load D with first word
	std ,y++  	; store it to RAM
	cmpx romtop
	bne loop
verf	ldx rombase
	ldy rambase
loop2	ldd ,Y++
	cmpd ,X++
	beq loop2
	end	
	
james

On 15 Aug 2004 at 21:48, David Gacke wrote:

From:           	"David Gacke" <dgacke at ektarion.com>
To:             	"Coco List" <coco at maltedmedia.com>
Date sent:      	Sun, 15 Aug 2004 21:48:33 -0500
Subject:        	[Coco] GIME questions
Send reply to:  	CoCoList for Color Computer Enthusiasts 
<coco at maltedmedia.com>
	<mailto:coco-
request at maltedmedia.com?subject=unsubscribe>
	<mailto:coco-
request at maltedmedia.com?subject=subscribe>

> Hi Guys,
> 
> I've got a GIME problem and I'm not sure what's going wrong. For some
> reason, "I think", it's not mapping RAM correctly.
> 
> I'm stepping thru the startup ROM code on my CoCo 3, which matches the
> version I'm looking at in MESS. Just a plain old CoCo3 ROM.
> 
> Anyway, there's a write to $FF90 with a value of 0x0A, then there's
> some startup code to set palette registers to all green, then there's
> some code to start copying code from $C03F to $4000.
> 
> This is where I get into trouble. Immediately after writing the first
> word, with the STD, Y++ instruction, I read back the contents. The
> address I'm reading from is $4000 and I'm seeing the same data that is
> at $C000.
> 
> For some reason, it didn't get $4000 mapped correctly, it is still
> pointing to ROM. Also, are there any special conditions I should be
> aware of when writing these GIME registers, like wait states, etc.
> 
> Any help would be GREATLY appreciated.  :)
> 
> 
> 
> Dave Gacke
> 
> 
> Oh! As a side note, I've verified the data and addresses are correct
> with a scope, so at least my wiring is good!
> 
> 
> 
> -- 
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco





More information about the Coco mailing list