From 7b570422ff7090dd758b1590211689f11e0213db Mon Sep 17 00:00:00 2001 From: Wojciech Mostowski Date: Wed, 25 Feb 2026 06:21:35 +0100 Subject: [PATCH] Atari800: move ASM files from here to the core repo (#1104) --- support/atari8bit/asm/Makefile | 15 -- support/atari8bit/asm/boot3.rom | Bin 8192 -> 0 bytes support/atari8bit/asm/hsio_pbi.xex | Bin 894 -> 0 bytes support/atari8bit/asm/pbi_bios.asm | 206 -------------------- support/atari8bit/asm/process_xex_loader.py | 40 ---- support/atari8bit/asm/xex_loader.asm | 16 -- support/atari8bit/xex_loader.h | 6 + 7 files changed, 6 insertions(+), 277 deletions(-) delete mode 100644 support/atari8bit/asm/Makefile delete mode 100644 support/atari8bit/asm/boot3.rom delete mode 100644 support/atari8bit/asm/hsio_pbi.xex delete mode 100644 support/atari8bit/asm/pbi_bios.asm delete mode 100644 support/atari8bit/asm/process_xex_loader.py delete mode 100644 support/atari8bit/asm/xex_loader.asm diff --git a/support/atari8bit/asm/Makefile b/support/atari8bit/asm/Makefile deleted file mode 100644 index 93fb6e9..0000000 --- a/support/atari8bit/asm/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -# This produces the supporting binary data for the Atari800 core, -# the internal XEX loader and the PBI rom file boot3.rom. The -# latter should be placed in games/ATARI800 folder of your MiSTer -# SD card. - -all: ../xex_loader.h boot3.rom - -../xex_loader.h: xex_loader.asm - xa xex_loader.asm -o xex_loader.o65 -l xex_loader.lab - python3 process_xex_loader.py - rm xex_loader.o65 xex_loader.lab - mv xex_loader.h .. - -boot3.rom: pbi_bios.asm - xa -M -o boot3.rom pbi_bios.asm \ No newline at end of file diff --git a/support/atari8bit/asm/boot3.rom b/support/atari8bit/asm/boot3.rom deleted file mode 100644 index 09857d39f91721e8700a10453ae481fcc2d7eea8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8192 zcmeH|e`p(39Khebmt;x0rME7)tp4FOjoL`JUD{OAv|~-?Yz7$?JJCP<Z|q73qGTWx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JSy^&K6Ezu?NvN3@&Z0WQ?4{^ zYAHH-DCAM@|Y^~Lva@jWl}|BLU#vDVrmU=gqgSOhEr76FTZMZh9p g5wHkY1S|p;0gHe|z#?D~un1TLECLpR|2cs_0o!S`q5uE@ diff --git a/support/atari8bit/asm/hsio_pbi.xex b/support/atari8bit/asm/hsio_pbi.xex deleted file mode 100644 index 6745a4b34236085c101f572dddd53df79745bae1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 894 zcmYjNO=ufO6yBYY6lp``O>BtLUZ%DSPElYb%R!bEBBc~m*n>$9?Qweu$c8|mhX!(p z37*ipURBL0DFoCdDtabsY$$~U3O>|An@dL99C}!sNyU(=wmP;M)3_XJ4u~0 zP-zfqQwpjRH}3=vE|QPk-9Bo_%&9kUpHjz7y$!ATqRy*kIyhO8eWIueQ-C;WK7FNl z0aSh}<0|x=O6T_M5@9@aM@h{cBem97&VXGFmq$rsjI@VqcN!Ur^t|M1)GiZuKebN~ z7bVP)UrM^>o*=0Otcc^=Rr%3&MQYoc_{6KpAu*1?4Do)JG0zc)VS<;$L2p(jz0+9v zLOe+^gxe*r(j*vE%!h(a|HRk~K4m9-DDgZHKB@5nqDkLrHR67|Dw7S>Z&2UqH1_#y zIvg+QaY*1ab3$}6UYd=A9+9cM=*B3|yK%}V-6Z7&H%0lBOR1i~xv2fuFiYtyWg`Q2 zF}!KW54uH3&Cj>G({gB|DPxgjNb{okEU5EbeWl*{Uoe}wHL`OE<(_KmcG|yb2(`CN z>6g|D=-IR{{)4Ajh9-WN>;r!0Y;I2BIjg1g#48xHhkRRmi>~K+4jX#n;Ch~Y81_VJ zXR_&y8ES!iTo zi5sgK`jdHY3!2=p;1W{4F&$Mgy4J#?ValzRvY5*NLzQ|U{#`xb!yrl^5`fhqUtg2! zOKTthn17c=PsAdpXwpNIo6-KwoQ%T{=9AFc84+Y>xH}_a-Lg#7JD7gOd=$P0S-gqR diff --git a/support/atari8bit/asm/pbi_bios.asm b/support/atari8bit/asm/pbi_bios.asm deleted file mode 100644 index d4d2c85..0000000 --- a/support/atari8bit/asm/pbi_bios.asm +++ /dev/null @@ -1,206 +0,0 @@ -; Links: -; http://atariki.krap.pl/index.php/ROM_PBI - -#define VER_MAJOR 0 -#define VER_MINOR 9 - -warmst = $008 -pdvmsk = $247 -pdvrs = $248 -ddevic = $300 -dunit = $301 -dstats = $303 -dtimlo = $306 -cdtma1 = $226 -setvbv = $e45c - -; PBI BIOS RAM -pbi_magic = $d100 ; word -pbi_splash_flag = $d102 -pbi_req_init_flag = $d103 -pbi_req_proc_res = $d104 -pbi_req_proc_flag = $d105 -pbi_stack_save = $d106 -pbi_drive_boot_act = $d10a -pbi_drive_boot = $d10b -pbi_drive_conf = $d10c -; HSIO RAM variables sit upwards of $d1f0 incl. - - * = $D800 -bios1_start - .byte 'M', 'S', 'T' - ; Magic 1 - .byte $80 - .byte $31 ; ddevic we are servicing -pdior_vec - jmp pdior -pdint_vec - rts : nop : nop - ; Magic 2 - .byte $91 - .byte $00 ; no CIO - .word pdint_vec - .word pdint_vec - .word pdint_vec - .word pdint_vec - .word pdint_vec - .word pdint_vec - -pdinit - lda pdvmsk : ora pdvrs : sta pdvmsk - lda #0 : ldx #$fe : sta $d100-1,x : dex : bne *-4 - ; Marker for the core firmware - lda #$a5 : sta pbi_magic : sta pbi_magic+1 - ; ask for init - inc pbi_req_init_flag : lda pbi_req_init_flag : bne *-3 - lda warmst : bmi pdinit_1 - lda pbi_drive_boot_act : beq pdinit_1 - sta dunit -pdinit_1 - ; Do we want the splash? - lda pbi_splash_flag : beq pdinit_ret - jsr boot_screen_init - lda #$0c : sta $2c5 ; color 1 - lda #$e0 : sta $d409 ; chbase - lda #display_list : sta $d403 ; display list - lda $14 : cmp $14 : beq *-2 : ldy #$22 : sty $d400 ; dmactl - clc : adc #100 : cmp $14 : bne *-2 - lda #0 : sta $d400 -pdinit_ret - rts - -display_list - .byte $70, $70, $70 - .byte $42 : .word display_text1 - .byte $10 - .byte $42 : .word display_text2 - .byte $70 - .byte $42 : .word display_text3 - .byte $30 - .byte $02 - .byte $41 : .word display_list - -display_text1 - .byte 0,0 - .byte 'A'-$20,'tari','8'-$20,'0'-$20,'0'-$20,0,'M'-$20,'i','S'-$20,'T'-$20,'er',0,'core',0 - .byte 'P'-$20,'B'-$20,'I'-$20,0,'B'-$20,'I'-$20,'O'-$20,'S'-$20,0 - .byte 'v',VER_MAJOR+$10,'.'-$20,VER_MINOR+$10 -display_text1_len = *-display_text1 - .dsb 40-display_text1_len,0 -display_text2 - .byte 0,0 - .byte '('-$20,'C'-$20,')'-$20,0,'2'-$20,'0'-$20,'2'-$20,'6'-$20,0,'woj','@'-$20,'A'-$20,'tari','A'-$20,'ge' -display_text2_len = *-display_text2 - .dsb 40-display_text2_len,0 -display_text3 = $d110 - -drive_labels_1 .byte 'O'-$20, 'P'-$20, 'H'-$20 -drive_labels_2 .byte 'f', 'B'-$20, 'S'-$20 -drive_labels_3 .byte 'f', 'I'-$20, 'I'-$20 -drive_labels_4 .byte 0, 0, 'O'-$20 - -boot_label_1 .byte 'B'-$20,'o','o','t',0,'D'-$20,'r','i','v','e',':'-$20 -boot_label_1_len = *-boot_label_1 -boot_label_2 .byte 'D'-$20,'e','f','a','u','l','t' -boot_label_2_len = *-boot_label_2 -boot_label_3 .byte 'A'-$20,'P'-$20,'T'-$20 -boot_label_3_len = *-boot_label_3 - -boot_screen_init - ldy #1 -boot_screen_init_loop - lda #'D'-$20 : sta display_text3+2,x : inx - tya : pha : ora #$10 : sta display_text3+2,x : inx - lda #':'-$20 : sta display_text3+2,x : inx : inx - lda pbi_drive_conf-1,y : tay - lda drive_labels_1,y : sta display_text3+2,x : inx - lda drive_labels_2,y : sta display_text3+2,x : inx - lda drive_labels_3,y : sta display_text3+2,x : inx - lda drive_labels_4,y : sta display_text3+2,x : inx : inx - pla : tay : iny : cpy #5 : bne boot_screen_init_loop - ldy #boot_label_1_len -boot_screen_init_loop_2 - lda boot_label_1-1,y : sta display_text3+41,y - dey : bne boot_screen_init_loop_2 - ldx pbi_drive_boot : dex - bmi boot_drv_def - beq boot_drv_apt - lda #'D'-$20 : sta display_text3+42+boot_label_1_len+1 - txa : ora #$10 : sta display_text3+42+boot_label_1_len+2 - lda #':'-$20 : sta display_text3+42+boot_label_1_len+3 - bne boot_screen_init_ret -boot_drv_def - ldy #boot_label_2_len -boot_drv_def_loop - lda boot_label_2-1,y : sta display_text3+42+boot_label_1_len,y - dey : bne boot_drv_def_loop - beq boot_screen_init_ret -boot_drv_apt - ldy #boot_label_3_len -boot_drv_apt_loop - lda boot_label_3-1,y : sta display_text3+42+boot_label_1_len,y - dey : bne boot_drv_apt_loop -boot_screen_init_ret - rts - -; The main block I/O routine -pdior - lda ddevic : and #$7F : cmp #$31 : beq pdior_2 - cmp #$20 : bne pdior_bail -pdior_2 - lda dunit : beq pdior_bail - cmp #$10 : bcs pdior_bail - tsx : stx pbi_stack_save - lda dtimlo : ror : ror : tay : and #$3f : tax : tya : ror : and #$c0 : tay : lda #1 - jsr setvbv - lda #pbi_time_out : sta cdtma1+1 - inc pbi_req_proc_flag : lda pbi_req_proc_flag : bne *-3 - ldx #0 : ldy #0 : lda #1 : jsr setvbv - lda pbi_req_proc_res : bmi pdior_bail ; the FW says either no PBI service or ATX (plain SIO) - beq pdior_pbi_ok ; the drive was in PBI mode and got serviced - ; otherwise call HSIO - jsr $dc00 : sec : rts -pdior_pbi_ok - ldy dstats : sec : rts -pdior_bail - ; We are not servicing this block I/O request - clc : rts -pbi_time_out - lda #0 : sta pbi_req_proc_flag : ldx pbi_stack_save : txs - lda #$8a : sta dstats : bne pdior_pbi_ok -bios1_end - -.dsb ($400-bios1_end+bios1_start),$ff - -hsio_start ; This should be $dc00 -.bin 6,0,"hsio_pbi.xex" -hsio_end - -.dsb ($3AD-hsio_end+hsio_start),$ff - -.byte VER_MAJOR*16+VER_MINOR ; Version byte - -.byte (device_name_end-device_name-1) -device_name -.byte "SDHC MiSTer SDEMU v.",VER_MAJOR+$30,'.',VER_MINOR+$30,$9B -device_name_end - -.dsb (40-device_name_end+device_name),$ff - -; .dsb ($3D7-hsio_end+hsio_start),$ff - -.byte (bios_name_end-bios_name-1) -bios_name -.byte "MiSTer core PBI BIOS v.",VER_MAJOR+$30,'.',VER_MINOR+$30,$9B -bios_name_end - -.dsb (40-bios_name_end+bios_name),$ff - - * = $D800 -.dsb $800,$FF - - * = $D800 -.dsb $800,$FF - - * = $D800 -.dsb $800,$FF \ No newline at end of file diff --git a/support/atari8bit/asm/process_xex_loader.py b/support/atari8bit/asm/process_xex_loader.py deleted file mode 100644 index 26fea3d..0000000 --- a/support/atari8bit/asm/process_xex_loader.py +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/python3 - -f = open("xex_loader.o65", "rb") -loader = f.read() -f.close() - -s = "const static uint8_t xex_loader[] =\n{\n\t" - -i = 0 -for b in loader: - s += f"0x{b:02X}," - i += 1 - if i == len(loader): - s = s[:-1] - if i % 16 == 0: - s += "\n\t" - -if i % 16 != 0: - s += "\n" -else: - s = s[:-1] - -s += "};\n\n" - -f = open("xex_loader.lab", "rt") -l = f.read().split("\n") -f.close() - -for ll in l: - if ll[:11] == "read_status": - read_status = ll[17:19] - elif ll[:5] == "init1": - init1 = ll[11:13] - -s += f"#define XEX_READ_STATUS 0x{read_status}\n" -s += f"#define XEX_INIT1 0x{init1}\n\n" - -f = open("xex_loader.h", "wt") -f.write(s) -f.close() diff --git a/support/atari8bit/asm/xex_loader.asm b/support/atari8bit/asm/xex_loader.asm deleted file mode 100644 index cec69ca..0000000 --- a/support/atari8bit/asm/xex_loader.asm +++ /dev/null @@ -1,16 +0,0 @@ - * = $D100 -magic - .byte $61 -init1 - ldx #0 : stx $09 : dex : txs - dec magic -load_next_block - dec read_status - lda #1 : read_status = *-1 : beq *-2 - bmi init_go - lda #>(load_next_block-1) : pha - lda #<(load_next_block-1) : pha - jmp ($2e2) -init_go - dec magic - jmp ($2e0) diff --git a/support/atari8bit/xex_loader.h b/support/atari8bit/xex_loader.h index 8a2f9de..e12522d 100644 --- a/support/atari8bit/xex_loader.h +++ b/support/atari8bit/xex_loader.h @@ -1,3 +1,9 @@ +/** This file was generated from sources in the Atari800 core repository: + + https://github.com/MiSTer-devel/Atari800_MiSTer/tree/master/asm + + and any updates there should trigger regeneration and update of this file here. */ + const static uint8_t xex_loader[] = { 0x61,0xA2,0x00,0x86,0x09,0xCA,0x9A,0xCE,0x00,0xD1,0xCE,0x0E,0xD1,0xA9,0x01,0xF0,