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

Any way to mix MS Basic with Open ROMs #56

Open
ssuukk opened this issue Oct 2, 2020 · 4 comments
Open

Any way to mix MS Basic with Open ROMs #56

ssuukk opened this issue Oct 2, 2020 · 4 comments

Comments

@ssuukk
Copy link

ssuukk commented Oct 2, 2020

I want to play a bit with OpenROMs but I'm not eager to give up on BASIC functionality, so I was wondering - can I just binary combine the original BASIC 1000-something bytes with Ultimate 64 Open Kernal 4k image, or it just wouldn't work? I know there's the hybrid build but it's not entirely clear to me what it does exactly (and btw - the build file wasn't updated so the hybrid can't be build without some amendments right now).

Also, I guess I won't be prosecuted for copying missing functions from the original Kernal into OpenROMs just for my own use, right? ;) To do this do I have to think about anything else besides proper file naming, and #layout# annotations? Could you maybe add a short help section in the readme for people who disrespect 50-years old copyright claims, as I do? ;)

@FeralChild64
Copy link
Collaborator

The hybrid build does mostly what you want - put kernal file in the open-roms directory and type make test_hybrid from the Linux shell. But it uses a generic build, not the Ultimate 64 one - currently there is very little difference nevertheless. Unfortunately, due to legal issues we can't share such a build.

The reason the original kernal is needed is that it actually contains about 1.5KB of BASIC code which didn't made it into the base 8KB BASIC ROM segment.

Indeed, this is not sufficiently documented - I'll improve it. Keep in mind, that you will gain a full BASIC, but you will lose some features - for example, there won't be a DOS Wedge any more, as Open ROMs implements it within BASIC.

As for using individual routines from original Kernal with Open ROMs - this wouldn't be that simple, most routines call other (helper) subroutines - and Open ROMs might have much different helper subroutines. You would have to analyse the routine from the original ROM and adapt the implementation itself.

@ssuukk
Copy link
Author

ssuukk commented Oct 4, 2020

Aaaaah, ok - I didn't get the wedge in the hybrid build + it looks plain and that's why I thought it doesn't work at all, but anyway - have you actually tried building the hybrid NOW? It won't build unless you prepend the file name there in the makefile with "build" path if I remember correctly.

Also - would it be possible to choose which "base" is the hybrid built on?

Yeah, I suspect you have different helper routines, but I will start with obvious things, like in your "implementation status" you have a few "(unknown)" routines and some of them are quite obvious, like the one that just calculates the length of the filename, for serial coms, I guess.

Anyway - I've almost finished implementing a poor man's "multitasking" routines for machines that have a REU: number + RESTORE swaps out current memory contents into REU page and swaps in another REU page (depending on the number held while hitting RESTORE). It's fun to have a tinkerable kernal ;)

@FeralChild64
Copy link
Collaborator

Yes, I have tried - works for me. I basically use make test_hybrid, but make build/kernal_hybrid.rom should work too.

Commit FeralChild64@b8aadaa#diff-c1111bd512b29e821b120b86446026b8 adds some documentation on my branch, it will be merged to the official branch one day.

I'll add a way to use Ultimate 64 ROM as a base, it'll be make test_hybrid_u64. But not for MEGA65, too much of enhanced hardware support depends on BASIC too, it's even possible I'll have to introduce additional entry points to BASIC from Kernal.

The problem with these 'unknown' routines is, that I don't look into the original ROM source code to find out how something works - I'm trying to find the information in various sources (books, web pages, forums), or do some experimentations - this can be time consuming.
This is all due to legal reasons. If someone else (a 3rd party) checks them, describes what's their effect (like - calculate the length of a string pointed by ... and put the result into ...), than I can provide implementation.

@ssuukk
Copy link
Author

ssuukk commented Oct 5, 2020

Probably I could do a bit of those, also test_hybrid_u64 sounds ok.

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

2 participants