6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Fri Nov 22, 2024 7:50 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Sat Oct 13, 2012 12:28 am 
Offline
User avatar

Joined: Sat Sep 29, 2012 10:15 pm
Posts: 904
Arlet (and others),

I got confused by following the state machine decoder for undocumented opcodes. Could you please clarify what the core does? Undefined? Random stuff? Matching 6502 for all or some instructions (which ones)? Any 65C02 or Rockwell or WDC instructions?

Thanks, and sorry if it's been covered elsewhere (couldn't find a clear answer).

_________________
In theory, there is no difference between theory and practice. In practice, there is. ...Jan van de Snepscheut


Top
 Profile  
Reply with quote  
PostPosted: Sat Oct 13, 2012 7:08 am 
Offline
User avatar

Joined: Tue Nov 16, 2010 8:00 am
Posts: 2353
Location: Gouda, The Netherlands
enso wrote:
Arlet (and others),
I got confused by following the state machine decoder for undocumented opcodes. Could you please clarify what the core does? Undefined? .

The behavior for undocumented opcodes is undefined. This was done on purpose, to allow the synthesis tools to pick the smallest implementation for the documented opcodes. The designers of the NMOS 6502 took a similar approach, but because their implementation was completely different, the behavior of the undocumented opcodes will be different too. In any case, you should not use any of the undocumented opcodes, unless you modify the code to provide support for them.


Top
 Profile  
Reply with quote  
PostPosted: Sat Oct 13, 2012 4:13 pm 
Offline
User avatar

Joined: Sat Sep 29, 2012 10:15 pm
Posts: 904
Just to be clear, are the following instruction considered undefined?

80 BRA rel
12 ORA indirect
32 AND indirect
52 EOR indirect
72 ADC indirect
92 STA indirect
B2 LDA indirect
D2 CMP indirect
F2 SBC indirect
04 TSB zeropage
14 TRB zeropage
34 BIT zpg,X
64 STZ zpg
74 STZ zpg,X
89 BIT imm
1A INC A
3A DEC A
5A PHY
7A PLY
DA PHX
FA PLX
0C TSB absolute
1C TRB absolute
3C BIT abs,X
7C JMP ind,x
9C STZ absolute
9E STZ abs,x

Thank you

_________________
In theory, there is no difference between theory and practice. In practice, there is. ...Jan van de Snepscheut


Top
 Profile  
Reply with quote  
PostPosted: Sat Oct 13, 2012 4:16 pm 
Offline
User avatar

Joined: Tue Nov 16, 2010 8:00 am
Posts: 2353
Location: Gouda, The Netherlands
enso wrote:
Just to be clear, are the following instruction considered undefined?

80 BRA rel
12 ORA indirect
32 AND indirect
52 EOR indirect
72 ADC indirect
92 STA indirect
B2 LDA indirect
D2 CMP indirect
F2 SBC indirect
04 TSB zeropage
14 TRB zeropage
34 BIT zpg,X
64 STZ zpg
74 STZ zpg,X
89 BIT imm
1A INC A
3A DEC A
5A PHY
7A PLY
DA PHX
FA PLX
0C TSB absolute
1C TRB absolute
3C BIT abs,X
7C JMP ind,x
9C STZ absolute
9E STZ abs,x

Thank you

Correct. Only NMOS instructions are supported, the green ones from this table


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 16 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: