Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Cx4 #558

Open
jeffythedragonslayer opened this issue Feb 21, 2023 · 6 comments
Open

Add support for Cx4 #558

jeffythedragonslayer opened this issue Feb 21, 2023 · 6 comments
Assignees

Comments

@jeffythedragonslayer
Copy link
Contributor

I want to guage demand for support for the Capcom Cx4 chip.

@vhelin
Copy link
Owner

vhelin commented Feb 21, 2023

I found this

https://wiki.superfamicom.org/capcom-cx4-hitachi-hg51b169

Any better documents about Cx4?

@jeffythedragonslayer
Copy link
Contributor Author

jeffythedragonslayer commented Feb 21, 2023

In section 2.4, an "x" is an operand bit, and a "." is unused:

http://users.tpg.com.au/advlink/dsp/cx4.html

@vhelin
Copy link
Owner

vhelin commented Feb 21, 2023

Looks quite good, but I have two questions:

  1. What is SS?
    image

  2. What is F?
    image

@vhelin vhelin self-assigned this Feb 21, 2023
@jeffythedragonslayer
Copy link
Contributor Author

"Shift" and "far," I think.

@vhelin
Copy link
Owner

vhelin commented Jun 13, 2023

I got an answer to my questions from the maintainer of https://www.crazysmart.net.au/dsp/cx4.html - Here is the information:

Q1: What is SS in here? "100000SS .xxxxxxx | 80 | ADD | A, reg | Binary Addition | A = A + reg"
A1:

SS are the shift bits.

The Accumulator is shifted left either 0, 1, 8 or 16 bits.

SS
00 - no shift.
01 - shift Accumulator left 1 bit before operation.
10 - shift Accumulator left 8 bits before operation.
11 - shift Accumulator left 16 bits before operation.

maybe?
ADD A<<8, R15

Q2: What does F mean here? "000010F. xxxxxxxx | 08 | BRA | imm | Branch (Always)"
A2:

Assuming the Program Counter is 23 bits.

If the branch is taken:
The lower 8 bits of the instruction is copied to the lower 8 bits of the Program Counter.
If the 9th bit of the instruction is 0, the upper 15 bits of the Program Counter remains.
If the 9th bit of the instruction is 1, the page register (P) is copied to the upper 15 bits of the Program Counter.

@vhelin
Copy link
Owner

vhelin commented Jun 13, 2023

In section 2.4, an "x" is an operand bit, and a "." is unused:

http://users.tpg.com.au/advlink/dsp/cx4.html

This is now the working link (it seems): https://www.crazysmart.net.au/dsp/cx4.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants