How to suppress the "PRESS RECORD & PLAY ON TAPE" prompt?

Basic and Machine Language

Moderator: Moderators

User avatar
srowe
Vic 20 Scientist
Posts: 1340
Joined: Mon Jun 16, 2014 3:19 pm

Re: How to suppress the "PRESS RECORD & PLAY ON TAPE" prompt?

Post by srowe »

chysn wrote: Wed Aug 11, 2021 5:24 am That's a clever idea. Unfortunately, it's one byte more than the CHROUT-to-/dev/null method.
If you're that tight for space then try replacing

Code: Select all

	LDA	#%10000000
	STA	VIA1DDRA
with

Code: Select all

	ASL	VIA1DDRA
You normally avoid instructions like this with I/O devices because there's an extra write operation (read current value, write current value, write new value). But in this case there's no unwanted side-effect of that.
User avatar
chysn
Vic 20 Scientist
Posts: 1205
Joined: Tue Oct 22, 2019 12:36 pm
Website: http://www.beigemaze.com
Location: Michigan, USA
Occupation: Software Dev Manager

Re: How to suppress the "PRESS RECORD & PLAY ON TAPE" prompt?

Post by chysn »

srowe wrote: Wed Aug 11, 2021 10:41 am If you're that tight for space then try replacing

Code: Select all

	LDA	#%10000000
	STA	VIA1DDRA
with

Code: Select all

	ASL	VIA1DDRA
You normally avoid instructions like this with I/O devices because there's an extra write operation (read current value, write current value, write new value). But in this case there's no unwanted side-effect of that.
Yeah, that's working great! I've gotten pretty good at intentionally bouncing the C2N switches, so I could reliably cause the messages when relying on the wait alone.

I've done a bunch of saves and loads in VICE and real hardware. Between the interface control provided by Mike's method, and your data direction override method, I think I have pretty robust tape support for this game.

Thanks a million!
User avatar
srowe
Vic 20 Scientist
Posts: 1340
Joined: Mon Jun 16, 2014 3:19 pm

Re: How to suppress the "PRESS RECORD & PLAY ON TAPE" prompt?

Post by srowe »

I would check with @Mike or someone that understands the VIA at an electronic level better than me.

Under normal situations the line is configured as an input, it has an internal pull-up resistor so that the value is 1 until the switch in the cassette connects it to ground. I don't think there is any harm in configuring it to an output with a level of 0 and then the switch connecting it to ground.
User avatar
chysn
Vic 20 Scientist
Posts: 1205
Joined: Tue Oct 22, 2019 12:36 pm
Website: http://www.beigemaze.com
Location: Michigan, USA
Occupation: Software Dev Manager

Re: How to suppress the "PRESS RECORD & PLAY ON TAPE" prompt?

Post by chysn »

srowe wrote: Wed Aug 11, 2021 12:25 pm I would check with @Mike or someone that understands the VIA at an electronic level better than me.

Under normal situations the line is configured as an input, it has an internal pull-up resistor so that the value is 1 until the switch in the cassette connects it to ground. I don't think there is any harm in configuring it to an output with a level of 0 and then the switch connecting it to ground.
I suppose if Mike comes back and says, "Oh my god don't do that you're going to destroy everyone's VIC-20!" then I might reconsider the approach. :D

From a reliability standpoint, I haven't seen any problems.

But, of course, it's always nice to hear other opinions. At this point, there's no barrier to going back to CHROUT > /dev/null
Post Reply