Skip to content

skip IO area when loading PRG files#188

Open
Frank-Buss wants to merge 1 commit into
commanderx16:masterfrom
FrankBuss:master
Open

skip IO area when loading PRG files#188
Frank-Buss wants to merge 1 commit into
commanderx16:masterfrom
FrankBuss:master

Conversation

@Frank-Buss

Copy link
Copy Markdown
Contributor

This allows to load big PRG files, which then will be loaded
into the banked RAM area, if it reaches the end of the BASIC RAM
area. This allows easier program distribution without many small
files. Example app:
http://www.frank-buss.de/x16/mode7-full.prg
Both load functions are changed: -prg and when using LOAD from BASIC.
The native LOAD function with IEC will follow in the ROM repository,
when I found a way to test it.

This allows to load big PRG files, which then will be loaded
into the banked RAM area, if it reaches the end of the BASIC RAM
area. This allows easier program distribution without many small
files. Example app:
http://www.frank-buss.de/x16/mode7-full.prg
Both load functions are changed: -prg and when using LOAD from BASIC.
The native LOAD function with IEC will follow in the ROM repository,
when I found a way to test it.
@kktos

kktos commented Oct 23, 2019

Copy link
Copy Markdown
Contributor

Frank, Just food for thought:
I suppose at some point we will have a way to tell if a bank is used or not. This will be part of the firmware.
So your code will have to deal with it. (ok, ok, when this will be settle, of course.)
And more: what if bank 0 is free, bank 1 used and bank 2 free ?
The code will also have to get the available free banks....
But then, you'll tell me, how can I know the banks my program was loaded into......
yes, that's a good question.... :)

told you, just food for thought ;)

@Frank-Buss

Copy link
Copy Markdown
Contributor Author

Does the current ROM use the banked RAM? If not, I don't see a problem. Even if it uses it at some time, this doesn't matter much, if you can still load one PRG after reset for games etc. If the banked RAM is used, then the current implementation which can load directly to the banked RAM (without lower RAM) would be needed to change, too. But I think we shouldn't make it too difficult, it is not like a multitask, multiuser system :-)

@kktos

kktos commented Oct 23, 2019

Copy link
Copy Markdown
Contributor

True, but I kept thinking we can load some extensions, libraries (graphic), simon's basic, stuff like that. And it would be good if they are able to share the mem without a fight :)

Frank-Buss added a commit to FrankBuss/x16-rom that referenced this pull request Nov 3, 2019
When verifying data in VRAM, the bank wrap check was executed
unconditionally, which caused verify errors if it reached address $c000.
New implementation: when loading large PRG files from 0801, it
skips now the IO area from $9f00 to $9fff, and loads the rest of
the program in banked RAM. Same implementation as already implemented
in C with LOAD_HYPERCALLS enabled, and with the "-prg" argument of the
emulator, see here:
commanderx16/x16-emulator#188
@Frank-Buss

Copy link
Copy Markdown
Contributor Author

@mist64 So what about this PR? I'm writing a bigger demo at the moment with Barry, would be nice to know if I have to split it in 2 files, or if I could use just one file :-) Works with the native LOAD as well with this PR. Or it will work, when someday the SD-card implementation works, and the IEC implementation is finished, but at least while testing my implementation, I fixed another critical bug in the LOAD function.

jestin pushed a commit to jestin/x16-emulator that referenced this pull request Jan 31, 2024
…ve it onscreen (commanderx16#188)

* If the emulator starts with the left/top of the window off screen, move it onscreen

* update check here as well
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.

2 participants