如何在 Commodore c64 上从软盘自动启动程序

发布于 2024-10-06 00:13:25 字数 202 浏览 7 评论 0原文

好消息,在我的阁楼上呆了很多年之后,我的 c64 仍在运行..
但我一直想知道的是:

如何才能自动加载&从已插入的软盘运行程序
当我打开c64时?

一些自动运行的命令,如 load "*",8,1 就足够了......

问候
交通部

Good news, my c64 ist still running after lots of years spending time on my attic..
But what I always wanted to know is:

How can I automatically load & run a program from a floppy disk that is already inserted
when I switch on the c64?

Some auto-running command like load "*",8,1 would be adequate...

Regards
MoC

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

许久 2024-10-13 00:13:25

您编写一个输入的命令,例如 LOAD"*",8,1 就足够了。那么,我是否可以假设该特定命令的唯一问题是它仅加载程序,但不会自动运行程序?如果是这样,您有多种解决方案:

  1. 如果它是机器语言程序,那么您应该键入 LOAD"",8,1: 然后(无需按 >)按+

  2. 如果是 BASIC 程序,请键入 LOAD"",8:,然后(无需按 )按 < SHIFT>+

  3. 可以编写一个 BASIC 程序,使其在使用 LOAD"",8,1 加载时自动运行。为此,首先将以下行添加到程序的开头:

    <前><代码>0 POKE770,131:POKE771,164

    然后发出以下命令来保存程序:

    PRINT"{CLR}":POKE770,113:POKE771,168:POKE43,0;POKE44,3:POKE157,0:SAVE"<文件名>",8
    

You write that a command that you type in, like LOAD"*",8,1 would be adequate. Can I assume, then, that the only problem with that particular command is that it only loads, but doesn't automatically run, the program? If so, you have a number of solutions:

  1. If it's a machine language program, then you should type LOAD"<FILENAME>",8,1: and then (without pressing <RETURN>) press <SHIFT>+<RUN/STOP>.

  2. If it's a BASIC program, type LOAD"<FILENAME>",8: and then (without pressing <RETURN>) press <SHIFT>+<RUN/STOP>.

  3. It is possible to write a BASIC program such that it automatically runs when you load it with LOAD"<FILENAME>",8,1. To do so, first add the following line to the beginning of your program:

    0 POKE770,131:POKE771,164
    

    Then issue the following commands to save the program:

    PRINT"{CLR}":POKE770,113:POKE771,168:POKE43,0;POKE44,3:POKE157,0:SAVE"<FILENAME>",8
    
暗恋未遂 2024-10-13 00:13:25

如果没有一些定制墨盒,这是不可能的。

解决这个问题的一种方法是获取 Retro Replay 卡带并破解您自己的代码。

This is not possible without some custom cartridge.

One way to fix this would be getting the Retro Replay cartridge and hacking your own code for it.

晌融 2024-10-13 00:13:25

我怀疑是否有办法做到这一点;您需要一个可以处理这种情况的墨盒,但我认为不存在这样的墨盒。

I doubt there is a way to do it; you would need a cartridge which handles this case and I don't think one like that exists.

挽梦忆笙歌 2024-10-13 00:13:25

其实更好更合适的解决方案是EasyFlashRetro Replay 通常与自己的 ROM 一起使用。由于它是一个非常有用的默认 ROM 盒,我永远不会向它刷新另一个 ROM。如果您没有这些墨盒,它也比 EasyFlash 更贵。

目前,我已将 Prince Of Persia (!) ROM 写入我的 EasyFlash,当我打开我的 c64 时,它会按照您的要求自动运行。

A better and more suitable solution is EasyFlash actually. Retro Replay is commonly used with its own ROM. Since it is a very useful cartridge by default ROM, I would never flash another ROM to it. Also it is more expensive than EasyFlash if you don't have any of those cartridges.

At the moment, I have Prince Of Persia (!) ROM written to my EasyFlash and when I open my c64, it autoruns just like you asked for.

无妨# 2024-10-13 00:13:25

不是 100% 相关,但 C128 可以在 C128 模式下自动引导磁盘。例如,Ultima V(在 C128 上有音乐,但在 C64 上或 C64 模式下的 C128 上没有音乐)自动引导。

至于卡带,我推荐 1541 Ultimate 2。它还可以从模块 rom 映像运行游戏(尽管波斯王子由于某种原因不适合我,也许是软件问题?),但你也可以获得相当好的软盘模拟器(这也使得将内容传输到真实磁盘变得更容易)、REU、磁带接口(如果您订购)等。

Not 100% relevant, but C128 can autoboot disks in C128 mode. For example Ultima V (which has musics on C128 but not on C64 or C128 in C64 mode) autoboots.

As for cartridges, I'd recommend 1541 Ultimate 2. It can also run games from module rom images (although Prince of Persia doesn't work for me for some reason, perhaps software issue?), but you also get rather good floppy emulator (which also makes it easier to transfer stuff to real disks), REU, tape interface (if you order it) etc.

゛时过境迁 2024-10-13 00:13:25

如果您正在使用 ML 程序,有多种方法。如果您不担心在没有 RESET 的情况下返回到正常的 READY 提示,您可以使用一个小型加载程序来加载到堆栈中($0100-$01FF)。加载程序只会加载下一段代码,然后跳转到它。它的起价为 0102 美元,并且需要尽可能小。很多时候,下一个要加载的片段只有 2 个字符,因此文件名可以放在 $0100 & 处。 $0101。然后你需要做的就是设置 LFS、SETNAM、LOAD,然后 JMP 即可。用 $01 填充堆栈区域的其余部分。仅保存 $0100-$010d 也是相当安全的,这样整个程序就可以放在单个磁盘块上。

这样做的一个问题是,它会清除过去的堆栈条目(因此,您的程序需要将堆栈指针重置回顶部。)如果您的程序尝试自行执行正常的 RTS,则可能会发生随机情况。如果你想退出程序,你需要跳转到重置向量(默认为$FFFC)来执行此操作。

If you are working with a ML program, there are several methods. If you aren't worried about ever returning to normal READY prompt without a RESET, you can have a small loader that loads into the stack ($0100-$01FF) The loader would just load the next section of code, then jump to it. It would start at $0102 and needs to be as small as possible. Many times, the next piece to load is only 2 characters, so the file name can be placed at $0100 & $0101. Then all you need to do is set LFS, SETNAM, LOAD, then JMP to it. Fill the rest of the stack area with $01. It is also rather safe to only save $0100-$010d so that the entire program will fit on a single disk block.

One issue with this, is that it clears out past stack entries (so, your program will need to reset the stack pointer back to the top.) If your program tries to do a normal RTS out of itself, random things can occur. If you want to exit the program, you'll need to jmp to the reset vector ($FFFC by default,) to do so.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文