Files
kaizen/external/cic_nus_6105/n64_cic_nus_6105.hpp
T
iris 00cc9309cb Squashed 'external/ircolib/' changes from ce3cd726c..de6e324bd
de6e324bd separate emu thread
10d3daf86 Roms List improvements
95d202f37 Let's make the rom list process on a separate thread so the emulator doesnt take ages to load.
fc306967f Wow the ROM Header was just completely busted. Game list view works now
bad1691ee fuck this shit
2b59e5f46 game list in progress
d26417b83 remappable inputs in progress
ac4af8106 input
e72abc240 update readme
430139dc9 Qt6 frontend
3080d4d45 Fix this small bug too
08cd13b85 Cop0 unused functions do not actually pose a threat (as per manual). They don't do anything, so shall we.
61bb4fb44 make idle loop detection a little more specific with where the load goes
b037de4c3 SAZDFsdff
12e81e73e need to figure out why n64-systemtest loops indefinitely at some address that appears to be valid (i think it's me not invalidating the cache properly)
204f0e13b idle skipping seems to work!
cb8bb634a sdkfjlasdf
58e5c89c1 Fix compilation issue on my machine (no idea)
24fb2898e attempting more serious idle skipping
214719577 Place rsp.Step inside cached interpreter. Gains about 3 more fps
bb97dcc23 mmmmm
920b77d38 wjkhasdfjhkasdf
430ccdab4 it's a start...
4f42a673a Cached interpreter plays Mario 64. Start looking into RSP as well
c9a030787 idle skipping works!
5fbda03ce new idea
366637aba Idle skipping... maybe?
609fa2fb0 Cache instructions implemented but broken lmao. Commented out for now
e140a6d12 - Stop using inheritance for CPU, instead use composition. - Introduce KAIZEN_JIT_ENABLED optional define instead of relying on __aarch64__ and the like. - More cache work
68e613057 prep cache impl
811b4d809 fix clang format
fda755f7d idk
d5024ebbf small MI refactor in preparation of (eventually) implementing the RDRAM interface properly
694b45341 Merge commit '206dcdedf195fb320913584180edb12c7731e396' as 'external/SDL'
206dcdedf Squashed 'external/SDL/' content from commit 4d17b99d0a
4d16e1cb4 need to update sdl
848b19920 Fix compilation error
db61b5299 Merge commit 'e94a94559f28e49678fbcf72199a5258137b0fe9' as 'external/imgui'
e94a94559 Squashed 'external/imgui/' content from commit 02e9b8cac
52edb3757 need to update imgui
c1a705e86 Emulate weird JALR behaviour
4b4c32f4b Fix exception for "unusable COP1" in 4 instructions i missed accidentally (again)
df5828142 Bug putting 0s in the log everywhere
f8b580048 Make isviewer a sink to file
8241e9735 Fix exception for "unusable COP1" in 4 instructions i missed accidentally
b29715f20 small changes
d9a620bc1 make use of my new small utility library
0d1aa938e Add 'external/ircolib/' from commit 'ce3cd726c8df8388d554abf8bb55d55020eb4450'
e64eb40b3 Fuck git

git-subtree-dir: external/ircolib
git-subtree-split: de6e324bde
2026-06-15 11:56:38 +02:00

96 lines
5.2 KiB
C++

/*
* Copyright 2011 X-Scale. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY X-Scale ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
* EVENT SHALL X-Scale OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are
* those of the authors and should not be interpreted as representing official
* policies, either expressed or implied, of X-Scale.
*
* This software provides an algorithm that emulates the protection scheme of
* N64 PIF/CIC-NUS-6105, by determining the proper response to each challenge.
* It was synthesized after a careful, exhaustive and detailed analysis of the
* challenge/response pairs stored in the 'pif2.dat' file from Project 64.
* These challenge/response pairs were the only resource used during this
* project. There was no kind of physical access to N64 hardware.
*
* This project would have never been possible without the contribuitions of
* the following individuals and organizations:
*
* - Oman: For being at the right place at the right time and being brave
* enough to pay a personal price so we could understand in a much deeper
* way how this magical console really works. We owe you so much.
*
* - Jovis: For all the positive energy and impressive hacking spirit that you
* shared with the N64 community. You were absolutely instrumental in
* several key events that shaped the N64 community in the last 14 years.
* Even if you're not physically with us anymore, your heritage, your
* knowledge and your attitude will never be forgotten.
*
* 'The candle that burns twice as bright burns half as long.'
*
* - LaC: For the endless contributions that you've given to the N64 community
* since the early days, when N64 was the next big thing. I've always
* admired the deep knowledge that you've gathered about the most little
* hardware details. Recently, you challanged us to find a small and
* concise algorithm that would emulate the behaviour of CIC-NUS-6105
* challenge/response protection scheme and here is the final result.
* LaC, Oman and Jovis were definitly the dream team of N64 reversing in
* the late 90's. Without your contributions, we would be much poorer.
*
* - marshall: For keeping the N64 scene alive during the last decade, when
* most people lost interest and moved along to different projects. You
* are the force that has been keeping us all together in the later
* years. When almost nobody cared about N64 anymore, you were always
* there, spreading the word, developing in the console, and lately,
* making impressive advances on the hardware side. I wish the best
* success to your new 64drive project.
*
* - hcs: For your contributions to the better understanding of the inner
* workings of the Reality Co-Processor (RCP). Your skills have impressed
* me for a long time now. And without your precious help by sharing your
* kownledge, I would have never understood the immense importance of
* Oman, Jovis and LaC achievements. Thank you !
*
* - Azimer & Tooie: For sharing with the N64 community your findings about the
* challenge/response pair used in 'Jet Force Gemini' and the 267
* challenge/response pairs used in 'Banjo Tooie', all stored in the
* 'pif2.dat' file of Project 64. They were instrumental to the final
* success of this endeavour.
*
* - Silicon Graphics, Inc. (SGI): For creating MIPS R4000, MIPS R4300 and
* Reality Co-Processor (RCP). You were the ultimate dream creator during
* the late 80's and early 90's. A very special word of gratitude goes to
* the two teams that during those years created RCP and MIPS R4300. They
* were technological breakthroughs back then.
*
* On a personal note, I would like to show my deepest gratitude to _Bijou_,
* for being always a source of endless hope and inspiration.
*
* -= X-Scale =- (#n64dev@EFnet)
*/
#pragma once
#define CHL_LEN 0x20
void n64_cic_nus_6105(char chl[], char rsp[], int len);