{"id":3782,"date":"2021-12-07T16:38:46","date_gmt":"2021-12-07T15:38:46","guid":{"rendered":"https:\/\/retrofixer.it\/?p=3782"},"modified":"2023-03-28T08:58:07","modified_gmt":"2023-03-28T06:58:07","slug":"creare-una-cartuccia-c64-da-un-prg","status":"publish","type":"post","link":"https:\/\/retrofixer.it\/en\/creare-una-cartuccia-c64-da-un-prg\/","title":{"rendered":"Create a C64 cartridge from a PRG"},"content":{"rendered":"<div data-elementor-type=\"wp-post\" data-elementor-id=\"3782\" class=\"elementor elementor-3782\" data-elementor-post-type=\"post\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-2820825 elementor-section-stretched elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"2820825\" data-element_type=\"section\" data-e-type=\"section\" data-settings=\"{&quot;stretch_section&quot;:&quot;section-stretched&quot;}\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-7af4eaa\" data-id=\"7af4eaa\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-a956c3f elementor-widget elementor-widget-text-editor\" data-id=\"a956c3f\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>For the Commodore 64 there are many programs that we can use, or we can create new ones, to load them there are different possibilities between cartridges and peripherals, but if we want to create our own cartridge with the program that starts automatically?<\/p><p>I&#039;ll show you a simple system that requires a few steps.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-edc3f56 elementor-widget elementor-widget-heading\" data-id=\"edc3f56\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">What do you need?<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-1341a5f elementor-widget elementor-widget-text-editor\" data-id=\"1341a5f\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>First let&#039;s convert our .PRG file into a .CRT cartridge format<br \/>For this step you need to have Python installed on your computer, find it for both Windows and Mac or Linux.<br \/>Let&#039;s download the called script now <a href=\"https:\/\/frank-buss.de\/c64\/prg2crt\/index.html\" target=\"_NEW\">prg2crt <\/a>downloadable <a href=\"https:\/\/frank-buss.de\/c64\/prg2crt\/index.html\" target=\"_NEW\">here<\/a>.<\/p><p>We run this script from the terminal or Python command line. (let&#039;s assume we convert the myprog.prg program to cartridge.crt image)<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-737ab2b elementor-widget elementor-widget-code-highlight\" data-id=\"737ab2b\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"prismjs-default copy-to-clipboard\">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-javascript line-numbers\">\n\t\t\t\t<code readonly=\"true\" class=\"language-javascript\">\n\t\t\t\t\tpython prg2crt.py myprog.prg cartridge.crt\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-858f595 elementor-widget elementor-widget-text-editor\" data-id=\"858f595\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>We now have a crt file that we can load into an emulator like the Vice and verify that everything is working.<br \/>However, this file cannot be written to an eprom, we must first do another step to remove the header that the cartridge has.<\/p><p>For this step we need the VICE emulator which has a tool called <b>cartconv<\/b>\u00a0which we will need to transform the CRT file into a binary that can be written to the eprom.<br \/>Below is the command to give to cartconv (-i input file) followed by the name of our crt (-o output file) followed by the name of the .BIN file<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-2c5e8d2 elementor-widget elementor-widget-code-highlight\" data-id=\"2c5e8d2\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"prismjs-default copy-to-clipboard\">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-javascript line-numbers\">\n\t\t\t\t<code readonly=\"true\" class=\"language-javascript\">\n\t\t\t\t\tcartconv -i cartridge.crt -o mycart.bin\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-4c3f312 elementor-widget elementor-widget-text-editor\" data-id=\"4c3f312\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Once this is done we have the binary file that can be written to the eprom, we have created a cartridge !!!<\/p><p>Attention! however, we cannot use any cartridge, if the program is within 8k we can use any cartridge such as the <a href=\"https:\/\/github.com\/bwack\/Versa64Cart\">Versacart<\/a>\u00a0but if the program is bigger (I&#039;ve never tried the Versacart up to 16k) in this case we have to use a <a href=\"https:\/\/github.com\/msolajic\/c64-magic-desk-512k\">magic desk<\/a>\u00a0capace di indirizzare tutta la memoria. Questa cartuccia pu\u00f2 gestire 2 fino a eprom da 512k.. non vi bastano? \ud83d\ude42<\/p><p>\u00a0<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<section class=\"elementor-section elementor-inner-section elementor-element elementor-element-175aa00 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"175aa00\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-50 elementor-inner-column elementor-element elementor-element-fec6431\" data-id=\"fec6431\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-605d936 elementor-widget elementor-widget-image\" data-id=\"605d936\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" width=\"144\" height=\"176\" src=\"https:\/\/retrofixer.it\/wp-content\/uploads\/2021\/12\/bront.png\" class=\"attachment-large size-large wp-image-3786\" alt=\"\" srcset=\"https:\/\/retrofixer.it\/wp-content\/uploads\/2021\/12\/bront.png.webp 144w, https:\/\/retrofixer.it\/wp-content\/uploads\/2021\/12\/bront-10x12.png.webp 10w, https:\/\/retrofixer.it\/wp-content\/uploads\/2021\/12\/bront-119x146.png.webp 119w, https:\/\/retrofixer.it\/wp-content\/uploads\/2021\/12\/bront-41x50.png.webp 41w, https:\/\/retrofixer.it\/wp-content\/uploads\/2021\/12\/bront-61x75.png.webp 61w\" sizes=\"(max-width:767px) 144px, 144px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t<div class=\"elementor-column elementor-col-50 elementor-inner-column elementor-element elementor-element-89bb32c\" data-id=\"89bb32c\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-a48de56 elementor-widget elementor-widget-text-editor\" data-id=\"a48de56\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<h4 style=\"font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal;\">I hate using cartconv ...<\/h4><h4 style=\"font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal;\">AHH yes? Then you&#039;ll have to do it by hand!<\/h4>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-inner-section elementor-element elementor-element-e0c91c9 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"e0c91c9\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-50 elementor-inner-column elementor-element elementor-element-17752d7\" data-id=\"17752d7\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-33ebcfa elementor-widget elementor-widget-text-editor\" data-id=\"33ebcfa\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><span style=\"font-family: Nunito, Helvetica, Arial, sans-serif; font-size: 15px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400;\">If you don&#039;t want to use cartconv, you can safely tinker with the crt file by opening it with a hex editor and removing the cartridge header.<\/span><\/p><p><span style=\"font-family: Nunito, Helvetica, Arial, sans-serif; font-size: 15px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400;\">Not only that, every 8k of data there will be a new header, so these lines must also be removed.<br \/>ES: $2000, $4000 .. etc.<\/span><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t<div class=\"elementor-column elementor-col-50 elementor-inner-column elementor-element elementor-element-0c7bb5f\" data-id=\"0c7bb5f\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-fef7cbc elementor-widget elementor-widget-image\" data-id=\"fef7cbc\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"https:\/\/retrofixer.it\/wp-content\/uploads\/2021\/12\/cart1.jpg\" data-elementor-open-lightbox=\"yes\" data-elementor-lightbox-title=\"cart1\" data-e-action-hash=\"#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6Mzc4NCwidXJsIjoiaHR0cHM6XC9cL3JldHJvZml4ZXIuaXRcL3dwLWNvbnRlbnRcL3VwbG9hZHNcLzIwMjFcLzEyXC9jYXJ0MS5qcGcifQ%3D%3D\">\n\t\t\t\t\t\t\t<img fetchpriority=\"high\" decoding=\"async\" width=\"635\" height=\"111\" src=\"https:\/\/retrofixer.it\/wp-content\/uploads\/2021\/12\/cart1.jpg\" class=\"attachment-large size-large wp-image-3784\" alt=\"\" srcset=\"https:\/\/retrofixer.it\/wp-content\/uploads\/2021\/12\/cart1.jpg.webp 635w, https:\/\/retrofixer.it\/wp-content\/uploads\/2021\/12\/cart1-300x52.jpg.webp 300w, https:\/\/retrofixer.it\/wp-content\/uploads\/2021\/12\/cart1-18x3.jpg.webp 18w, https:\/\/retrofixer.it\/wp-content\/uploads\/2021\/12\/cart1-260x45.jpg.webp 260w, https:\/\/retrofixer.it\/wp-content\/uploads\/2021\/12\/cart1-50x9.jpg.webp 50w, https:\/\/retrofixer.it\/wp-content\/uploads\/2021\/12\/cart1-150x26.jpg.webp 150w\" sizes=\"(max-width:767px) 480px, 635px\" \/>\t\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-107eb5a elementor-widget elementor-widget-image\" data-id=\"107eb5a\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"https:\/\/retrofixer.it\/wp-content\/uploads\/2021\/12\/cart2.jpg\" data-elementor-open-lightbox=\"yes\" data-elementor-lightbox-title=\"cart2\" data-e-action-hash=\"#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6Mzc4NSwidXJsIjoiaHR0cHM6XC9cL3JldHJvZml4ZXIuaXRcL3dwLWNvbnRlbnRcL3VwbG9hZHNcLzIwMjFcLzEyXC9jYXJ0Mi5qcGcifQ%3D%3D\">\n\t\t\t\t\t\t\t<img decoding=\"async\" width=\"606\" height=\"16\" src=\"https:\/\/retrofixer.it\/wp-content\/uploads\/2021\/12\/cart2.jpg\" class=\"attachment-large size-large wp-image-3785\" alt=\"\" srcset=\"https:\/\/retrofixer.it\/wp-content\/uploads\/2021\/12\/cart2.jpg.webp 606w, https:\/\/retrofixer.it\/wp-content\/uploads\/2021\/12\/cart2-300x8.jpg.webp 300w, https:\/\/retrofixer.it\/wp-content\/uploads\/2021\/12\/cart2-18x1.jpg.webp 18w, https:\/\/retrofixer.it\/wp-content\/uploads\/2021\/12\/cart2-260x7.jpg.webp 260w, https:\/\/retrofixer.it\/wp-content\/uploads\/2021\/12\/cart2-50x1.jpg.webp 50w, https:\/\/retrofixer.it\/wp-content\/uploads\/2021\/12\/cart2-150x4.jpg.webp 150w\" sizes=\"(max-width:767px) 480px, 606px\" \/>\t\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>","protected":false},"excerpt":{"rendered":"<p>Per il Commodore 64 ci sono tantissimi programmi che possiamo utilizzare, oppure ne possiamo creare di nuovi, per caricarli ci sono diverse possibilit\u00e0 tra cartucce e<span class=\"excerpt-hellip\"> [\u2026]<\/span><\/p>\n","protected":false},"author":1,"featured_media":3791,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[61,6,40,195,145,194,193],"class_list":["post-3782","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-senza-categoria","tag-c128","tag-c64","tag-cartuccia","tag-commodore-128","tag-commodore-64","tag-crt","tag-prog"],"_links":{"self":[{"href":"https:\/\/retrofixer.it\/en\/wp-json\/wp\/v2\/posts\/3782","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/retrofixer.it\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/retrofixer.it\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/retrofixer.it\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/retrofixer.it\/en\/wp-json\/wp\/v2\/comments?post=3782"}],"version-history":[{"count":0,"href":"https:\/\/retrofixer.it\/en\/wp-json\/wp\/v2\/posts\/3782\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/retrofixer.it\/en\/wp-json\/wp\/v2\/media\/3791"}],"wp:attachment":[{"href":"https:\/\/retrofixer.it\/en\/wp-json\/wp\/v2\/media?parent=3782"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/retrofixer.it\/en\/wp-json\/wp\/v2\/categories?post=3782"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/retrofixer.it\/en\/wp-json\/wp\/v2\/tags?post=3782"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}