| |
Krill
Registered: Apr 2002 Posts: 2982 |
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.... |
| |
MagerValp
Registered: Dec 2001 Posts: 1078 |
Very nice, probably my favorite trick so far. |
| |
Krill
Registered: Apr 2002 Posts: 2982 |
Submitted by JackAsser [PM] on 2 December 2020
Indeed awesome and now Krill can remove the encryption code becuase symmetric encryption with keys this small is utterly useless. 😂 better use the space for something else imo. But it was a cool challenge though, kudos for making it hard and still fast. Sure, sure. :) And yeah, i did it for the fun of it. But... if i can somehow make the checksum-CRC stuff work with any key, correct or false, it cannot be used to guide bruteforcing (which i totally expected to happen) this ridiculously small key (real search space <40 bits, apparently). :D Wonder how hard that would be... =) |
| |
Oswald
Registered: Apr 2002 Posts: 5095 |
nice tricks, tho I wonder a bit why did we have to wait 30 years for these :) I guess we were talking about non gcr irq loaders back in the ancient irc times already. probably the issue here is not many can code loaders. |
| |
Krill
Registered: Apr 2002 Posts: 2982 |
Quote:nice trick, tho I wonder a bit why did we have to wait 30 years for this :) I guess we were talking about the 9th sprite back in the ancient irc times already. probably the issue here is not many can code advanced raster routines. |
| |
Oswald
Registered: Apr 2002 Posts: 5095 |
that doesnt stand as many can code advanced raster routines. and next time please dont make it a quote as if I did say that :) |
| |
Krill
Registered: Apr 2002 Posts: 2982 |
Quoting Oswaldthat doesnt stand as many can code advanced raster routines. and next time please dont make it a quote as if I did say that :) I was just mimicking any random quote and didn't put an "Oswald" there on purpose. :)
But my point was that "Why wasn't this invented 30 years ago already?" pretty much goes for any kind of demo novelty on this platform, doesn't it? =) (No matter how hard or how few people are dabbling in a particular sub-field.) |
| |
Oswald
Registered: Apr 2002 Posts: 5095 |
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. |
| |
Krill
Registered: Apr 2002 Posts: 2982 |
Quoting Oswaldok 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 =) |
| |
Count Zero
Registered: Jan 2003 Posts: 1940 |
Codebase is awaiting _at least some_ copy/paste work from here - keep it up :) |
| |
Krill
Registered: Apr 2002 Posts: 2982 |
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. =) |
Previous - 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | ... | 18 - Next |