Changes for page API контроллеров AZ®
Last modified by Max on 2025/03/02 15:18
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -915,29 +915,29 @@ 915 915 Example program: 916 916 917 917 {{code language="assembler"}} 918 -; работасчасами919 -; trap 60 - чтениеданныхчасовизTCP/IPстека920 -; R3 - адресбуферакуданадосчитать921 -; результатвR3адрес,еслиуспешно. R3=0если ошибка918 +; working with clock 919 +; trap 60 - reading clock data from TCP/IP stack 920 +; R3 - buffer address where to read 921 +; result in R3 address if successful. R3=0 if error 922 922 GetDateFromLAN: push R0 923 923 push R1 924 924 push R2 925 - call AZreset; сбросим925 + call AZreset; reset 926 926 tst R1 927 927 bne G60ERR 928 928 MOV #AZ$CSR,R1 929 929 mov #42,(R1) 930 -G60: TSTB (R1); проверяемрезультатвыполнения931 - BPL G60; ждем930 +G60: TSTB (R1); check execution result 931 + BPL G60; wait 932 932 mov #32,(R1) 933 -1$: TSTB (R1); проверяемрезультатвыполнения934 - BPL 1$; ждем935 - TST (R1)+; инкрементируем936 - mov R3,R0; запомнимR3- адрес933 +1$: TSTB (R1); check execution result 934 + BPL 1$; wait 935 + TST (R1)+; increment 936 + mov R3,R0; remember R3 address 937 937 mov #10.,R2; читаем 10 слов 938 -2$: mov (R1),(R3)+; читаемблоксловвпамять938 +2$: mov (R1),(R3)+; read block of words into memory 939 939 sob R2,2$ 940 - mov R0,R3; успешно,вернемадресвR3940 + mov R0,R3; successful, return address to R3 941 941 br 0END$ 942 942 G60ERR: CLR R3 943 943 0END$: pop R2 ... ... @@ -946,52 +946,50 @@ 946 946 return 947 947 {{/code}} 948 948 949 - всекомандыустанавливаютбитготовностипозавершению.949 +All commands set the ready bit upon completion. 950 950 951 951 952 -= ** Команды специфические для[[AZБК®>>doc:Контроллеры AZБК® для компьютеров БК-0010 БК-0010\.01 БК-0011М.WebHome]]** =952 += **[[AZБК®>>doc:Контроллеры AZБК® для компьютеров БК-0010 БК-0010\.01 БК-0011М.WebHome]] **specific commands = 953 953 954 - ДанныекомандыпредназначеныдляработыконтроллераAZБК®,разработанногодлясериикомпьютеровБК-БК-0010/БК-0010.01/БК-0011М.954 +These commands are intended for operation of the AZБК® controller, developed for the BK series of computers - BK-0010/BK-0010.01/BK-0011M. 955 955 956 - ДругиеконтроллерыAZ®игнорируютэтикоманды956 +Other AZ® controllers ignore these commands. 957 957 958 -== **037:перезапускконтроллера[[AZБК®>>doc:Контроллеры AZБК® для компьютеров БК-0010 БК-0010\.01 БК-0011М.WebHome]]и всей БК** ==958 +== 037: Restart of the** [[AZБК®>>doc:Контроллеры AZБК® для компьютеров БК-0010 БК-0010\.01 БК-0011М.WebHome]] **controller and the entire computer == 959 959 960 - Кодкоманды037,даннаякомандаосуществляетперезапускмикроконтроллераAZ®,чтовызываетиперезапусксамойБК-0010/БК-0010.01/БК-0011М960 +Command code 037, this command restarts the AZ® microcontroller, which also causes a restart of the BK-0010/BK-0010.01/BK-0011M itself 961 961 962 - Примерпрограммы962 +Example program 963 963 964 964 {{code language="assembler"}} 965 -AZ$CSR регистркомандисостояния(CSR)966 -AZ$DR регистрданных(DR)965 +AZ$CSR = 177220; command and status register (CSR) 966 +AZ$DR = 177222; data register (DR) 967 967 968 968 969 -; trap 57 - перезапускБК полный970 -AZcouldReboot: call AZreset; сбросимAZдабыонбылготовприниматькоманды969 +; trap 57 - full restart 970 +AZcouldReboot: call AZreset; reset AZ so it is ready to receive 971 971 mov #037,@#AZ$CSR 972 972 return 973 973 {{/code}} 974 974 975 -== **044:Cохранениескриншотавфайл**==975 +== 044: Saving a screenshot to a file == 976 976 977 -Код команды 044, данная команда предназначена для снятия образа памяти указанного размера (или определенного автоматически на основании сохраненных параметров) 978 -технически команда может служить как средство отладки ибо способная снимать образ памяти 979 -общее ограничение на снятие образа памяти - 2МБ на один образ 980 -\\в качестве параметров используется служебная страница памяти 76(8) 977 +Command code 044, this command is designed to take a memory image of the specified size (or determined automatically based on saved parameters) technically, the command can serve as a debugging tool because it is capable of taking a memory image the general limitation on taking a memory image is 2MB per image 978 +\\service memory page 76(8) is used as parameters 981 981 982 - Структуразаполненияинформацииоскриншоте980 +Structure of filling information about a screenshot 983 983 984 984 {{code language="c"}} 985 -// структурахидераскриншота983 +// screenshot header structure 986 986 typedef __packed struct screen_header 987 987 { 988 - unsigned short int tag; долженбытьравен0240986 + unsigned short int tag; // must be equal to 0240 989 989 990 - unsigned int начальныйадресвсловах-прямаязадачавфизическихадресах991 - unsigned int длинавсловах-прямаязадачавфизическихадресах988 + unsigned int begin_adress; // start address in words - forward task in physical addresses 989 + unsigned int length; // length in words - forward task in physical addresses 992 992 993 - unsigned short int begin_page; // начальнаястраница-номер-прямаязадачавномерахстраниц994 - unsigned short int len_pages; // количествостраниц-прямаязадачавномерахстраниц991 + unsigned short int begin_page; // start page - number - forward task in page numbers 992 + unsigned short int len_pages; // number of pages - forward task in page numbers 995 995 996 996 unsigned short int R177300; // 997 997 unsigned short int R177302; // ... ... @@ -1009,57 +1009,55 @@ 1009 1009 unsigned short int R177332; // 1010 1010 unsigned short int R177334; // 1011 1011 unsigned short int R177336; // 1012 - unsigned short int R177340; // - Региструправленияактивациейокно-маскиокон1013 - unsigned short int R177342; // - Региструправленияr/oнаокно1014 - unsigned short int R177344; // - Регистр управления shadowокон-маскиокон1015 - unsigned short int R177346; // - Региструправлениямаппером1016 - unsigned short int R177350; // - регистркопияпозаписи177130врежимезаписиуправленияпамятьювSMK1017 - unsigned short int R177352; // - регистркопияпозаписи177716врежимезаписиуправленияпамятьювБК11М1010 + unsigned short int R177340; // - Window activation control register - window masks 1011 + unsigned short int R177342; // - Control register r/o per window 1012 + unsigned short int R177344; // - Shadow window control register - window masks 1013 + unsigned short int R177346; // - Mapper control register 1014 + unsigned short int R177350; // - copy by record register 177130 in memory management write mode in SMK 1015 + unsigned short int R177352; // - copy by record register 177716 in memory management write mode in BK11M 1018 1018 1019 - unsigned short int R177230; // - региструправления1020 - unsigned short int R177232; // - регистрномерастраницыначалаотображения-верхняястраница(слой0)1021 - unsigned short int R177240; // - регистрномерастраницыначалаотображения-средняястраница(слой1)1022 - unsigned short int R177242; // - регистрномерастраницыначалаотображения-нижняястраницаслой2)1023 - unsigned short int R177244; // - регистрвертикальногоскролингаслой21024 - unsigned short int R177246; // - регистрвертикальногоскролингаслой11025 - unsigned short int R177250; // - регистрвертикальногоскролингаслой01026 - unsigned short int R177252; // - регистргозизонтальногоскролингаслой01027 - unsigned short int R177254; // - регистргозизонтальногоскролингаслой11028 - unsigned short int R177256; // - регистргозизонтальногоскролингаслой21017 + unsigned short int R177230; // - control register 1018 + unsigned short int R177232; // - display start page number register - upper page (layer 0) 1019 + unsigned short int R177240; // - display start page number register - upper page (layer 1) 1020 + unsigned short int R177242; // - display start page number register - upper page (layer 2) 1021 + unsigned short int R177244; // - vertical scroll register layer 2 1022 + unsigned short int R177246; // - vertical scroll register layer 1 1023 + unsigned short int R177250; // - vertical scroll register layer 0 1024 + unsigned short int R177252; // - horizontal scroll register layer 0 1025 + unsigned short int R177254; // - horizontal scroll register layer 1 1026 + unsigned short int R177256; // - horizontal scroll register layer 2 1029 1029 1030 1030 unsigned short int paldata[338]; // 1031 1031 } screen_header_t; 1032 1032 {{/code}} 1033 1033 1034 - Примеркодадлязаполнениястраницыпамяти1032 +Example code for filling a memory page 1035 1035 1036 1036 {{code language="assembler"}} 1037 1037 ;-------------------------------------------------- 1038 -; карта76йстраницы-тудамыготовимданныедлякомандыскринщотов1039 - уюстраницуцепляемнаместо77йвременно-тевокно1300001040 - тутвход- 240 - 1слово1041 - сюдакомандусадресами-адрес+длина24бита- 4слова1042 - сюдакомандусостраницами-начальнаястраницаиколичествостраниц- 2слова1043 - cюдаконфигурациюпамятиизрегистров- 22слова1044 - сюдаконфигурациювидеоконтроллера- 10cлов1045 - сюда338.значений(слов)палитры338слов1036 +; 76th page map - we prepare data for the screenshot command there 1037 +SCR_PAGE = 130000 ; we temporarily attach the 76th page to the 77th - that is, into the 130000 window 1038 +SCR_TAG = SCR_PAGE+0 ; here is the input - 240 - 1 word 1039 +SCR_ADDR_CONF = SCR_TAG+2 ; here is the command with addresses - address+length 24 bits - 4 words 1040 +SCR_PAGE_CONF = SCR_ADDR_CONF+8. ; here is the command with pages - the starting page and the number of pages - 2 words 1041 +SCR_MEM_CONF = SCR_PAGE_CONF+4. ; here is the memory configuration from the registers - 22 words 1042 +SCR_VGA_CONF = SCR_MEM_CONF+44. ; here video controller configuration - 10 words 1043 +SCR_PAL = SCR_VGA_CONF+20. ; here 338. values (words) of palette 338 words 1046 1046 ;-------------------------------------------------- 1045 +; trap 41 - preparation of default information for screenshot functionality 1046 +PrepSRC: jsr R5, PUSHA ; batch saving of registers 1047 + mov @#177326,-(SP) ; save page 130k which was before the call 1048 + mov #76,@#177326 ; hook 76th page into window 1047 1047 1048 - 1049 -; trap 41 - подготовка дефолтной информации для работы функционала скриншотов 1050 -PrepSRC: jsr R5, PUSHA ; пакетное сохранение регистров 1051 - mov @#177326,-(SP) ; сохраним страницу 130k которая была до вызова 1052 - mov #76,@#177326 ; цепляем 76ую страницу в окно 1053 - 1054 - mov #100377,R3 ; константа-заполнитель 1050 + mov #100377,R3 ; constant-filler 1055 1055 mov #SCR_PAGE,R4 1056 1056 mov #2047.,R2 1057 1057 4$: mov R3,(R4)+ 1058 1058 sob R2,4$ 1059 1059 1060 - mov #240,@#SCR_TAG ; проставляемтег1056 + mov #240,@#SCR_TAG ; put the tag 1061 1061 1062 - ; чистимучастокадресов-дефолтноавтоматическоеопределениеадресов1058 + ; clean the address section - default is automatic address detection 1063 1063 clr R3 1064 1064 mov #SCR_ADDR_CONF,R4 1065 1065 mov #10,R2 ... ... @@ -1066,7 +1066,7 @@ 1066 1066 2$: mov R3,(R4)+ 1067 1067 sob R2,2$ 1068 1068 1069 - ; конфигурацияпамяти-дефолтная1065 + ; memory configuration - default 1070 1070 mov #SCR_MEM_CONF,R4 1071 1071 mov #30,(R4)+ ;177300 1072 1072 mov #31,(R4)+ ;177302 ... ... @@ -1085,29 +1085,29 @@ 1085 1085 mov #110,(R4)+ ;177334 1086 1086 mov #100,(R4)+ ;177336 1087 1087 1088 - mov #170000,(R4)+ ;177340 - Регистр управления активацией окно - маски окон1089 - mov R3,(R4)+ ;177342 - Регистр управления r/o на окно1090 - mov #7777,(R4)+ ;177344 - Регистр управления shadow окон - маски окон1091 - mov #40404,(R4)+ ;177346 - Регистр управления маппером1092 - mov R3,(R4)+ ;177350 - регистр копия по записи 177130 в режиме записи управления памятью в SMK1093 - mov #16000,(R4)+ ;177352 - регистр копия по записи 177716 в режиме записи управления памятью в БК11М1084 + mov #170000,(R4)+ ;177340 1085 + mov R3,(R4)+ ;177342 1086 + mov #7777,(R4)+ ;177344 1087 + mov #40404,(R4)+ ;177346 1088 + mov R3,(R4)+ ;177350 1089 + mov #16000,(R4)+ ;177352 1094 1094 1095 - ; конфигурациявидеоконтроллера-дефолтная1091 + ;Video controller configuration - default 1096 1096 ; 177230-177256 1097 1097 mov #SCR_VGA_CONF,R4 1098 1098 1099 - mov #12201,(R4)+ ;177230 - регистр управления1100 - mov #4,(R4)+ ;177232 - регистр номера страницы начала отображения - верхняя страница (слой 0)1101 - mov R3,(R4)+ ;177240 - регистр номера страницы начала отображения - средняя страница (слой 1) "под спрайты"1102 - mov R3,(R4)+ ;177242 - регистр номера страницы начала отображения - нижняя страница (слой 2) "под фон"1103 - mov R3,(R4)+ ;177244 - регистр вертикального скролинга слой 21104 - mov R3,(R4)+ ;177246 - регистр вертикального скролинга слой 11105 - mov R3,(R4)+ ;177250 - регистр вертикального скролинга слой 01106 - mov R3,(R4)+ ;177252 - регистр гозизонтального скролинга слой 01107 - mov R3,(R4)+ ;177254 - регистр гозизонтального скролинга слой 11108 - mov R3,(R4)+ ;177256 - регистр гозизонтального скролинга слой 21095 + mov #12201,(R4)+ ;177230 1096 + mov #4,(R4)+ ;177232 1097 + mov R3,(R4)+ ;177240 1098 + mov R3,(R4)+ ;177242 1099 + mov R3,(R4)+ ;177244 1100 + mov R3,(R4)+ ;177246 1101 + mov R3,(R4)+ ;177250 1102 + mov R3,(R4)+ ;177252 1103 + mov R3,(R4)+ ;177254 1104 + mov R3,(R4)+ ;177256 1109 1109 1110 - ; закачиваемпалитру-беремдефолтнуюизэтойПЗУшки1106 + ; download the palette - take the default one from this ROM 1111 1111 mov #SCR_PAL,R4 1112 1112 mov #PalData,R2 1113 1113 mov #338.,R3 ... ... @@ -1114,44 +1114,43 @@ 1114 1114 1$: mov (R2)+,(R4)+ 1115 1115 sob R3,1$ 1116 1116 1117 - mov (SP)+,@#177326; вернемстраницускоторойбылвызов1113 + mov (SP)+,@#177326; return the page from which the call was made 1118 1118 return 1119 1119 {{/code}} 1120 1120 1121 - Вариантовуказанияучастковпамятитри1117 +There are three options for specifying memory areas. 1122 1122 1123 -1. указатьадресидлину24хбитные-cмформат,еслиихнет-системасмотритдальше1124 -1. указатьномерстраницыиколичествостраницы,еслиихнет1125 -1. системасмотритдальше-теделаетскриншотнаоснованииданныхорегистрах177230и т.д..1119 +1. specify the address and length 24-bit - see format, if they are not there - the system looks further 1120 +1. specify the page number and page quantity, if they are not there 1121 +1. the system looks further - that is, it makes a screenshot based on the data about registers 177230, etc. 1126 1126 1127 - Cкриншотсохраняетсявформате1128 -- страница76 -еепервыйкилобайт1129 -- самобразпамяти(еслирежимслоеный-товсетрислоя)1123 +The screenshot is saved in the format 1124 +- page 76 - its first kilobyte 1125 +- the memory image itself (if the mode is layered - then all three layers) 1130 1130 1131 1131 1132 -Перед вызовом команды можно загрузить имя файла для сохранения скриншота [в cmosmem буфер], однако при его отсутствии (в буфере не будет имени - строки заканчивающейся 0) система сформирует свое имя, на основании следующего правила: 1133 -дефолтный путь для сохранения скриншотов 1128 +Before calling the command, you can load the file name for saving the screenshot [in the cmosmem buffer], but if it is missing (there will be no name in the buffer - a line ending with 0), the system will generate its own name based on the following rule: default path for saving screenshots 1134 1134 0:/SCREENS/ 1135 - форматимени- DDHHMISS.SCR1136 - гдеDD-двецифрыднямесяца, HH-час, MI-минута, SS-секунда1137 -\\ Есливпроцессевыполнениякомандывозникнетошибка-вместоименибудет"ERROR *"1138 - кпримеру1130 +name format - DDHHMISS.SCR 1131 +where DD is two digits of the day of the month, HH is the hour, MI is the minute, SS is the second 1132 +\\If an error occurs during the command execution, the name will be "ERROR *" 1133 +for example 1139 1139 "ERROR f_open 6" 1140 1140 1141 1141 1142 - Примерпрограммы1137 +Example program 1143 1143 1144 1144 {{code language="assembler"}} 1145 -; обновиминформациювхидерескриншота1140 +; update the information in the screenshot header 1146 1146 ;-------------------------------------------------- 1147 -; карта76йстраницы-тудамыготовимданныедлякомандыскринщотов1148 - 70000уюстраницуцепляемнаместо77йвременно-тевокно1300001149 - тутвход- 240 - 1слово1150 - сюдакомандусадресами-адрес+длина24бита- 4слова1151 - сюдакомандусостраницами-начальнаястраницаиколичествостраниц- 2слова1152 - cюдаконфигурациюпамятиизрегистров- 22слова1153 - сюдаконфигурациювидеоконтроллера- 10cлов1154 - сюда338.значений(слов)палитры338слов1142 +; 76th page map - we prepare data for the screenshot command there 1143 +SCR_PAGE = 130000 ; we temporarily attach the 76th page to the 77th - that is, into the 130000 window 1144 +SCR_TAG = SCR_PAGE+0 ; here is the input - 240 - 1 word 1145 +SCR_ADDR_CONF = SCR_TAG+2 ; here is the command with addresses - address+length 24 bits - 4 words 1146 +SCR_PAGE_CONF = SCR_ADDR_CONF+8. ; here is the command with pages - the starting page and the number of pages - 2 words 1147 +SCR_MEM_CONF = SCR_PAGE_CONF+4. ; here is the memory configuration from the registers - 22 words 1148 +SCR_VGA_CONF = SCR_MEM_CONF+44. ; here video controller configuration - 10 words 1149 +SCR_PAL = SCR_VGA_CONF+20. ; here 338. values (words) of palette 338 words 1155 1155 ;-------------------------------------------------- 1156 1156 1157 1157 mov @#177326,R5 ; сохраним страницу 130k которая была до вызова