Welcome to our latest new user
eightbitswide
! (Registered 2024-12-24)
You are not logged in -
nap
CSDb User Forums
Forums
>
C64 Coding
>
Job codes - again
2003-10-14
20:53
Cybernator
Registered: Jun 2002
Posts: 154
Job codes - again
I'm having some strange problems:
1. Execute ($E0) doesn't seem to be positioning the head as mentioned in some docs.
2. Seek ($B0) works the first time I call it, but later it returns an error: "SYNC not found".
Upon closer investigation, I realized that the head is not in read-mode. Seek is supposed to activate the motor, and the head on its own. I've tried disabling ATN IRQ, just in case it causes some trouble. But nope... Does anyone have any clue of what could be wrong? Any tips?
... 10 posts hidden. Click
here
to view all posts....
2003-10-19
00:11
6R6
Registered: Feb 2002
Posts: 245
Just one other thing..
V-max uses memory $0100-$0800 for the drive routine.
Krills atn loaders uses about the same amount of memory.
But you cant do job codes when using memory $0200-$0300
afik.
2003-10-19
09:03
Cybernator
Registered: Jun 2002
Posts: 154
Hi GRG!
So you are not just an awesome musician. ;)
> jmp $f418 ;Exit to disk controller, all ok
I need to return to my code, not the FDC. JMP $f505 works fine.
> lda #3 ;Use buffer 0 ($0300-$0400)
> sta $31
Is this for the $f50a routine?
My code is at buffer 0, and I don't write anything to $31. It works a-ok. :)
I've been thinking about the side-detector. If I use the 2 ID chars, it may lead to problems, right? Because the IDs are in the header, and this is only touched when formatting. Nibblers won't copy this! I'm using the BAM (track 18, sector 0). Before the disk has been turned, I xor 321 GCR bytes of the BAM. After it has been turned, I do the same, and I check the values. If they are the same, the disk is obviously not turned. (*)
This doesn't give the possibility to be sure if it's the correct disk. I mean, I can insert another disk, and it'll have different BAM. Can't think of a better method, though. A possibility is to read a specific file or something...
When disabling the motor, the FDC makes a little delay before the motor is really turned off. Is there any way to avoid this? I'm doing it directly using $1C00, disabling IRQ first, and I activate it on my own before I enable IRQ and call execute. So the DOS thinks that the motor is always turned on.
--
(*) In fact, it's slightly different. At first, I xor starting from 0. Then I keep this value, and when the disk has been turned (which is detected by the write-protect sensor), I xor the bytes starting from this value. If it's the same disk/side, the result will be 0.
Btw, I use the write-protect sensor because I don't want the motor to be turned on while I'm taking the disk in/out. :)
2003-10-19
14:57
raven
Account closed
Registered: Jan 2002
Posts: 137
why go through so much trouble just to detect disk-side?
You can simply use the disk-ID at track 18 sector 0 for that,
or any other mark you leave in a certain sector.
Then, simply read that sector & check for your ID :)
2003-10-19
18:07
6R6
Registered: Feb 2002
Posts: 245
Hi Cybernator,
Yes I know assembly :)
<1>
F418 and F505 does the same thing, putting a 1 into the
command code. (and some stack and disk controller things)
lda #$e0
sta $00 ;command code for buffer 0 (0300)
cli ;(**)
lda $00
bmi *-2
(**) try with SEI and it will crash.
<2>
The F50A routine needs you to point out what buffer to
use. lda #3, sta $31... points to buffer 0 again ($0300).
<3>
Raven's method sounds easy enough.. :)
2003-10-22
10:32
Cybernator
Registered: Jun 2002
Posts: 154
I was against using the ID at track 18, sector 0 since the beginning. This is used for decoration. :) The other thing is, while my head is used as wallbreaker (because of some nasty effect :)), I can't bother with marks on my workdisks.
Or if someone else uses the loader (yeah right :)) he'd have to check what data I use, and if that doesn't fit his needs, he'd have to make additional changes. What I like about the method above is that it'll always be able to see if I've changed the disk. Something in the BAM will probably be different. And if not, there's some empty space, so one could write something there to make it different than the other side.
Previous
-
1
| 2 - Next
Refresh
Subscribe to this thread:
You need to be logged in to post in the forum.
Search the forum:
Search
All forums
C64 Coding
C64 Composing
C64 Pixeling
C64 Productions
CSDb Bug Reports
CSDb Development
CSDb Discussions
CSDb Entries
CSDb Feedback
CSDb Info
CSDb moderators
CSDb Questions
Messages to moderators
Requests
for
in
Writer & text
Text
Writer
All times are CET.
Search CSDb
All
Releases
Groups
Sceners
Events
BBS
SIDs
-------
Forum
Comments
Advanced
Users Online
MaD ][/Starship
iAN CooG/HVSC
psych
Hydrogen/Glance
anonym/padua
REBEL 1/HF
Slajerek/Samar
Mojzesh/TGR🇬🇧
Mason/Unicess
Alakran_64
rexbeng
pcollins/Quantum
jmagic
Guests online: 98
Top Demos
1
Next Level
(9.7)
2
13:37
(9.7)
3
Mojo
(9.7)
4
Coma Light 13
(9.6)
5
The Demo Coder
(9.6)
6
Edge of Disgrace
(9.6)
7
What Is The Matrix 2
(9.6)
8
Uncensored
(9.6)
9
Comaland 100%
(9.6)
10
Wonderland XIV
(9.6)
Top onefile Demos
1
Layers
(9.6)
2
Cubic Dream
(9.6)
3
Party Elk 2
(9.6)
4
Copper Booze
(9.6)
5
X-Mas Demo 2024
(9.5)
6
Dawnfall V1.1
(9.5)
7
Rainbow Connection
(9.5)
8
Onscreen 5k
(9.5)
9
Morph
(9.5)
10
Libertongo
(9.5)
Top Groups
1
Performers
(9.3)
2
Booze Design
(9.3)
3
Oxyron
(9.3)
4
Censor Design
(9.3)
5
Triad
(9.3)
Top Logo Graphicians
1
t0m3000
(10)
2
Sander
(9.8)
3
Mermaid
(9.5)
4
Facet
(9.4)
5
Shine
(9.4)
Home
-
Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.033 sec.