Poke to hide "Program:, Bytes:" tape loading prompts
Poke to hide "Program:, Bytes:" tape loading prompts
Hi. I remember that there's a poke that can be used immediately before LOAD, to hide the "Program:, Bytes:" etc. prompt from the screen (so it doesn't wreck your pretty loading screen or whatever).
To my surprise I can't find this poke despite some diligent search attempts. Please remind me!
To my surprise I can't find this poke despite some diligent search attempts. Please remind me!
- MustardTiger
- Microbot
- Posts: 122
- Joined: Tue May 02, 2023 8:05 pm
Re: Poke to hide "Program:, Bytes:" tape loading prompts
10 CLEAR 24575: LOAD ""SCREEN$: POKE 23739,111: LOAD ""CODE: RANDOMIZE USR 24576
I searched for this recently and it took ages to find. I haven't tried it though, just pasted the code at the bottom of my source for when I need it.
I searched for this recently and it took ages to find. I haven't tried it though, just pasted the code at the bottom of my source for when I need it.
Re: Poke to hide "Program:, Bytes:" tape loading prompts
POKE 23739,111, that's the bunny. Thanks.MustardTiger wrote: ↑Mon Feb 12, 2024 6:25 pm 10 CLEAR 24575: LOAD ""SCREEN$: POKE 23739,111: LOAD ""CODE: RANDOMIZE USR 24576
I searched for this recently and it took ages to find. I haven't tried it though, just pasted the code at the bottom of my source for when I need it.
Also explains why I couldn't find it in the manual (chapter 25: system variables), since their list ends a few bytes earlier, at 23732.
Maybe the Tipshop needs a section for all those handy non-game pokes... hmmm
- ParadigmShifter
- Manic Miner
- Posts: 670
- Joined: Sat Sep 09, 2023 4:55 am
Re: Poke to hide "Program:, Bytes:" tape loading prompts
It's part of the channel info which is at the end of the SYSVAR area and is 21 bytes long
https://skoolkid.github.io/rom/dec/asm/23734.html
Presumably it sends it to some null device or something which doesn't appear on the screen when you poke it with 111.
Hmm its replacing the low byte of a function pointer with 111... maybe that just points to a RET instruction in the ROM afterwards or something
https://skoolkid.github.io/rom/dec/asm/23734.html
Presumably it sends it to some null device or something which doesn't appear on the screen when you poke it with 111.
Hmm its replacing the low byte of a function pointer with 111... maybe that just points to a RET instruction in the ROM afterwards or something
- MustardTiger
- Microbot
- Posts: 122
- Joined: Tue May 02, 2023 8:05 pm
Re: Poke to hide "Program:, Bytes:" tape loading prompts
Just looking at the Rom disassembly, it's doing just that. Points to a Ret rather than the PRINT_OUT function.ParadigmShifter wrote: ↑Mon Feb 12, 2024 6:40 pm
Hmm its replacing the low byte of a function pointer with 111... maybe that just points to a RET instruction in the ROM afterwards or something
- ParadigmShifter
- Manic Miner
- Posts: 670
- Joined: Sat Sep 09, 2023 4:55 am
Re: Poke to hide "Program:, Bytes:" tape loading prompts
Does that bugger up normal printing then until you set it back? Only an issue if you use the super slow ROM to do printing (or BASIC) I guess.
My first hacky thought of how it would work was correct
EDIT: Yep it disables printing to top 22 lines of screen until you POKE the value 244 back. So you have to do that either in your asm code or before the RANDOMIZE USR x if you want to use ROM or BASIC output to work correctly after loading.
My first hacky thought of how it would work was correct
EDIT: Yep it disables printing to top 22 lines of screen until you POKE the value 244 back. So you have to do that either in your asm code or before the RANDOMIZE USR x if you want to use ROM or BASIC output to work correctly after loading.
- MustardTiger
- Microbot
- Posts: 122
- Joined: Tue May 02, 2023 8:05 pm
Re: Poke to hide "Program:, Bytes:" tape loading prompts
I wonder if you could poke the two bytes to jump off to a function that ignores the print but repairs the sysvars for when the program runs. Probably overkill
Re: Poke to hide "Program:, Bytes:" tape loading prompts
Some things undo the effect of the poke, like CLS.
- ParadigmShifter
- Manic Miner
- Posts: 670
- Joined: Sat Sep 09, 2023 4:55 am
Re: Poke to hide "Program:, Bytes:" tape loading prompts
Yeah you could point it to ASM code such as this, only if you load 1 block (otherwise you have to point it at the code again before you load another block)
You could easily poke those 6 bytes in the basic loader anywhere you wanted and point the function pointer at that.
Code: Select all
ld a, 244
ld (23739), a
ret
- WhatHoSnorkers
- Manic Miner
- Posts: 254
- Joined: Tue Dec 10, 2019 3:22 pm
Re: Poke to hide "Program:, Bytes:" tape loading prompts
I used to find it by Googling "Jonathan Cauldwell POKE". He talks about it in his book, but I don't know if he originally invented it or not.
I used to use it a lot, but you'd need a CLS or two to reset, so these days I position the PRINT in unobtrusive parts of the screen or something.
I used to use it a lot, but you'd need a CLS or two to reset, so these days I position the PRINT in unobtrusive parts of the screen or something.
I have a little YouTube channel of nonsense
https://www.youtube.com/c/JamesOGradyWhatHoSnorkers
https://www.youtube.com/c/JamesOGradyWhatHoSnorkers
Re: Poke to hide "Program:, Bytes:" tape loading prompts
I've seen at least one old game where the artist ingeniously included "Bytes: blah" in the loading screen itself, and then set OVER 1 so that the loading prompt would erase it! Not ideal, since you still see it for a few seconds.WhatHoSnorkers wrote: ↑Mon Feb 12, 2024 7:11 pm I used to find it by Googling "Jonathan Cauldwell POKE". He talks about it in his book, but I don't know if he originally invented it or not.
I used to use it a lot, but you'd need a CLS or two to reset, so these days I position the PRINT in unobtrusive parts of the screen or something.
- ParadigmShifter
- Manic Miner
- Posts: 670
- Joined: Sat Sep 09, 2023 4:55 am
Re: Poke to hide "Program:, Bytes:" tape loading prompts
Nah as I said you can just POKE 23739, 244 to enable printing after loading (or as the first line of a BASIC program you load I guess if it's in BASIC).
So if you want the loading screen to stay after the code starts running you can do that
EDIT: That was a reply to Mr. Snorkers.
So if you want the loading screen to stay after the code starts running you can do that
EDIT: That was a reply to Mr. Snorkers.
- WhatHoSnorkers
- Manic Miner
- Posts: 254
- Joined: Tue Dec 10, 2019 3:22 pm
Re: Poke to hide "Program:, Bytes:" tape loading prompts
Yeah, it took me a few goes to get it right. Awkward to test! What I found was I had the game all sorted, then I bolt on a loading screen with the POKE, then had to turn it off (which Mr Cauldwell didn't tell me) otherwise you'd get weird results. And you couldn't fast load as I wasn't clever enough to just put PAUSE 0 at the top of the program!ParadigmShifter wrote: ↑Mon Feb 12, 2024 7:14 pm Nah as I said you can just POKE 23739, 244 to enable printing after loading (or as the first line of a BASIC program you load I guess if it's in BASIC).
So if you want the loading screen to stay after the code starts running you can do that
EDIT: That was a reply to Mr. Snorkers.
Live and learn
I have a little YouTube channel of nonsense
https://www.youtube.com/c/JamesOGradyWhatHoSnorkers
https://www.youtube.com/c/JamesOGradyWhatHoSnorkers
- ParadigmShifter
- Manic Miner
- Posts: 670
- Joined: Sat Sep 09, 2023 4:55 am
Re: Poke to hide "Program:, Bytes:" tape loading prompts
I wonder if Mr. Cauldwell had some kind of scandal in the past involving him poking things and that is just a ploy to make those search results not appear on the first page when you Google (like how Boris Johnson made up that story about him making model buses out of wine box cartons to try and bury google searches for Boris Johnson + Bus about that £350m NHS lie)WhatHoSnorkers wrote: ↑Mon Feb 12, 2024 7:11 pm I used to find it by Googling "Jonathan Cauldwell POKE". He talks about it in his book, but I don't know if he originally invented it or not.
I used to use it a lot, but you'd need a CLS or two to reset, so these days I position the PRINT in unobtrusive parts of the screen or something.
Re: Poke to hide "Program:, Bytes:" tape loading prompts
In theory you could have a filename called "Bytes" with the control codes at the start to get the cursor to overwrite it first (CHR$ 22, 1, 0, 21, 1) but you'd still be left with a floating colon. Missus.
Re: Poke to hide "Program:, Bytes:" tape loading prompts
I mean, the other way is to have a headerless loader and call it from rom, can't remember exactly how it's done but even I managed it years ago in some csscgc entry so can't be that hard.
Re: Poke to hide "Program:, Bytes:" tape loading prompts
This doesn't seem to work. (I don't think OVER codes work in a string.) Also it relies on the Bytes: etc. being printed on line 1, which will not be true if you have moved the print position.
The tab character CHR$ 23 might be handy in blanking out the line (though again it would depend on the print position and whether OVER was already enabled). "Character array:" is the really long one!
Re: Poke to hide "Program:, Bytes:" tape loading prompts
- ParadigmShifter
- Manic Miner
- Posts: 670
- Joined: Sat Sep 09, 2023 4:55 am
Re: Poke to hide "Program:, Bytes:" tape loading prompts
I only really like using character codes to embed keywords in the filename. I will defo be using Bytes: SJOE CODE AND DATA when I finally finish the full version
Anything else to hide the message is easily sorted by the POKE which has been discussed already.
I know most loaders would crash if you tried to break into them, that must be a code that replaces the error handler (or output stream for the lower screen area) I guess, you can probably override that one too do do some funky stuff? (e.g. printing "don't press break you muppet rewind the tape and try again" or something)
Anything else to hide the message is easily sorted by the POKE which has been discussed already.
I know most loaders would crash if you tried to break into them, that must be a code that replaces the error handler (or output stream for the lower screen area) I guess, you can probably override that one too do do some funky stuff? (e.g. printing "don't press break you muppet rewind the tape and try again" or something)
- TakuikaNinja
- Drutt
- Posts: 30
- Joined: Mon Dec 25, 2023 11:02 am
- Location: New Zealand
- Contact:
Re: Poke to hide "Program:, Bytes:" tape loading prompts
Does any assembler/compiler allow embedding character codes into the filename? Pasmo and bas2tap end up escaping the backslash ("\") you'd normally use to insert escape sequences into strings.
- ParadigmShifter
- Manic Miner
- Posts: 670
- Joined: Sat Sep 09, 2023 4:55 am
Re: Poke to hide "Program:, Bytes:" tape loading prompts
I've not tried to do it yet except in BASIC where it is easy.
It's pretty easy to hack the filename bytes of the loader header though and resave?
If you are using an emulator it's probably easiest to load the assembly to the right place in memory and then do a SAVE "funkyfilename" CODE start, len.
It's pretty easy to hack the filename bytes of the loader header though and resave?
If you are using an emulator it's probably easiest to load the assembly to the right place in memory and then do a SAVE "funkyfilename" CODE start, len.
Last edited by ParadigmShifter on Tue Feb 13, 2024 2:42 am, edited 1 time in total.
- TakuikaNinja
- Drutt
- Posts: 30
- Joined: Mon Dec 25, 2023 11:02 am
- Location: New Zealand
- Contact:
Re: Poke to hide "Program:, Bytes:" tape loading prompts
I know I could do that but it feels rather inelegant that it can't be done on the terminal (I use Linux).ParadigmShifter wrote: ↑Tue Feb 13, 2024 2:38 am I've not tried to do it yet except in BASIC where it is easy.
It's pretty easy to hack the filename bytes of the loader header though and resave?
- ParadigmShifter
- Manic Miner
- Posts: 670
- Joined: Sat Sep 09, 2023 4:55 am
Re: Poke to hide "Program:, Bytes:" tape loading prompts
Yeah so see my edit, load the binary into an emulator at the right address then just do a SAVE "filename" CODE start, len
- TakuikaNinja
- Drutt
- Posts: 30
- Joined: Mon Dec 25, 2023 11:02 am
- Location: New Zealand
- Contact:
Re: Poke to hide "Program:, Bytes:" tape loading prompts
Well now this just makes me want to make the filename print out the longest string within the 10 character limit.
Last edited by TakuikaNinja on Tue Feb 13, 2024 3:08 am, edited 1 time in total.
- ParadigmShifter
- Manic Miner
- Posts: 670
- Joined: Sat Sep 09, 2023 4:55 am
Re: Poke to hide "Program:, Bytes:" tape loading prompts
RANDOMIZE is your friend.
Once it wraps to another line it kind of looks crappy though.
I think the filename is not terminated by last byte being OR'd with 128 and is fixed 10 bytes so you should be able to use 10 of those?
EDIT: Great minds think alike. Fools seldom differ
EDIT2: Great name for a game though, RANDOMIZE RANDOMIZE RANDOMIZE RANDOMIZE RANDOMIZE RANDOMIZE RANDOMIZE RANDOMIZE RANDOMIZE RANDOMIZE
I still think it should be RANDOMISE of course
There was a CSSCGC entry with an all keywords name at least once, something about a CAT if I recall correctly
Once it wraps to another line it kind of looks crappy though.
I think the filename is not terminated by last byte being OR'd with 128 and is fixed 10 bytes so you should be able to use 10 of those?
EDIT: Great minds think alike. Fools seldom differ
EDIT2: Great name for a game though, RANDOMIZE RANDOMIZE RANDOMIZE RANDOMIZE RANDOMIZE RANDOMIZE RANDOMIZE RANDOMIZE RANDOMIZE RANDOMIZE
I still think it should be RANDOMISE of course
There was a CSSCGC entry with an all keywords name at least once, something about a CAT if I recall correctly