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 build for N64 #30

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

networkfusion
Copy link

I am (attempting) to create a CI build for the N64.

So far I have:

  • tracked down a workable build for libdragon
  • used a homebrew ROM to satisfy dfs
  • got the ROM to boot and display the menu (and contained ROM's).

The aim is to make an emulator that is able to boot ROM's without injecting them for flashcarts such as the SC64 and ED64.

I am currently struggling to boot ROM's from DFS that are either direct (i.e. the .gg extension) or zipped (i.e. the .zip extension and contains a ROM with the .gg extension), however the N64 is able to boot the menu and show that both files exist.

It would be helpful to know (as a starting point) which commit (date) of libdragon was used to create the ROM, and any defines that I am missing.

If I can get the ROM's to work, I will at minimum try to update the ROM to work with the latest versions of libdragon.

@ariahiro64
Copy link

just had a similar issue with sodium and sfc roms. the extensions the everdrive64 can accept is hardcodded.

@ITotalJustice
Copy link
Owner

I am (attempting) to create a CI build for the N64.

So far I have:

  • tracked down a workable build for libdragon
  • used a homebrew ROM to satisfy dfs
  • got the ROM to boot and display the menu (and contained ROM's).

The aim is to make an emulator that is able to boot ROM's without injecting them for flashcarts such as the SC64 and ED64.

I am currently struggling to boot ROM's from DFS that are either direct (i.e. the .gg extension) or zipped (i.e. the .zip extension and contains a ROM with the .gg extension), however the N64 is able to boot the menu and show that both files exist.

It would be helpful to know (as a starting point) which commit (date) of libdragon was used to create the ROM, and any defines that I am missing.

If I can get the ROM's to work, I will at minimum try to update the ROM to work with the latest versions of libdragon.

Thank you for the pr!

I have fixed the ROM loading bug you mentioned and have also updated the code so that it works with the latest commit of libdragon.

I haven't pushed the changes as there still more code changes that I'd like to make first. Not sure when I'll get around to it however...

If you would like the changes pushed anyway, let me know :)

@networkfusion
Copy link
Author

Thanks for the reply,

It would be helpful it you did push your changes to a branch, maybe I can help (saves and all). I am on discord N64Brew.

BTW, most emulators load ROM's from 0x200000 and use SRAM as the save type.

See here for an example: https://github.com/Polprzewodnikowy/N64FlashcartMenu/blob/fc2f3aa42cf750d55075b2e5846ed57e952099c8/src/menu/cart_load.c#L86

Although, that is a decussion topic, rather than this PR.

@networkfusion
Copy link
Author

networkfusion commented Sep 14, 2023

In addition (more on a discussion) to force the savetype as SRAM (which I would suggest is the default save type), you can adjust the header of the ROM for testing: https://n64brew.dev/wiki/ROM_Header in section "Homebrew ROM Header special flags". Also see https://github.com/DragonMinded/libdragon/blob/unstable/tools/ed64romconfig.c

@ITotalJustice
Copy link
Owner

thanks, i have added rom loading from sdram.

is there a way to detect the size of the rom within sdram?

@networkfusion
Copy link
Author

Without seeing the code, it is pretty hard to determine what you mean. Of course, you can use <sys/stat.h> stat or whatever to get a file size from storage if it helps...

@ariahiro64
Copy link

any updates on this

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.

3 participants