dragonminded / netboot Goto Github PK
View Code? Open in Web Editor NEWUtilities for netbooting and talking to a NetDimm installed in a Naomi, Triforce or Chihiro.
License: The Unlicense
Utilities for netbooting and talking to a NetDimm installed in a Naomi, Triforce or Chihiro.
License: The Unlicense
It seems there are files not checked in, as libnaomi won't build and the makefile references an audio.c file that does not exist.
I'm trying to build the toolchain to experiment with some homebrew, but the pass2 of the SH-4 GCC build fails with the following:
configure: error: Link tests are not allowed after GCC_NO_EXECUTABLES.
More context around the error:
https://gist.github.com/rattboi/9c116eb26197712af1fde5bbbe3973f3
TYPE_SHORT & TYPE_BYTE don't function as expected
Reboots the system, shows now loading then serial output shows. This is with default options.
0x80555bd0 (DP): START-UP command.
0x80555bd0 (DP): HOST-MODE command.
0x80555bd0 (DP): SET SECURITY-KEYCODE command.
0x80555bd0 (DP): UNDEFINED command.
0x80555bd0 (DP): command = 41, size = 0000, mark = 33
0x80555bd0 (DP): UNDEFINED command.
0x80555bd0 (DP): command = 41, size = 0000, mark = 34
0x80555bd0 (DP): UNDEFINED command.
0x80555bd0 (DP): command = 41, size = 0000, mark = 35
0x80555bd0 (DP): UNDEFINED command.
0x80555bd0 (DP): command = 41, size = 0000, mark = 36
0x80555bd0 (DP): UNDEFINED command.
0x80555bd0 (DP): command = 41, size = 0000, mark = 37
0x80555bd0 (DP): UNDEFINED command.
0x80555bd0 (DP): command = 41, size = 0000, mark = 38
0x80555bd0 (DP): UNDEFINED command.
0x80555bd0 (DP): command = 41, size = 0000, mark = 39
0x80555bd0 (DP): UNDEFINED command.
0x80555bd0 (DP): command = 41, size = 0000, mark = 3a
The toolchain portion of this repo has moved to its own repo at https://github.com/DragonMinded/libnaomi
Good up to this point:
/opt/toolchains/naomi/sh-elf/bin/sh-elf-ld -mshlelf -T/home/rattboi/code/netboot/homebrew/naomi.ld --gc-sections -L/opt/toolchains/naomi/sh-elf/sh-elf/lib/ -L/opt/toolchains/naomi/sh-elf/lib/ -L/opt/toolchains/naomi/sh-elf/lib/gcc/sh-elf/9.3.0/ -L/home/rattboi/code/netboot/homebrew/libnaomi/ -defsym START_ADDR=0xc021000 -o build/naomi.elf build/main.o build/packet.o build/message.o build/config.o build/controls.o build/screens.o build/common.o build/dejavusans.o build/up.o build/dn.o build/cursor.o -lnaomi -lfreetype -lbz2 -lz -lpng16 -lc -lm -lgcc -lstdc++
/opt/toolchains/naomi/sh-elf/bin/sh-elf-ld: /opt/toolchains/naomi/sh-elf/lib//libfreetype.a(autofit.o): in function `af_face_globals_free':
autofit.c:(.text.af_face_globals_free+0xb0): undefined reference to `hb_font_destroy'
/opt/toolchains/naomi/sh-elf/bin/sh-elf-ld: autofit.c:(.text.af_face_globals_free+0xb4): undefined reference to `hb_buffer_destroy'
/opt/toolchains/naomi/sh-elf/bin/sh-elf-ld: /opt/toolchains/naomi/sh-elf/lib//libfreetype.a(autofit.o): in function `af_shaper_get_coverage':
autofit.c:(.text.af_shaper_get_coverage+0x2b4): undefined reference to `hb_font_get_face'
/opt/toolchains/naomi/sh-elf/bin/sh-elf-ld: autofit.c:(.text.af_shaper_get_coverage+0x2c0): undefined reference to `hb_ot_tags_from_script'
/opt/toolchains/naomi/sh-elf/bin/sh-elf-ld: autofit.c:(.text.af_shaper_get_coverage+0x2c8): undefined reference to `hb_set_create'
/opt/toolchains/naomi/sh-elf/bin/sh-elf-ld: autofit.c:(.text.af_shaper_get_coverage+0x2cc): undefined reference to `hb_ot_layout_collect_lookups'
/opt/toolchains/naomi/sh-elf/bin/sh-elf-ld: autofit.c:(.text.af_shaper_get_coverage+0x2d4): undefined reference to `hb_set_is_empty'
/opt/toolchains/naomi/sh-elf/bin/sh-elf-ld: autofit.c:(.text.af_shaper_get_coverage+0x2d8): undefined reference to `hb_set_next'
/opt/toolchains/naomi/sh-elf/bin/sh-elf-ld: autofit.c:(.text.af_shaper_get_coverage+0x2dc): undefined reference to `hb_ot_layout_lookup_collect_glyphs'
/opt/toolchains/naomi/sh-elf/bin/sh-elf-ld: autofit.c:(.text.af_shaper_get_coverage+0x2f0): undefined reference to `hb_ot_layout_lookup_would_substitute'
/opt/toolchains/naomi/sh-elf/bin/sh-elf-ld: autofit.c:(.text.af_shaper_get_coverage+0x2f4): undefined reference to `hb_set_subtract'
/opt/toolchains/naomi/sh-elf/bin/sh-elf-ld: autofit.c:(.text.af_shaper_get_coverage+0x2f8): undefined reference to `hb_set_destroy'
/opt/toolchains/naomi/sh-elf/bin/sh-elf-ld: /opt/toolchains/naomi/sh-elf/lib//libfreetype.a(autofit.o): in function `af_face_globals_new':
autofit.c:(.text.af_face_globals_new+0x1b0): undefined reference to `hb_ft_font_create'
/opt/toolchains/naomi/sh-elf/bin/sh-elf-ld: autofit.c:(.text.af_face_globals_new+0x1b4): undefined reference to `hb_buffer_create'
/opt/toolchains/naomi/sh-elf/bin/sh-elf-ld: /opt/toolchains/naomi/sh-elf/lib//libfreetype.a(autofit.o): in function `af_shaper_get_cluster':
autofit.c:(.text.af_shaper_get_cluster+0x148): undefined reference to `hb_font_set_scale'
/opt/toolchains/naomi/sh-elf/bin/sh-elf-ld: autofit.c:(.text.af_shaper_get_cluster+0x150): undefined reference to `hb_buffer_clear_contents'
/opt/toolchains/naomi/sh-elf/bin/sh-elf-ld: autofit.c:(.text.af_shaper_get_cluster+0x154): undefined reference to `hb_buffer_add_utf8'
/opt/toolchains/naomi/sh-elf/bin/sh-elf-ld: autofit.c:(.text.af_shaper_get_cluster+0x158): undefined reference to `hb_buffer_guess_segment_properties'
/opt/toolchains/naomi/sh-elf/bin/sh-elf-ld: autofit.c:(.text.af_shaper_get_cluster+0x15c): undefined reference to `hb_shape'
/opt/toolchains/naomi/sh-elf/bin/sh-elf-ld: autofit.c:(.text.af_shaper_get_cluster+0x160): undefined reference to `hb_buffer_get_glyph_infos'
/opt/toolchains/naomi/sh-elf/bin/sh-elf-ld: autofit.c:(.text.af_shaper_get_cluster+0x164): undefined reference to `hb_buffer_get_length'
/opt/toolchains/naomi/sh-elf/bin/sh-elf-ld: /opt/toolchains/naomi/sh-elf/lib//libfreetype.a(autofit.o): in function `af_cjk_metrics_init_widths':
autofit.c:(.text.af_cjk_metrics_init_widths+0x150): undefined reference to `hb_buffer_create'
/opt/toolchains/naomi/sh-elf/bin/sh-elf-ld: autofit.c:(.text.af_cjk_metrics_init_widths+0x158): undefined reference to `hb_buffer_destroy'
/opt/toolchains/naomi/sh-elf/bin/sh-elf-ld: autofit.c:(.text.af_cjk_metrics_init_widths+0x2c8): undefined reference to `hb_buffer_get_glyph_infos'
/opt/toolchains/naomi/sh-elf/bin/sh-elf-ld: autofit.c:(.text.af_cjk_metrics_init_widths+0x2cc): undefined reference to `hb_buffer_get_glyph_positions'
/opt/toolchains/naomi/sh-elf/bin/sh-elf-ld: autofit.c:(.text.af_cjk_metrics_init_widths+0x2d0): undefined reference to `hb_buffer_destroy'
/opt/toolchains/naomi/sh-elf/bin/sh-elf-ld: /opt/toolchains/naomi/sh-elf/lib//libfreetype.a(autofit.o): in function `af_cjk_metrics_init_blues':
autofit.c:(.text.af_cjk_metrics_init_blues+0xe4): undefined reference to `hb_buffer_create'
/opt/toolchains/naomi/sh-elf/bin/sh-elf-ld: autofit.c:(.text.af_cjk_metrics_init_blues+0xf4): undefined reference to `hb_buffer_destroy'
/opt/toolchains/naomi/sh-elf/bin/sh-elf-ld: autofit.c:(.text.af_cjk_metrics_init_blues+0x3bc): undefined reference to `hb_buffer_get_glyph_infos'
/opt/toolchains/naomi/sh-elf/bin/sh-elf-ld: autofit.c:(.text.af_cjk_metrics_init_blues+0x3c0): undefined reference to `hb_buffer_get_glyph_positions'
/opt/toolchains/naomi/sh-elf/bin/sh-elf-ld: /opt/toolchains/naomi/sh-elf/lib//libfreetype.a(autofit.o): in function `af_cjk_metrics_check_digits.isra.0':
autofit.c:(.text.af_cjk_metrics_check_digits.isra.0+0xc0): undefined reference to `hb_buffer_create'
/opt/toolchains/naomi/sh-elf/bin/sh-elf-ld: autofit.c:(.text.af_cjk_metrics_check_digits.isra.0+0xd8): undefined reference to `hb_buffer_get_glyph_infos'
/opt/toolchains/naomi/sh-elf/bin/sh-elf-ld: autofit.c:(.text.af_cjk_metrics_check_digits.isra.0+0xdc): undefined reference to `hb_buffer_get_glyph_positions'
/opt/toolchains/naomi/sh-elf/bin/sh-elf-ld: autofit.c:(.text.af_cjk_metrics_check_digits.isra.0+0xe0): undefined reference to `hb_buffer_destroy'
/opt/toolchains/naomi/sh-elf/bin/sh-elf-ld: /opt/toolchains/naomi/sh-elf/lib//libfreetype.a(autofit.o): in function `af_latin_metrics_init_widths':
autofit.c:(.text.af_latin_metrics_init_widths+0x150): undefined reference to `hb_buffer_create'
/opt/toolchains/naomi/sh-elf/bin/sh-elf-ld: autofit.c:(.text.af_latin_metrics_init_widths+0x158): undefined reference to `hb_buffer_destroy'
/opt/toolchains/naomi/sh-elf/bin/sh-elf-ld: autofit.c:(.text.af_latin_metrics_init_widths+0x2c8): undefined reference to `hb_buffer_get_glyph_infos'
/opt/toolchains/naomi/sh-elf/bin/sh-elf-ld: autofit.c:(.text.af_latin_metrics_init_widths+0x2cc): undefined reference to `hb_buffer_get_glyph_positions'
/opt/toolchains/naomi/sh-elf/bin/sh-elf-ld: autofit.c:(.text.af_latin_metrics_init_widths+0x2d0): undefined reference to `hb_buffer_destroy'
/opt/toolchains/naomi/sh-elf/bin/sh-elf-ld: /opt/toolchains/naomi/sh-elf/lib//libfreetype.a(autofit.o): in function `af_latin_metrics_init_blues':
autofit.c:(.text.af_latin_metrics_init_blues+0x1ac): undefined reference to `hb_buffer_create'
/opt/toolchains/naomi/sh-elf/bin/sh-elf-ld: autofit.c:(.text.af_latin_metrics_init_blues+0x1bc): undefined reference to `hb_buffer_destroy'
/opt/toolchains/naomi/sh-elf/bin/sh-elf-ld: autofit.c:(.text.af_latin_metrics_init_blues+0x45c): undefined reference to `hb_buffer_get_glyph_infos'
/opt/toolchains/naomi/sh-elf/bin/sh-elf-ld: autofit.c:(.text.af_latin_metrics_init_blues+0x460): undefined reference to `hb_buffer_get_glyph_positions'
/opt/toolchains/naomi/sh-elf/bin/sh-elf-ld: /opt/toolchains/naomi/sh-elf/lib//libfreetype.a(autofit.o): in function `af_latin_metrics_init':
autofit.c:(.text.af_latin_metrics_init+0x11c): undefined reference to `hb_buffer_create'
/opt/toolchains/naomi/sh-elf/bin/sh-elf-ld: autofit.c:(.text.af_latin_metrics_init+0x134): undefined reference to `hb_buffer_get_glyph_infos'
/opt/toolchains/naomi/sh-elf/bin/sh-elf-ld: autofit.c:(.text.af_latin_metrics_init+0x138): undefined reference to `hb_buffer_get_glyph_positions'
/opt/toolchains/naomi/sh-elf/bin/sh-elf-ld: autofit.c:(.text.af_latin_metrics_init+0x13c): undefined reference to `hb_buffer_destroy'
make: *** [../Makefile.base:177: build/naomi.elf] Error 1
Pretty clear it's something with libfreetype, but I've already done make 3rdparty
and I see the files are in my toolchain. Any idea?
0x00 0x80555bd0 (DP): NOP command.
0x01 0x80555bd0 (DP): START-UP command.
0x02 0x80555bd0 (DP): HEALTH-CHECK command.
0x03 0x80555bd0 (DP): LOST-PACKET command.
0x04 <something is here but system reboots too quickly to print over serial>
0x05 0x80555bd0 (DP): REQUEST FOR DIMM command.
0x06 0x80555bd0 (DP): TRANSFER-CANCEL command.
0x07 0x80555bd0 (DP): HOST-MODE command.
0x08 0x80555bd0 (DP): DIMM-MODE command
0x09 0x80555bd0 (DP): TERMINATE command.
0x0A 0x80555bd0 (DP): HOST-RESTART command.
0x0B 0x80555bd0 (DP): WRITE TO FLASH command.
0x0C 0x80555bd0 (DP): WRITE EEPROM command.
0x0D 0x80555bd0 (DP): READ EEPROM command.
0x10 0x80555bd0 (DP): PEEK-HOST command.
0x11 0x80555bd0 (DP): POKE-HOST command.
0x14 0x80555bd0 (DP): ENABLE OFF-LINE command.
0x15 0x80555bd0 (DP): DISABLE OFF-LINE command.
0x16 0x80555bd0 (DP): GET COIN-INFORMATION command.
0x17 0x80555bd0 (DP): SET LIMIT-TIME command.
0x18 0x80555bd0 (DP): GET DIMM-INFORMATION command.
0x19 0x80555bd0 (DP): SET DIMM-INFORMATION command.
0x1E 0x80555bd0 (DP): GET Netfirm-Info command.
0x1F 0x80555bd0 (DP): RESET FIRM command.
0x20 0x80555bd0 (DP): 2NDBOOT UPDATE command. <killed my mediaboard>
0x21 0x8054fac0 (DP): MEDIA FORMAT command.
0x25 0x8054fac0 (DP): Set Media-Information command.
0x7F 0x8054fac0 (DP): SET SECURITY-KEYCODE command.
0xF0 0x8054fac0 (DP): PeekHost16 command.
0xF1 0x8054fac0 (DP): PokeHost16 command.
0xF2 0x8054fac0 (DP): ControlRead command.
For science I killed one of my Type-3 Chihiro media boards. These were issued with Ver13.05.bin firmware.
Running:
./netdimm_menu --verbose 192.168.0.2 ../roms/
Rom list appears, I select a game, and get the following:
...
Attaching section to a new ROM section at the end of the file.
Connecting to net dimm...
Sending menu to net dimm...
length: 0017168c
Talking to net dimm to wait for ROM selection...
Received type: 0x1000, length: 4
Requested MetalSlug6 be loaded...
Sending type: 0x1009, length: 8
Packet transfer took 0.28948378562927246 seconds
Could not send data to NetDimm
Sending game failed...
The send starts, and then crashes at the 004000 with a pipeline lost error. From what I can see it's because when the transfer starts the naomi reboots, and the send loses the connection during that reboot. Would it be possible to add a 10-second delay between the reboot command and the start of the send operation to help alleviate this issue?
hi, if i may give you a suggestion, could you also add the compiled ".bin" examples and revisions while you progress in this great adventure?
Some graphical glitches present in the up/down cursors and fonts in vertical mode of the netdimm menu
I just set up the tools as a web server in a jail on my TrueNAS server, which is freebsd.
My cabinets were rapidly rebooting when trying to send games. I found this PR (#10) and swapped out "darwin" for "freebsd12" and all is well. I see that there's an env var to trigger the behavior as well.
Maybe raising an issue isn't entirely necessary since I don't really have an issue, I figured it might be worthwhile to have this in the repos history if someone happens to come across it themselves.
The line in question:
Line 264 in 4c39ce9
I apologize as I haven't really understood 100% what this is doing, but this line is causing an error with converted Atomiswave roms.
For example the indexes it's calculating for Demolish Fist look like:
[82, 67, 65, 68, 69, 77, 79, 68]
Where as a quick look at a normal Naomi game its all 1's or nothing.
I have the following setup that is tested with the older Python 2 script:
A Sega Naomi (4.02 firmware) connected to a MacBook Pro with Catalina running Python 2.7 (for the older script) and Python 3.6.8 via a cross over cable.
I ran the following command to attempt to send a game to the Sega Naomi:
netboot iandurnford$ python3 -m scripts.netdimm_send 192.168.0.50 powerstone2.bin
This is what is displayed in the terminal window after running the command above:
sending...
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/Users/iandurnford/Documents/Old Hard drive Backup/Projects/Sega Naomi/Modern_NetBoot/netboot/scripts/netdimm_send.py", line 90, in
sys.exit(main())
File "/Users/iandurnford/Documents/Old Hard drive Backup/Projects/Sega Naomi/Modern_NetBoot/netboot/scripts/netdimm_send.py", line 81, in main
netdimm.send(data, key)
File "/Users/iandurnford/Documents/Old Hard drive Backup/Projects/Sega Naomi/Modern_NetBoot/netboot/netboot/netboot.py", line 61, in send
self.__upload_file(data, key, progress_callback or (lambda _cur, _tot: None))
File "/Users/iandurnford/Documents/Old Hard drive Backup/Projects/Sega Naomi/Modern_NetBoot/netboot/netboot/netboot.py", line 161, in __upload_file
self.__upload(addr, current, 0)
File "/Users/iandurnford/Documents/Old Hard drive Backup/Projects/Sega Naomi/Modern_NetBoot/netboot/netboot/netboot.py", line 132, in __upload
self.__write(struct.pack("<IIIH", 0x04800000 | (len(data) + 0xA) | (mark << 16), 0, addr, 0) + data)
File "/Users/iandurnford/Documents/Old Hard drive Backup/Projects/Sega Naomi/Modern_NetBoot/netboot/netboot/netboot.py", line 96, in __write
self.sock.send(data)
BrokenPipeError: [Errno 32] Broken pipe
Ians-MacBook-Pro:netboot iandurnford$
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.