<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Fri, 05 Feb 2016 16:51:33 +0000 (UTC)
From   : kranser@... (Steve Fewell)
Subject: Emulation

Hi Julian,

It looks like &0356 should contain values between 0 and 4. In your code fragment
(below), 0 would JMP to &CC02, 1 would JMP to &CC32, 2 would JMP to &CC7A,
3 would JMP to &CC92 and 4 would JMP to &CCE6
So a value of &0E definitely seems incorrect to me.

Hope that helps.
Steve.
      From: Julian Stenning <julian_stenning@...>
 To: Steve Fewell <kranser@...>; BBC Mailing List <bbc-micro at
cloud9.co.uk> 
 Sent: Friday, 5 February 2016, 14:58
 Subject: RE: [BBC-Micro] Emulation
   
#yiv3295970127 #yiv3295970127 --.yiv3295970127hmmessage P{margin:0px;padding:0px;}#yiv3295970127
body.yiv3295970127hmmessage{font-size:12pt;font-family:Calibri;}#yiv3295970127
Hi,
C454-8 look good, same content as the disassembly,?&0356 contains 0E at termination
(0357 is FF, if that helps). Does that indicate anything?

Date: Fri, 5 Feb 2016 14:25:15 +0000
From: kranser@...
To: julian_stenning@...; bbc-micro@...
Subject: Re: [BBC-Micro] Emulation

Hi Julian,

Maybe your data at &0356 (memory map type) is incorrect, or the &C454-&C458
table (as specified at http://mdfs.net/Docs/Comp/BBC/OS1-20/C300) is incorrect.
Just some thoughts...

Steve.

      From: Julian Stenning <julian_stenning@...>
 To: BBC Mailing List <bbc-micro@...> 
 Sent: Friday, 5 February 2016, 13:31
 Subject: [BBC-Micro] Emulation
  
#yiv3295970127 #yiv3295970127 --.yiv3295970127ExternalClass #yiv3295970127ecxyiv8974737304 
.yiv3295970127ecxyiv8974737304hmmessage P {padding:0px;}#yiv3295970127 .yiv3295970127ExternalClass
#yiv3295970127ecxyiv8974737304 body.yiv3295970127ecxyiv8974737304hmmessage
{font-size:12pt;font-family:Calibri;}#yiv3295970127 Hello,
In order to boost my knowledge of PowerShell (a Microsoft scripting language 
useful for my work) I gave myself a task of writing a 6502 emulator as an 
objective. It's a pretty simple affair but has been a very good learning 
tool and I wondered what would happen if I loaded the OS 1.2 Rom in to memory
and tried running it. Using the really handy disassembly info on MDFS.net
I could see if my emulation was working as I stepped through the instructions
from &D9CD.
So I wondered how far I could take this in order to extend the exercise, 
perhaps I could get the OS boot sequence to complete. At this point I must
say that I'm not (yet) emulating any other hardware, timers,?or dealing with
interrupts, I'm simply running through the 6502 opcodes & taking the appropriate
action.
The emulation plods away through the memory initialisation quite happily, 
but the snag I've hit is when reaching somewhere in the screen init. At CBF0
is the instruction JMP (&035D) which for me is referring to an invalid location
of &CC0D (it's the 2nd byte of an STA instruction at CC0B).
>From the disassembly (http://mdfs.net/Docs/Comp/BBC/OS1-20/CA39):CBC1 LDX
#&00??? ;X=0
CBC3 LDA &034E?? ;hi byte of screen RAM address
CBC6 STX &0350?? ;window area start address lo
CBC9 STA &0351?? ;window area start address hi
CBCC JSR &C9F6?? ;use X and Y to set new cursor address
CBCF LDY #&0C??? ;Y=12
CBD1 JSR &CA2B?? ;set registers 12 and 13 in CRTC
CBD4 LDA &0358?? ;background text colour
CBD7 LDX &0356?? ;memory map type
CBDA LDY &C454,X ;get section control number
CBDD STY &035D?? ;set it in jump vector lo
CBE0 LDY #&CC??? ;Y=&CC
CBE2 STY &035E?? ;upper byte of link address?
CBE5 LDX #&00??? ;X=0
CBE7 STX &0269?? ;paged mode counter
CBEA STX &0318?? ;text column
CBED STX &0319?? ;current text line
CBF0 JMP (&035D) ;jump vector set up previously

For me?at CBDD Y=OD and at?CBE2 Y=CC. This task is also helping me understand
some of the 'under the bonnet' parts of the BBC but at this point I've reached
the limit of my knowledge. 
Can anyone give me some guidance of what might be wrong here?
Thanks,Julian.
 
_______________________________________________
bbc-micro mailing list
bbc-micro@...
http://lists.cloud9.co.uk/mailman/listinfo/bbc-micro


    

  
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>