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

SDCC-compileable replacements for coldboot.bin and pilot.bin? #2

Open
spth opened this issue Aug 30, 2020 · 11 comments
Open

SDCC-compileable replacements for coldboot.bin and pilot.bin? #2

spth opened this issue Aug 30, 2020 · 11 comments

Comments

@spth
Copy link
Owner

spth commented Aug 30, 2020

OpenRabbit currently depends on the coldboot.bin and pilot.bin binary blobs from Dynamic C.

While the source code for both is free (MPLv2), the non-free Dynamic C is required to compile them.

It would be good to have replacements that compile with free SDCC.

@spth spth changed the title Free replacements for coldboot.bin and pilot.bin SDCC-compileable replacements for coldboot.bin and pilot.bin? Aug 30, 2020
@spth
Copy link
Owner Author

spth commented Aug 30, 2020

This would essentially be done by translating the Dynamic C source at https://github.com/digidotcom/DCRabbit_10/tree/master/ColdBoot to sdas syntax (despite being named .C these are actually assembler source files). Then we could compare the resulting binary to the coldboot.bin and pilot.bin that come with Dynamic C.

@spth
Copy link
Owner Author

spth commented Aug 30, 2020

At least the source for pilot.bin from Dynamic C 10 won't work, as it uses Rabbit 4000-specific instructions that won't work on Rabbit 2000 and 3000. Need to check coldboot.bin (and see if pilot.bin source from Dynamic C 9 will be released as free software).

See also: digidotcom/DCRabbit_9#3

@spth
Copy link
Owner Author

spth commented Sep 1, 2020

Source for pilot.bin and coldboot.bin suitable for Rabbit 2000 and 3000 from Dynamic C 9 has just been released under MPL:
digidotcom/DCRabbit_9@d939c14

@spth
Copy link
Owner Author

spth commented Sep 8, 2020

The coldoad branch now has coldboot.bin source that can be compiled with SDCC.
Doing the same for pilot.bin would be possible, but more work.

@tomlogic
Copy link
Collaborator

It should be safe to remove the nop opcodes and trailing instructions. As mentioned in our other communications, I believe the nops are placeholders for debugging via rst28 opcodes and unnecessary, and the 5 instructions at the end are unused/unnecessary.

@spth
Copy link
Owner Author

spth commented Sep 12, 2020

I intent to remove them later, once I have the RFU-equivalent functionality working with OpenRabbit.

@spth
Copy link
Owner Author

spth commented Sep 14, 2020

In current trunk, the unneeded instruction in coldload.bin are removed. It still works fine.

@spth
Copy link
Owner Author

spth commented Sep 15, 2020

Replacing pilot.bin will be harder. The source is mostly assembler code with C declarations. SDCC is a great C compiler, but it doesn not support as much interaction between C and assembler as Dynamic C does. This will be more of a rewrite than a simple syntax translation.

@feilipu
Copy link

feilipu commented Dec 24, 2023

Philipp, I've taken on a RCM2024 project to build a cheap (hobby) version of a Rabbit 2000 board, since there's nothing else around, afaik.

As a starting point I've been donated a RCM4300 which I can use to play with, and get the loaders and crt0 working with z88dk and sdcc.

Since Dom and Paulo have added R4000 mnemonics to z88dk, I can rewrite the Dynamic C cold boot and pilot code in native assembly.

So just wondering whether you're still interested in Rabbit stuff to add some advice to my endeavour?

Merry Christmas.

@spth
Copy link
Owner Author

spth commented Dec 28, 2023

Well, I still maintain the Rabbit ports (r2k, r2ka, r3ka) of SDCC. Having a reliable and fully free software way to test on hardware would be good. I do have some RCM, so hardware is less of an issue for now.
We do now have a free (with source) coldboot.bin. We currently do not have source for a pilot.bin. However, IMO the current main issue are some sporadic hangs I see when using OpenRabbit: see #22 for details.
I'm not near my Rabbit hardware for the moment, so I can't do any testing this or next week.

@feilipu
Copy link

feilipu commented Dec 28, 2023

Thanks Philipp. Nothing to rush.

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

No branches or pull requests

3 participants