Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user maak ! (Registered 2024-04-18) You are not logged in - nap
CSDb User Forums


Forums > CSDb Entries > Release id #197710 : Transwarp v0.64
2020-11-22 17:12
Krill

Registered: Apr 2002
Posts: 2825
Release id #197710 : Transwarp v0.64

General Q&A thread, also report problems and error logs here.
 
... 162 posts hidden. Click here to view all posts....
 
2020-12-04 16:29
Oswald

Registered: Apr 2002
Posts: 5017
ok maybe 30 was harsh, tried to understand what you did, could you explain what is ATNA used for normally ? the descriptions (i found) doesnt mean anything to me.
2020-12-04 19:28
Krill

Registered: Apr 2002
Posts: 2825
Quoting Oswald
ok maybe 30 was harsh, tried to understand what you did, could you explain what is ATNA used for normally ? the descriptions (i found) doesnt mean anything to me.
ATNA means "Attention Acknowledgement" and controls the hardware's response to incoming ATN ("Attention") signals.

The ATN line is what a bus master (the C-64) asserts when sending commands to bus devices. Any device on the bus would react to an incoming ATN signal by asserting the DATA line. The 1541 cannot control the ATN line, but only react to it.

Now, ATNA controls the ATN acknowledgement polarity.

If ATNA matches ATN (both are 0 or both are 1), nothing happens, and the DATA line is not asserted (but is left to unasserted if no device on the bus is "pulling" it, otherwise it's asserted anyways).

If ATNA does not match ATN, the DATA line is automatically asserted by hardware, signalling to the bus master that at least one device on the bus is responsive (if DATA wasn't asserted before, anyways).

This is also what disturbs ATN-clocked IRQ loader bitpair-transfer protocols (payload on DATA and CLK lines) with more than one device on the bus if no ATN responder code (make ATNA match the incoming ATN signal as quickly as possible in a tight loop) is executing on the passive devices. The DATA line then would be asserted when it's not supposed to be.

HTH =)
2020-12-04 20:32
Count Zero

Registered: Jan 2003
Posts: 1820
Codebase is awaiting _at least some_ copy/paste work from here - keep it up :)
2020-12-06 22:31
Krill

Registered: Apr 2002
Posts: 2825
Here's another trick, and it's not only useful for drive coding.
It's an old trick, however. Thanks to Sparta for reminding me of it. =)

Transwarp uses a table to map the sectors on a track to block indices.
With its interleave of 1, this looks quite boring on ordinary file tracks:
sectortoindex .byte 0, 1, 2, 3, 4, 5, 6, 7, ..., 20
However, the last track of a file usually has fewer unique blocks than sectors.
It is filled up with redundant blocks in order to load as fast as possible, no matter which sector happens to roll by first after track step.

Consider the last file track having 5 unique blocks. Then the mapping would look like this:
sectortoindex .byte 0, 1, 2, 3, 4, 0, 1, 2, ..., 0
Now here's the trick to generate the second mapping from the first, with the number of unique blocks as a parameter:
  ldx #0
  ldy num_unique_blocks
- lda sectortoindex,x
  sta sectortoindex,y
  inx
  iny
  cpy #21
  bne -
This works quite elegantly without having to reset a run variable whenever the threshold of num_unique_blocks is reached.
With some self-modification, it can obviously be optimised to something like
- lda ZP0,x
  sta ZP1,x
  inx
  bne -
taking just 13 cycles per loop (and fewer when unrolling, too).

That this works is also the reason why both memcpy and memmove calls exist in C-family runtime families. =)
2020-12-06 22:58
Oswald

Registered: Apr 2002
Posts: 5017
I dont get it you start writing the second table from "num_unique_block" and nothing makes X to go back to 0 after counting to 4 with it ?
2020-12-06 23:03
chatGPZ

Registered: Dec 2001
Posts: 11100
the "trick" is to copy one array into itself after the first N copies, there is a second copy at 0+N, which you can then copy again. no need to reset the variable :) just write down what the array contains after each step, you'll see it then :)
2020-12-06 23:10
Oswald

Registered: Apr 2002
Posts: 5017
ah I thought its a typo not having different labels, as the table is presented twice in the text. cool trick :)
2020-12-06 23:38
JackAsser

Registered: Jun 2002
Posts: 1987
Needs a scratch buffer of 20 bytes after the table right, to avoid memory corruption?
2020-12-06 23:43
chatGPZ

Registered: Dec 2001
Posts: 11100
excess len is num_unique_blocks
2020-12-06 23:43
Krill

Registered: Apr 2002
Posts: 2825
Quoting JackAsser
Needs a scratch buffer of 20 bytes after the table right, to avoid memory corruption?
No, it stops right at the end of the table, cpy #21. =)
Previous - 1 | ... | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | ... | 18 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Arcane/Glance
Didi/Laxity
Oswald/Resource
Guests online: 142
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 Wonderland XIV  (9.6)
9 The Ghost  (9.6)
10 Bromance  (9.6)
Top onefile Demos
1 It's More Fun to Com..  (9.8)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 Rainbow Connection  (9.5)
6 Wafer Demo  (9.5)
7 TRSAC, Gabber & Pebe..  (9.5)
8 Onscreen 5k  (9.5)
9 Dawnfall V1.1  (9.5)
10 Quadrants  (9.5)
Top Groups
1 Oxyron  (9.3)
2 Nostalgia  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Diskmag Editors
1 Jazzcat  (9.4)
2 Magic  (9.4)
3 hedning  (9.2)
4 Newscopy  (9.1)
5 Elwix  (9.1)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.242 sec.