If this were for a next specifically, you would change to using the next's banking scheme where it can place any 8k memory page into any 8k cpu window optionally using special instructions. The old ports 0x7ffd, 0xdffd, 0x1ffd are there as an alternative for compatibility reasons only.Код:if ram0_type = 1 ld bc,$EFF7 ;pentagon ld a,%00001000 ;D3 1 = slot 0 page0 out (c),a endif if ram0_type = 2 ld bc,$DFFD ;profi ld a,%00010000 ;d4 1 = slot 0 page 0 out (c),a endif if ram0_type = 3 ld bc,$1FFD ;scorpion ld a,%00000001 ;d0 1 = slot 0 page 0 out (c),a endif
Если бы это было специально для следующего, вы бы переключились на использование банковской схемы следующего, где она может поместить любую страницу памяти 8 КБ в любое окно 8 К процессора, необязательно, используя специальные инструкции. Старые порты 0x7ffd, 0xdffd, 0x1ffd доступны в качестве альтернативы только для совместимости.
Without using registers:Код:if ram0_type = ZXNEXT ld a,0 ;; native banking is done in 8k pages which are double the 16k bank number nextreg $50,a ;; $ED $92 $50 (another notation is "mmu0 a"). 0-8K is now page 0 (first 8k of bank 0) inc a nextreg $51,a ;; $ED $92 $51 (another notation is "mmu1 a"). 8K-16K is now page 1 (second 8k of bank 0) ;; nextreg $50 - $57 determine paging in the 64k space in 8k units. io ports 7ffd, dffd, 1ffd also make changes to these nextreg. endif
I believe the uno and next operate in the same way with regards to divmmc memory (I speak as a next designer, not an uno designer). TRDOS calls are trapped by the divmmc hardware which causes the bottom 16k to be replaced by esxdos and the trdos emulation code to serve the trdos call. This has higher priority than the current memory mapping in the bottom 16K. The trdos code will execute and then esxdos will exit via a "ret" at a special address that disables the divmmc mapping after the "ret" executes. TRDOS should be able to operate properly even when the bottom 16k is ram. However you cannot load or save into memory in the bottom 16k as that is where the file system operates from.Код:nextreg $50,0 ;; $ED $91 $50 $00 nextreg $51,1 ;; $ED $91 $51 $01
Я считаю, что uno и next работают одинаково в отношении памяти divmmc (я говорю как следующий дизайнер, а не дизайнер uno). Вызовы TRDOS перехватываются оборудованием divmmc, что приводит к замене нижних 16k на esxdos и код эмуляции trdos для обслуживания вызова trdos. Это имеет более высокий приоритет, чем текущее отображение памяти в нижних 16K. Код trdos будет выполнен, а затем esxdos выйдет через «ret» по специальному адресу, который отключит отображение divmmc после выполнения «ret». TRDOS должен быть в состоянии работать должным образом, даже когда нижние 16 КБ являются оперативными. Однако вы не можете загрузить или сохранить в памяти нижние 16 КБ, поскольку именно там работает файловая система.
If this were a program written for the uno or next specifically, it would be better to use the native disk system than TRDOS. The native system is a FAT file system using a nearly posix api via rst$08 (with ROM present) so that it has calls like OPEN, CLOSE, SEEK, etc and operates on sd cards formatted as FAT. The same issue applies -- the file system code executes from the bottom 16k so you can't load and save in this area. Instead, if banking is involved, bank in the top 48k someplace and load and save there.
Если бы это была программа, написанная специально для uno или next, было бы лучше использовать систему с собственным диском, чем TRDOS. Нативная система - это файловая система FAT, использующая api с почти положительным значением через первые $ 08 (при наличии ПЗУ), так что она имеет такие вызовы, как OPEN, CLOSE, SEEK и т. Д. И работает на SD-картах, отформатированных как FAT. Применима та же проблема - код файловой системы выполняется из нижних 16k, поэтому вы не можете загружать и сохранять в этой области. Вместо этого, если речь идет о банковском деле, поместите банк в топ-48k где-нибудь и загрузите и сохраните там.
For port dffd, the next took this from the profi as a semi-standard way to extend traditional banking using 7ffd so that traditional banking could reach all of the next's memory in the top 16k. But we only took bits 2:0 (actually we're using 3:0) from port dffd for the bank number. The extra cpm banking the profi does wasn't really interesting as the native banking the next does is preferable for that kind of thing.
Что касается port dffd, следующий принял это из profi как нестандартный способ расширения традиционного банкинга с использованием 7ffd, чтобы традиционный банкинг мог получить доступ ко всей памяти следующего в топ-16k. Но мы взяли только биты 2: 0 (фактически мы используем 3: 0) из порта dffd для номера банка. Дополнительное банковское обслуживание cpm, которое делает профи, на самом деле не было интересным, так как местное банковское обслуживание, которое делает следующий, предпочтительнее для такого рода вещей.
However, we are interested in running pentagon (/profi, yes it's not the same) sw natively via trdos emulation and we've added the Pentagon 512K extension to help with increasing the amount of compatible software. Now I see someone using port dffd and cpm banking in the modern day... dffd can be used in this way in the next without too much disruption to the logic so if there is some sw using this then at least partially supporting this is an easy win. I realize dffd is likely rarely used in this way and port eff7 may be more common as the newer clones are using that.
Тем не менее, мы заинтересованы в запуске Пентагона (/ profi, да, это не то же самое) с помощью эмуляции trdos, и мы добавили расширение Pentagon 512K, чтобы помочь увеличить количество совместимого программного обеспечения. Теперь я вижу, что кто-то использует банковские операции с портами dffd и cpm в наши дни ... dffd можно использовать следующим образом, не слишком нарушая логику, поэтому, если есть какой-то sw, использующий это, то, по крайней мере, частично поддерживающий это легкая победа. Я понимаю, что dffd, вероятно, редко используется таким образом, и порт eff7 может быть более распространенным, поскольку новые клоны используют это.
The goal is to be able to run a large percentage of traditional pentagon software from the next itself. If higher degrees of compatibility are needed, it's not hard to make new cores for those machines. I don't really want to complicate the banking logic in the next itself with a lot of messy and incompatible banking systems, and in fact I am still wondering if it is worthwhile to extend port dffd
Цель состоит в том, чтобы иметь возможность запускать большой процент традиционного программного обеспечения Пентагона от самого следующего. Если требуются более высокие степени совместимости, нетрудно создать новые ядра для этих машин. На самом деле я не хочу усложнять банковскую логику в следующем из-за множества грязных и несовместимых банковских систем, и на самом деле мне все еще интересно, стоит ли расширять порт dffd![]()





Ответить с цитированием
Размещение рекламы на форуме способствует его дальнейшему развитию 


