Jump to content
IGNORED

CIO Burst mode


Recommended Posts

Messing around with burst mode CIO on a iccom 7 GET. The last issue I'm having is that CIO wants to drop the value in A, which it thinks is the byte it just read, into the buffer at the first location. For reasons involving banking, I can't easily get that byte in the current code location, so I'm looking for a way to convince CIO that it doesn't need to do that. Is there a special value of A or Y that tells it to not do that? Other than flagging an error with a BMI Y I mean.

Link to comment
Share on other sites

You just let it drop the byte at the buffer address, but manipulate the buffer address (in the ZP CIOB) so it points to the last byte of your burst buffer. At least this is how I did it in the U1MB XEX loader's FMS.

OK
	adw ZIOCB[0].Address ZIOCB[0].Len
	mwa #1 ZIOCB[0].Len		; this must be 1 so CIO only calls us once
	dew ZIOCB[0].Address		; make sure buffer address points at the last byte read
	ldy #0
	lda (ZIOCB[0].Address),y	; CIO will store this final byte at the buffer address
	ldy #1				; say OK
	rts

Sorry about the structs and whatnot. I've just read a buffer full of data at ZIOCB[0].Address. So I add the buffer length-1 to the address and then set the buffer length to 1. I then grab the last byte in the buffer and leave it in A, which the CIO then stores back in the exact same place.

Link to comment
Share on other sites

duh....yeah. :)

 

Thanks Jon.

 

*edit*

Er wait, no, actually the problem is I don't actually HAVE the last byte, it just thinks it does. The last byte was transferred with a bank copy routine, and I don't have access to it at the moment. Oh well, still a good idea.

 

Ok, second edit -

I can have the ring buffer read pass back the last byte in A or something, but that's kind of a kludge....maybe I can just mess with the ICBALZ and point it at a dummy byte or something.

Edited by danwinslow
Link to comment
Share on other sites

Hah yeah, good point.

I'm going to try the 'ICBAL/HZ' misdirection technique. The byte I point at will have to be in main bank, whilst the code that is running the CIO handler is in an expanded bank. I can probably just point it at the 'unused byte' in the ZIOCB itself, now THAT'S crafty.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...