100 Commits
Author SHA1 Message Date
cadmic 1359e1a559 Remove InsertBraces from .clang-format (for old clang-format versions) (#171) 2024-08-28 01:55:13 +02:00
cadmic 85cff581b7 Add explicit casts to void** (#164) 2024-07-27 16:09:31 -07:00
cadmic feb581a5ea Fix config.shift_jis for files with asm-processor (#163) 2024-07-26 12:42:50 -07:00
cadmic 95deaf6707 Only configure versions if main.dol exists (#162) 2024-06-19 09:06:18 -07:00
cadmic f4904d8bba Restore bootThisDol ifdef for objdiff 2024-06-05 10:05:00 -07:00
cadmic 5078adb90a Use -inline deferred on libc and runtime files (#157) 2024-06-03 13:00:58 -07:00
cadmic 7302ac05fd Match MSL C IO functions (#156)
* Match __va_arg.c

* Match libc IO functions

* Fix warnings

* Fix mq-j symbols
2024-06-02 17:12:57 -07:00
cadmic 6f83e29795 Match the rest of the MSL C math functions (#151) 2024-05-25 12:01:24 -07:00
cadmic b14cb80eb6 Fake weak math functions (#149)
* Fake weak math functions

* Match e_pow.c

* Move __HI/__LO to math.h

* Use uppercase floats
2024-05-24 10:57:14 -07:00
cadmic 1177308899 Delete unused function ClampCircle (#147) 2024-05-23 15:42:54 -07:00
cadmic d1acdd5398 Remove extern "C" (#145) 2024-05-23 14:17:54 -07:00
cadmic 0ecc71f278 ALIGNAS -> ATTRIBUTE_ALIGN (#144) 2024-05-23 14:17:48 -07:00
cadmic c6073dacdb Match ansi_files.c and abort_exit.c (and related files) (#142)
* Match ansi_files.c

* Match abort_exit.c and related files
2024-05-23 13:41:12 -07:00
cadmic c545d62a7c Match mtxvec.c and mtx44.c (#140) 2024-05-23 11:00:26 -07:00
cadmic 21c11a1e6d Move more compiler intrinsics to intrinsics.h (#136) 2024-05-22 14:56:46 -07:00
cadmic a50cdc2b8b Various simGCN.c cleanups (#132)
* simGCN.c cleanups

* Fix build

* Remove GX_TG_MTX2x4 comment

* And in THPRead.c as well
2024-05-21 17:47:12 -07:00
cadmic 65e87efb32 Switch build system to use ninja and dtk and support multiple versions (#127)
* Start dtk project based on oot-gc-dtk

* Add asm_processor build rules

* Encode shift-JIS strings

* Generate build for all versions at the same time

* Update diff.py for new build layout

* Implement per-version object completion

* Add ce-u and match emu files

* Fix config/ce-j/build.sha1

* Add dol-diff, dol-apply, and format scripts

* Add configure.py --non-matching

* Delete old build system

* Reorganize library files

* Make diff.py multi-version but remove target line-number support

* Update README for new build system

* Change diff.py build command to ninja

* ./dol-apply ce-u

* Recommend ./diff.py -mwo3

* Upgrade to dtk v0.8.3, use block_relocations instead of noreloc

* Mark soundGCN.c as matched
2024-05-20 17:27:48 -07:00
cadmic 618d98569c Fix frameDrawSetupSP 2024-05-18 15:32:06 -07:00
cadmic c262ca23d8 Match ADPCM functions (#125)
* Match rspLoadADPCMCoefTable[1-2]

* Match rspAADPCMDec[12]Fast
2024-05-17 23:31:48 -07:00
cadmic 7623449833 Match frame TLUT functions and Panel de Pon draw functions (#124)
* Match frameMakeTLUT

* Match frameLoadTLUT

* Match panel draw functions

* Match frameHackTIMG_Panel

* Add some line breaks
2024-05-17 23:31:42 -07:00
cadmic 0e43fc24e2 Match frame draw setup functions (#123)
* Match frameDrawSetup2D

* Match frameDrawSetupDP

* Match frameDrawSetupFog_Zelda1

* Match frameDrawSetupFog_Default

* Match frameDrawSetupSP

* Fixup frameDrawSetupSP
2024-05-17 00:36:47 -07:00
cadmic 0f3d8f5089 Match audio math functions (#122)
* Match rspDotProduct8x15MatrixBy15x1Vector

* Match rspMultPolef

* Match rspVMUDN and rspVMADN
2024-05-17 00:36:35 -07:00
cadmic 2a62ae7d4e Add missing breaks in sramEvent 2024-05-15 02:49:44 -07:00
cadmic cd16b79d1c Fix formatting due to comment typo 2024-05-15 02:47:40 -07:00
cadmic 99113e2da6 Match some more frame functions (#121)
* Match frameSetSize

* Match frameResetUCode and frameScaleMatrix

* Match _frameDrawRectangle

* Match frameGetDepth

* Match frameConvertYUVtoRGB

* Match packTakeBlocks

* Match frameMakeTexture

* Match frameLoadTile

* Match frameCullDL

* Match frameInvalidateCache and frameUpdateCache

* Match frameLoadTexture

* Move CopyCFB

* Match frameSetViewport

* Small fixes
2024-05-15 02:42:00 -07:00
cadmic c8479e60fc Match cpuFindFunction (#120) 2024-05-15 02:41:52 -07:00
cadmic b082532b90 Fake match THPRead.c Reader (#118)
* Fake match THPRead.c Reader

* Better match
2024-05-14 11:46:18 -07:00
cadmic 568fd963a5 Fix a return 0 -> return false 2024-05-13 14:16:56 -07:00
cadmic f9001ca64b Run CC_CHECK on THP and SDK files (#115)
* Run CC_CHECK on SDK files

* Remove extra space
2024-05-13 14:05:49 -07:00
cadmic 9fb8c047e6 Match rspInitAudioDMEM[1-4] (#114)
* Match rspInitAudioDMEM[1-4]

* Add line breaks
2024-05-13 14:05:05 -07:00
cadmic c2b7869d16 Set up permuter import (#119)
* Set up permuter import

* Add more info on how to run permuter

* gitignore nonmatchings/
2024-05-13 14:04:28 -07:00
cadmic 7d5f5aaeb1 Remove Ptr typedefs (#117) 2024-05-13 14:04:08 -07:00
cadmic c3f53df194 Write basic development guide (#111)
* Write basic development guide

* objdump -> objdiff
2024-05-12 14:13:15 -07:00
cadmic 014e8adecf Make CC_CHECK error for missing function declarations (#110)
* Make CC_CHECK error for missing function declarations

* Fix typos

* Fix signature of rspParseABI
2024-05-11 23:50:08 -07:00
cadmic 6886419062 Upgrade to clang-format version 18 (#108)
* Upgrade to clang-format version 18

* Strip trailing whitespace
2024-05-11 11:54:39 -07:00
cadmic 2307839048 Match frame.c GXWGFifo functions (#105)
* Match frameDrawRectFill

* Match frameDrawTriangle_Setup

* Clean up GXWGFifo writes

* Match frame draw functions

* Match frameCheckTriangleDivide

* Match frameDrawRectTexture

* Match frameDrawRectTexture_Setup

* Clean up GXWGFifo writes in simGCN.c

* vertexDraw -> frameWriteVertex
2024-05-10 19:02:17 -07:00
cadmic 5853db9c0d Make decompme.py context parseable by m2c (#106)
* Hardcode list of macro replacements in decompme.py

* Add comments to VITVMode
2024-05-09 19:34:55 -07:00
cadmic 8c02584ece Strip out .global lines from asm when uploading to decomp.me (#102) 2024-05-09 13:30:29 -07:00
cadmic c7d00d89e0 Remove fake tXL_NODE struct (#103) 2024-05-09 13:20:44 -07:00
cadmic ceedfb8d64 Use AT_ADDRESS and hw_regs.h more consistently (#104) 2024-05-09 13:20:38 -07:00
cadmic 051f4de380 Fix editor warnings for macros.h 2024-05-09 12:07:12 -07:00
cadmic b703e9a252 Fix missing prototypes 2024-05-08 20:07:50 -07:00
cadmic 73ec798b69 Fix casts in rdpEvent 2024-05-08 18:40:48 -07:00
cadmic d6ea290b5a Fix NON_MATCHING build 2024-05-08 17:42:40 -07:00
cadmic 508775bdf9 Format libc files (#99) 2024-05-07 18:44:18 -07:00
cadmic 3bfdcb485f Match RSP update functions and rdpParseGBI (#97)
* Match rspParseGBI

* Match rdpParseGBI

* Match rspUpdate

* Match rspParseGBI_Setup

* Match rspFrameComplete
2024-05-06 11:59:13 -07:00
cadmic 57d9f7bdf4 Document VC crashes (#96) 2024-05-06 09:25:19 -07:00
cadmic 904cd1279e Match more CPU functions (#95)
* Match cpuFreeCachedAddress and cpuFindCachedAddress

* Match cpuMakeDevice

* Match cpuSetTLB

* Match cpuHackHandler

* Match cpuTestInterrupt and cpuException

* Match cpuMapObject, cpuSetDeviceGet, cpuSetDevicePut

* Match cpuReset

* Match cpuOpcodeChecksum

* Use booleans in cpu arrays
2024-05-06 09:25:12 -07:00
cadmic e89dcd76df Match CPU tree functions (#93)
* Match CPU tree functions

* Remove "struct"
2024-05-05 13:44:26 -07:00
cadmic 355975e06c Run host compiler for better warnings/errors (CC_CHECK) (#77)
* Run host compiler for better warnings/errors (CC_CHECK)

* Delete endian-specific stuff in math.h
2024-05-05 12:41:07 -07:00
cadmic 6fa4e88e3d Add jump tables to asm/non_matchings files for m2c (#92)
* Use .global instead of glabel for branch targets

* Copy function jump tables into asm/non_matchings
2024-05-05 11:20:48 -07:00
cadmic 308d9f0e4d Add explicit sizes to all jump tables (#91) 2024-05-05 11:20:38 -07:00
cadmic 12ece17846 Add trailing f to float constants (#90)
* Add trailing f to float constants

* Shorten float constants
2024-05-05 11:20:32 -07:00
cadmic af6e395b6c Match paired-single/quantization (psq) functions (#89)
* Match rspLoadMatrix

* Match frameSetLookAt

* Match frameSetLight

* Match handwritten PSMTX44MultVecNoW

* Match frameLoadVertex

* Format and small fixes

* Missed some bools

* Decode some float constants
2024-05-03 11:34:22 -07:00
cadmic fdd4bec8df boolify remaining emulator files (#88) 2024-05-02 11:45:31 -07:00
cadmic 184996a069 boolify THP files (#87) 2024-05-01 10:42:55 -07:00
cadmic 54fa0f47cc bool-ify small matched files (#84) 2024-05-01 09:57:10 -07:00
cadmic 4db9c8b099 bool-ify core files (#83) 2024-05-01 09:57:01 -07:00
cadmic a7d5b90749 Convert bool/true/false to lowercase everywhere (#85) 2024-05-01 09:12:17 -07:00
cadmic 90f64b05f2 Delete functions.h and variables.h (#86) 2024-05-01 09:12:04 -07:00
cadmic 3f7f04675d Mostly match THPRead data (#82) 2024-04-30 14:52:40 -07:00
cadmic 40675e5361 Clean up CFLAGS 2024-04-29 14:02:06 -07:00
cadmic 48e68e3864 Move texPalette.c declarations to dolphin/tex.h (#75) 2024-04-25 15:18:00 -07:00
cadmic e8a31d5a4f Move gpErrorMessageBuffer to simGCN.c (#76) 2024-04-25 15:17:46 -07:00
cadmic 22453ab7cd Format 2024-04-23 15:56:15 -07:00
cadmic 3ef99c91f2 Fix SYSTEM_RDP typo 2024-04-21 08:56:17 -07:00
cadmic c69734c090 Rename frame enums (and fix frameSetMatrix/frameGetMatrix) (#74) 2024-04-21 08:55:41 -07:00
cadmic ba0ecfe228 Match frame matrix functions and some framebuffer stuff (#72)
* Frame tweaks

* Match frame matrix functions

* Match some framebuffer functions

* Match frameBegin
2024-04-18 16:26:34 -07:00
cadmic ffb5dbabd6 Finish library.c (#69)
* Match rest of library functions

* Finish library.c
2024-04-17 15:29:58 -07:00
cadmicandNassib Rayane c38a85afd1 Start frame.c (#70)
* Start frame.c

Co-authored-by: Nassib Rayane <minecraftgamer180@gmail.com>

* MatrixHint -> aMatrixHint

---------

Co-authored-by: Nassib Rayane <minecraftgamer180@gmail.com>
2024-04-15 23:33:42 -07:00
cadmic 61d2c0a22a Match libultra OS threading library functions (#68)
* Fix signatures for some library functions

* Match libultra OS threading library functions

* Clean up CPU_DEVICE macros

* Use exception code enum
2024-04-15 12:09:15 -07:00
cadmic c664adecfd Match matrix library functions (#67)
* Match matrix library functions

* Use existing naming convention for N64 structs

* Remove debug comments
2024-04-14 12:37:49 -07:00
cadmic 86b524d0db Match CPU CP0 functions (#66) 2024-04-13 15:48:46 -07:00
cadmic 4728a28f9b decompme.py: allow trailing comments on directives 2024-04-11 10:05:49 -07:00
cadmic 53e1f7eed1 Fix decompme.py after include dir changes 2024-04-11 09:33:32 -07:00
cadmic 911c04f7ce Fun with tabs 2024-04-10 11:28:55 -07:00
cadmic 9fa1046005 Match guPerspective[F] (#63)
* Match guPerspective[F]

* Use M_PI
2024-03-25 16:18:33 -07:00
cadmic ce8268dab1 Match library "infrastructure" (#62)
* Reformat gaFunction

* Match library infrastructure
2024-03-25 15:55:24 -07:00
cadmic 6f04a033ef Factor out rdbHandleString (#59)
* Factor out rdbPrintString

* Document a bug in rdb.c

* rdbPrintString -> rdbHandleString
2024-03-08 18:49:25 -08:00
cadmic a94c7b5898 Add padding for removed jumptables with NON_MATCHING=1 (#58) 2024-03-08 14:49:00 -08:00
cadmic 7bb48791f8 Reformat code hacks 2024-03-06 12:01:55 -08:00
cadmic 6c48e02334 Fix make NON_MATCHING=1 2024-03-06 12:00:05 -08:00
cadmic 76bb84eff3 Match cpuExecuteLoadStore and cpuExecuteLoadStoreF (#57)
* Match cpuExecuteLoadStore and cpuExecuteLoadStoreF

* Add comment about data NON_MATCHING
2024-03-04 15:39:49 -08:00
cadmic 0a7d71584b Clean up remaining extern variable declarations in .c files (#56)
* Clean up remaining extern variable declarations in .c files

* Fix types of gz_bnrSize and gz_iconSize
2024-03-04 14:35:19 -08:00
cadmic e5faf70f9d Match cpuExecuteOpcode and some MIPS-related functions (#53)
* Match cpuExecuteOpcode and some MIPS-related functions

* MIPS_FT -> MIPS_RT in load/store instructions
2024-03-03 14:36:57 -08:00
cadmic d5041d5329 Match cpuExecute and a few related functions (#52)
* Match cpuExecute and related functions

* Use ternary for saveGCN
2024-03-01 11:07:29 -08:00
cadmic 49e3087220 Handle more preprocessor directives in decompme script (#46)
* Sync compiler flags

* Remove unused AT_ADDRESS macro

* Add explicit sizes to INCBIN arrays

* Handle more preprocessor directives in decompme script

* Format

* Dict -> dict
2024-02-27 16:28:05 -08:00
cadmic f67b04f016 Hackily fix relocs in .debug section (#48) 2024-02-25 18:54:54 -08:00
cadmic fe2cc8522d Match cpuCompile functions (#39)
* Match cpuCompile functions

* Annotate with objdump disassembly
2024-02-25 10:47:41 -08:00
cadmic b4bdc0a3f0 Match peripheral.c (#44) 2024-02-24 15:50:49 -08:00
cadmic 791a1d34d9 Add macOS install instructions (#43) 2024-02-24 11:33:43 -08:00
cadmicandYanis42 f2325eadc0 Introduce PAD_STACK() and match xlList with it (#40)
Co-authored-by: Yanis42 <35189056+Yanis42@users.noreply.github.com>
2024-02-24 09:53:32 -08:00
cadmicandYanis42 fd787aa6b8 Match simulatorParseArguments and simulatorDrawCursor (#37)
* Match simulatorParseArguments

* Match simulatorDrawCursor

* Format

* Remove conflict bait

* Update src/simGCN.c

Co-authored-by: Yanis42 <35189056+Yanis42@users.noreply.github.com>

---------

Co-authored-by: Yanis42 <35189056+Yanis42@users.noreply.github.com>
2024-02-24 09:53:06 -08:00
cadmic c50ef5ab56 Make simGCN jump tables relocatable (#35) 2024-02-22 19:30:40 -08:00
cadmic 6954b67dd6 Match xlMain (#33)
* Match xlMain

* Format, remove "struct"

* Use DVDCallback

* Remove register comments
2024-02-22 13:10:43 -08:00
cadmic 21a77c6162 Use SYSTEM_ getters everywhere (#32) 2024-02-22 10:02:18 -08:00
cadmic 9cc05f855a Remove C preprocessor requirement (#27)
* Remove CPP requirement

* Fix dol recipe
2024-02-21 13:56:53 -08:00
cadmic d693726da8 SDK headers cleanup (#26)
* Use #include "..." rather than #include <...>

* Remove unused dolphin headers

* Go through dolphin/base.h

* Remove __cplusplus guards

* Go through dolphin/gx.h

* Move dolphin OS headers to subdirectory

* Go through dolphin/os.h

* Go through the rest of dolphin headers

* Split out si.h

* Split up hw_regs.h

* Change #include <> to #include "" in debug info

* Create dolphin/thp.h

* Go through variables.h

* Create dolphin.h
2024-02-21 13:56:38 -08:00
cadmic a1a4dd2020 Match xlHeap.c (#24) 2024-02-21 13:36:18 -08:00
cadmic 24948322a3 Add #line directive to asm_processor output 2024-02-21 11:47:38 -08:00