| |
DubDee
Registered: Sep 2020 Posts: 6 |
Can not open Turbo Macro Pro
Well we still got problem to open this program.
https://style64.org/release/turbo-macro-pro-sep06-style
I try to LOAD"$",8,1
But I got just shredded letters all over the screen on both D64-files.
How do you open up this program on Vice or C64?
Is it working flawless for you?
Thanks
Cheers |
|
... 16 posts hidden. Click here to view all posts.... |
| |
tlr
Registered: Sep 2003 Posts: 1790 |
Quote: that'd be news to me - the general consensus seems to be it cant be done. of course that can be wrong :)
I can only note that it seems to be part of how the DOS is working itself (i.e the formatter). Assuming M-W and M-E is possible on the IEEE controller 6502, it must be possible to run code on the FDC 6504.
I the consensus disagrees, the consensus cannot run code on it, but others could possibly do. :)
I guess this could even be tested to some extent in vice.
EDIT: I was thinking where I might have read the formatting note first, and it's in Inside Commodore DOS, p425. |
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
so test it :) (you can use a .tap file if you want to run the test) |
| |
tlr
Registered: Sep 2003 Posts: 1790 |
Quote: so test it :) (you can use a .tap file if you want to run the test)
I might, but I can't seem to find how the switch to the 6504 context in the monitor. There seems only to be dev 8:
Anyway, there are several examples running code on the 6504 in that book on the pagetable link. Those all run it by writing in to the buffer at $1100 and m-w:ing the job code directly, no m-e. m-e seems to be in the ROM though so I'm positive it works, and was known since forever. Wasn't there disk copy protection on the PET?
This could be different for other PET drives of course, but I doubt it. Makes sense to be able to run code, if only for production test. |
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
VICE does "highlevel" emulate the FDC board i think, only the DOS cpu is TDE |
| |
tlr
Registered: Sep 2003 Posts: 1790 |
Quote: VICE does "highlevel" emulate the FDC board i think, only the DOS cpu is TDE
booo...
Anyway have a look at src/drive/ieee/fdc.c. There's magic code to check if the formatter code has been loaded to RAM upon finding an $E0 (execute) job. |
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
I dont think my interest in this goes that far =D |
| |
Krill
Registered: Apr 2002 Posts: 2980 |
From https://www.pagetable.com/docs/anatomy-4040.html#c9 as well:
$FD20 JOB ROUTINE: execute (mode E:110)
[...]
****************************** START: Test for a valid job
.Y = job queue number
.ACC = job
FC54 A0 0E LDY #$0E ;set for #$0E jobs scan (dec. 14)
FC56 58 CLI ;clear interrupt
FC57 B9 03 04 LDA $0403,Y ;does this queue have a job to do ?
FC5A 10 31 BPL $FC8D ;no,
FC5C C9 D0 CMP #$D0 ;is the job equal to #$D0 (execute ml user
code from data buffer)
FC5E D0 05 BNE $FC65 ;no,
FC60 84 1F STY $1F ;store which job queue is being processed
FC62 4C 20 FD JMP $FD20 ;jump to EXECUTE routine
[...]
FD17 A5 1E LDA $1E ;get current job being done
FD19 C9 60 CMP #$60 ;is job type #$60 (EXECUTE ML CODE WITH MOTOR
ON) ?
FD1B F0 03 BEQ $FD20 ;yes,
FD1D 4C 82 FE JMP $FE82 ;no,
****************************** JOB ROUTINE: mode=110 (E)=execute
(6)=start motor then
jump
FD20 A5 1F LDA $1F ;get current job number
FD22 18 CLC
FD23 69 05 ADC #$05 ;add in buffer index
FD25 85 17 STA $17 ;set HI pointer to USER assigned ML CODE area
FD27 6C 16 00 JMP ($0016) ;jump to user assigned buffer code
[...]
110: execute (E) (6): start motor then
jump
bit 0 drive: 0=#B, 1=#A
FDAA 48 PHA ;preserve job
FDAB 29 70 AND #$70 ;clear bits: 6, 5, 4
FDAD 85 1E STA $1E ;save calculated command code
So seems quite easily possible (and intended by the designers) to run user code on the disk controller 6504. And if weren't so easy, pretty sure some exploit could be found in that old code. =) |
| |
tlr
Registered: Sep 2003 Posts: 1790 |
I note that the 6504 does not have an SO pin, so no BVC *. feels weird... :) |
| |
Count Zero
Registered: Jan 2003 Posts: 1932 |
Great to see a thread like this derail into such a nice discussion which could easily have its own thread *hint* |
| |
Krill
Registered: Apr 2002 Posts: 2980 |
Quoting tlrI note that the 6504 does not have an SO pin, so no BVC *. feels weird... :) Maybe, butFDCB 24 4D BIT $4D ;new interrupt ?
FDCD 10 FC BPL $FDCB ;no,
FDCF A5 41 LDA $41 ;read PORT A: data input
FDD1 91 16 STA ($16),Y ;store into assigned buffer
FDD3 45 08 EOR $08 ;calculate new checksum
FDD5 85 08 STA $08 ;store new checksum result
FDD7 C8 INY ;all bytes read ?
FDD8 D0 F1 BNE $FDCB ;no, getting readily decoded bytes right from the hardware, with IO registers in zeropage, too, feels like quite the luxury. =) |
Previous - 1 | 2 | 3 - Next |