It is currently Mon Oct 23, 2017 1:57 pm

All times are UTC - 7 hours



Forum rules


Related:



Post new topic Reply to topic  [ 10 posts ] 
Author Message
PostPosted: Mon Oct 31, 2005 3:36 pm 
Offline
User avatar

Joined: Tue Sep 21, 2004 12:11 am
Posts: 377
Location: Karlshamn (Sweden)
anyone know what it does?

from what I managed to dig up:

from spc document:
XCN A 9F 1 5 A(7-1) <-> A(3-0) N......Z.

from snes9x source:
// XCN A
areg->YA.B.A = (areg->YA.B.A >> 4) | (areg->YA.B.A << 4);

so from what I can understand.. it exchange the upper nibble with the lower?
i.e.:
mov a, #%00001111
xcn a
a = 11110000

is this correct?

_________________
Sorry for misspellings, I'm from Sweden ^^


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 01, 2005 6:10 am 
Offline
User avatar

Joined: Sun Sep 19, 2004 9:28 pm
Posts: 3192
Location: Mountain View, CA, USA
I'll see what I can dig up on this opcode and post here later today (I'm at work right now).


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 01, 2005 3:31 pm 
Offline
User avatar

Joined: Tue Sep 21, 2004 12:11 am
Posts: 377
Location: Karlshamn (Sweden)
koitsu wrote:
I'll see what I can dig up on this opcode and post here later today (I'm at work right now).


thanks. but I'm pretty sure i was correct asuming that..
atleast my code works. :D

edit:
now I've tried it on hardware too, and my code seems to work.. but I got alittle disappointed, because it didn't sound like on emu.. don't know if it's because of the TV having crappy speakers or if it is because the emus can't emulate the spc good enough yet. :?:

_________________
Sorry for misspellings, I'm from Sweden ^^


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 02, 2005 10:47 am 
Offline
User avatar

Joined: Fri Nov 12, 2004 2:49 pm
Posts: 7235
Location: Chexbres, VD, Switzerland
What differences between the real hardware and emus ??
I know sound emulation can go VERY wrong and VERY innacurate in some cases (Chrono Trigger's sound effects for example) or be just fine (music of most games).
The problem with CT is that there is particular sample that loops on themselves while overflow from the normal 16-bit range trough BRR compression to output particular noisy sound. Some "normal" sampes also sometimes get pretty different, especailly be carefull with sampling rate. The real hardware mix all thing at 32kHz, but most emus/player doesn't (or at least not by default), and this can make a difference.

_________________
Life is complex: it has both real and imaginary components.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 02, 2005 11:58 am 
Offline
User avatar

Joined: Tue Sep 21, 2004 12:11 am
Posts: 377
Location: Karlshamn (Sweden)
well the differnece was that the sample sounded all smered out (think thats the right word) and the pitch changes wasn't as noticable as on a emu.

what I simply did for the demo was to have a sample that I played and changed the pitch on with small delays creating a little melody.. but it didn't sound as good on my tv as on the emu.. but I guess it's probably because of the tv:s speakers

_________________
Sorry for misspellings, I'm from Sweden ^^


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 02, 2005 12:34 pm 
Offline
User avatar

Joined: Fri Nov 12, 2004 2:49 pm
Posts: 7235
Location: Chexbres, VD, Switzerland
Well, the 32kHz limit of the real hardware should be the cause of that, possibly along with your speakers.
Pitch change is less noticable ? Scince it's the good pitch, I can't see what would be less noticable.

_________________
Life is complex: it has both real and imaginary components.


Top
 Profile  
 
 Post subject: GoodLuck
PostPosted: Mon Nov 14, 2005 2:09 pm 
This conversation is just beyond me so i am out, best of luck.


Top
  
 
PostPosted: Thu Nov 17, 2005 8:14 pm 
Offline
User avatar

Joined: Sun Sep 19, 2004 9:28 pm
Posts: 3192
Location: Mountain View, CA, USA
The official SPC700 docs I have say this:

Mneumonic: XCN
Operand: A
Opcode: 9F
Bytes: 1
Cycles: 5
Operation: A (7-4) <--> A (3-0)
Flags modified: N and Z

A == A register
N == Negative flag
Z == Zero flag

Based upon the fact that the directional flow is labelled <-->, I assume that means bits 3-0 of A are exchanged/swapped with bits 7-4 of A.

Again, these are official docs, so...


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 17, 2005 9:54 pm 
Offline
User avatar

Joined: Wed Nov 10, 2004 6:47 pm
Posts: 1845
This looks like a SWAP command in z80 (at least I think it was swap --- it's been a while).

Perhaps XCN stands for 'eXChange Nybbles'?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 18, 2005 6:13 am 
Offline
User avatar

Joined: Sun Sep 19, 2004 9:28 pm
Posts: 3192
Location: Mountain View, CA, USA
Disch wrote:
Perhaps XCN stands for 'eXChange Nybbles'?


My vote is on eXChaNge.


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

All times are UTC - 7 hours


Who is online

Users browsing this forum: Revenant, ThunderZ and 3 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:  
Powered by phpBB® Forum Software © phpBB Group