-
Notifications
You must be signed in to change notification settings - Fork 17
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
Preserve palette on DLOAD call under cpc #1035
Comments
Hi @poppichicken , and thank you for your bug report! This program cannot work because the memory at hexadecimal location To be sure that the operation is feasible, you need to use ugBASIC to reserve the space where you will write. For example, if you need to load 8 characters, you can define an array of 8 elements of type
In other way, you can define an 8-character dynamic string, and finally use the
Thank you again! |
Thanks Marco.
However the above code doesn't work. Using STRPTR does the same thing.
"data.txt" contains this:
|
Hi @poppichicken , thank you for the feedback! I am sorry, my mistake, I forgot that it is necessary to define a storage on which you will then operate. In fact, This is a program that works:
Alternatively, it is necessary to take the file with the disk, in which the compiled executable will have been inserted, and insert the file into the disk later, before running it Thank you again! |
Excellent!
However, something odd happens. Then the entire screen goes blue, which looks a bit like the program has crashed. |
Hi @poppichicken , and thank you for the feedback! From my recollections of the first implementation, this is a side effect of the use of system routines (ROM). These reset the screen colors to a default value during the interrupt that is responsible for responding to hardware (disk drive) input. If there was a way to know which memory locations the computer's operating system reads to populate these two colors (border and background, but also palette), this problem could be solved. Unfortunately, I couldn't find them in documentations. Let me know if you have any way to find them. Thank you! |
Ah yes of course, that makes sense.
|
Hi @poppichicken, absolutely yes, the workaround is valid. However, it would be nice to be able to fix this "smudge". For this reason, I changed the title of this ticket, I reopened it and promoted it to an improvement. |
Thanks Marco. |
hi Marco.
This seems to cause the CPC to crash.
After changing the border to WHITE and the background to BLACK, the whole screen (including border) changes to BLUE and nothing is printed.
The text was updated successfully, but these errors were encountered: