Skip to content

Optimizing N163 in NSF driver#400

Merged
Gumball2415 merged 2 commits intoDn-Programming-Core-Management:mainfrom
HeeminTV:nsf_n163_optimization
Jan 20, 2026
Merged

Optimizing N163 in NSF driver#400
Gumball2415 merged 2 commits intoDn-Programming-Core-Management:mainfrom
HeeminTV:nsf_n163_optimization

Conversation

@HeeminTV
Copy link
Contributor

This PR fixes the current driver with N163 enabled exceeding a frame (single 60Hz tick) by optimizing the waveform copying routine.

Changes in this PR:

  • Replaces addition loop to the actual multiplication (This worked before 0CC, which had table-per-instrument limit of 16, but as it's now 64, the usage of CPU cycles in this loop became massive)
  • Slighly unrolls the loop for writing to $4800

@Gumball2415
Copy link
Collaborator

Gumball2415 commented Jan 10, 2026

changing the target to main branch

@Gumball2415 Gumball2415 changed the base branch from app-emu-module-nsf_driver-dev to main January 10, 2026 10:07
Fixing current driver exceeding a frame to progress
@Gumball2415 Gumball2415 force-pushed the nsf_n163_optimization branch from 7baa30f to bca33d9 Compare January 11, 2026 15:54
@Gumball2415
Copy link
Collaborator

lgtm, though i'm a bit unsure about the byte order edit in the nsf driver build script

@HeeminTV
Copy link
Contributor Author

I had no way to make it work properly other than adding new arguments there. It simply didn't work with both Python 2 and Python 3 (which is what CONTRIBUTING.md describes) without inserting updated arguments

@Gumball2415
Copy link
Collaborator

Gumball2415 commented Jan 20, 2026

CONTRIBUTING.md specifically mentions Python 3.10 and above

however, Python docs mentions that the default argument for byteorder was not added until 3.11.

Changed in version 3.11: Added default argument value for byteorder.

@HeeminTV
Copy link
Contributor Author

Seems like it's CONTRIBUTING.md that should be updated then

@Gumball2415
Copy link
Collaborator

Gumball2415 commented Jan 20, 2026

changelog:

@Gumball2415 Gumball2415 merged commit 0f26fb0 into Dn-Programming-Core-Management:main Jan 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants