Update:
v0.124
-LSHIFT/RSHIFT to switch baudrate. Default is 209954 (for NTSC Sega Saturn)
v0.123
-Experimental. Placed sci buffer and sci isr into sh2 cache.
v0.122
- Few cleanups
v0.121
- Changed baud rate to 211000 bps (NTSC Sega Saturn). Works much faster now
Connect Master TX, Master RX, GND from Saturn Communication Connector to RX, TX, GND of any USB UART TTL adapter (if it have jumper to select 3.3v/5v mode - use 5v mode) connected to your PC, or use max232 to connect Saturn MTX, MRX, GND directly to your PC hardware RS232 port.
Then run sloader at your Saturn and use provided sloader.py python script on your PC.
Exact measured baudrate is euqal to 209954 bps on NTSC Sega Saturn.
Examples of usage:
If you prefer to use other way to communicate with serial loader, proto is:
Example of speed (so, 3 sec to backup internal saves and same for loading and running sloader binary, and 12 sec to backup 256kb cartridge):
I measured real baudrate frequency with freq meter, so, calculations fixed and now equal to real speeds. And here is real baudrates for NTSC Sega Saturn (it is test branch of serial loader, where possible to switch baudrates speed):
Below is outdated info for history purposes
It using sh2 master SCI in uart mode at 31250 bps. To upload your program, use included python script serial.py
serial.py <binary> <address to load>
Or use any other way, the protocol format is simple
uint8 command // "r" for upload
when in "r" mode, Serial loader awaits:
uint32 address // upload and start address for your program
uint32 size // size of your program
then upload program byte by byte, when its done uploading it will be run by serial loader
Hi
I decided to try out saturn serial port. I printed great connector created by our forum user zone66x And it is fit communication port ideally.
I wrote simple test program for saturn to test communication and it works fine. I think, i will add few useful functions (uploading/running binary and backup interal backup ram) and then upload it here.
ps. sh2 is very picky about clocks, when it came to uart and to be true, using internal clocks to drive, make it almost useless as it is not something you may call fast. But.. it works.
v0.124
-LSHIFT/RSHIFT to switch baudrate. Default is 209954 (for NTSC Sega Saturn)
v0.123
-Experimental. Placed sci buffer and sci isr into sh2 cache.
v0.122
- Few cleanups
v0.121
- Changed baud rate to 211000 bps (NTSC Sega Saturn). Works much faster now
Connect Master TX, Master RX, GND from Saturn Communication Connector to RX, TX, GND of any USB UART TTL adapter (if it have jumper to select 3.3v/5v mode - use 5v mode) connected to your PC, or use max232 to connect Saturn MTX, MRX, GND directly to your PC hardware RS232 port.
Then run sloader at your Saturn and use provided sloader.py python script on your PC.
Exact measured baudrate is euqal to 209954 bps on NTSC Sega Saturn.
Examples of usage:
Code:
//dump 256kb cartridge rom
sloader.py d cart_rom_cs0.bin 0x02000000 0x40000
//dump 512kb bios rom for backup purpose from your Sega Saturn
sloader.py d bios_backup.bin 0x00000000 0x80000
//dump 4Mbit Backup RAM cart (saves)
sloader.py d bksv4m.bin 0x24000000 0x100000
//dump Internal Battery backup RAM (saves)
sloader.py d bkram.bin 0x00180000 0x10000
//restore Internal Battery backup RAM (saves) from bkram.bin
sloader.py w bkram.bin 0x00180000
//upload and execute serial.bin from 0x06004000
sloader.py r serial.bin 0x06004000
//jump to 0x06004000
sloader.py j 0x06004000
If you prefer to use other way to communicate with serial loader, proto is:
Code:
//Serial loader command awaiting mode (default):
uint8 command // "d" for dump, "j" for jumping to addr, "r" for load and run binary, "w" for writing binary to memory
//dump()
uint32 address // address
uint32 size // size
//then serial loader will send data from specified address byte by byte
//jump()
uint32 address // address to jump
//run()
uint32 address // upload and start address for your program
uint32 size // size of your program
//then upload program byte by byte, when its done uploading it will be run by serial loader
//write()
uint32 address // upload address for your data
uint32 size // size of your data
//then upload data byte by byte
Example of speed (so, 3 sec to backup internal saves and same for loading and running sloader binary, and 12 sec to backup 256kb cartridge):
I measured real baudrate frequency with freq meter, so, calculations fixed and now equal to real speeds. And here is real baudrates for NTSC Sega Saturn (it is test branch of serial loader, where possible to switch baudrates speed):
Below is outdated info for history purposes
It using sh2 master SCI in uart mode at 31250 bps. To upload your program, use included python script serial.py
serial.py <binary> <address to load>
Or use any other way, the protocol format is simple
uint8 command // "r" for upload
when in "r" mode, Serial loader awaits:
uint32 address // upload and start address for your program
uint32 size // size of your program
then upload program byte by byte, when its done uploading it will be run by serial loader
Hi
I decided to try out saturn serial port. I printed great connector created by our forum user zone66x And it is fit communication port ideally.
I wrote simple test program for saturn to test communication and it works fine. I think, i will add few useful functions (uploading/running binary and backup interal backup ram) and then upload it here.
ps. sh2 is very picky about clocks, when it came to uart and to be true, using internal clocks to drive, make it almost useless as it is not something you may call fast. But.. it works.
Attachments
Last edited: