Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > Can not open Turbo Macro Pro
2021-11-13 06:18
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....
 
2021-11-15 15:40
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.
2021-11-15 16:06
chatGPZ

Registered: Dec 2001
Posts: 11386
so test it :) (you can use a .tap file if you want to run the test)
2021-11-15 16:11
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.
2021-11-15 16:28
chatGPZ

Registered: Dec 2001
Posts: 11386
VICE does "highlevel" emulate the FDC board i think, only the DOS cpu is TDE
2021-11-15 16:41
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.
2021-11-15 17:19
chatGPZ

Registered: Dec 2001
Posts: 11386
I dont think my interest in this goes that far =D
2021-11-15 17:20
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. =)
2021-11-15 21:08
tlr

Registered: Sep 2003
Posts: 1790
I note that the 6504 does not have an SO pin, so no BVC *. feels weird... :)
2021-11-15 22:03
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*
2021-11-16 01:15
Krill

Registered: Apr 2002
Posts: 2980
Quoting tlr
I note that the 6504 does not have an SO pin, so no BVC *. feels weird... :)
Maybe, but
FDCB  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
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
Flashback
wil
LightSide
St0rmfr0nt/Quantum
Paladin/G★P
RetroGL
Nith/TRIɅD
CreaMD/React
Guests online: 77
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 Edge of Disgrace  (9.6)
6 What Is The Matrix 2  (9.6)
7 The Demo Coder  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 Layers  (9.6)
2 No Listen  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 Rainbow Connection  (9.5)
7 Dawnfall V1.1  (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 Triad  (9.3)
5 Censor Design  (9.3)
Top Organizers
1 Burglar  (9.9)
2 Sixx  (9.8)
3 hedning  (9.7)
4 Irata  (9.7)
5 Tim  (9.7)

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