ну, одно дело - внешний "разветвитель" джойстика воткнуть, а другое - внутрь компа лезть![]()
ну, одно дело - внешний "разветвитель" джойстика воткнуть, а другое - внутрь компа лезть![]()
С любовью к вам, Yandex.Direct
Размещение рекламы на форуме способствует его дальнейшему развитию
Можно вход TAPE IN оставить без изменений аналоговый, а вывести наружу через диоды 4 бита данных с кемпстона и 1 сигнал чтения из порта кемпстона. Так даже лучше - опрос клавиатуры не будет мешать загрузке. Можно будет использовать Press Any Key для продолжения. И скорость загрузки увеличится в 4 раза.
Можно разъем для подключения кемпстона DB-9M установить на корпусе устройства "Fast PC-Loader". А к Спектруму подключать через разъем, на котором будут все нужные сигналы.
Может кто-нибудь вычислить скорость загрузки по 4 бита за раз ?
Последний раз редактировалось zx-kit; 20.09.2015 в 12:12.
"L-256"
В исходниках unsnap'а что-то подобное было
Спасибо, не помогло. Вот нашел на WOS описание формата SNA:
SNA Format
This format is one of the most well-supported of all snapshot formats, but has a drawback:
As the program counter is pushed onto the stack so that a RETN instruction can restart the program, 2 bytes of memory are overwritten. This will usually not matter; the game (or whatever) will have stack space that can be used for this. However, if this space is all in use when the snap is made, memory below the stack space will be corrupted. According to Rui Ribeiro, the effects of this can sometimes be avoided by replacing the corrupted bytes with zeros; e.g. take the PC from the, stack pointer, replace that word with 0000 and then increment SP. This worked with snapshots of Batman, Bounder and others which had been saved at critical points. Theoretically, this problem could cause a complete crash on a real Spectrum if the stack pointer happened to be at address 16384; the push would try and write to the ROM.
When the registers have been loaded, a RETN command is required to start the program. IFF2 is short for interrupt flip-flop 2, and for all practical purposes is the interrupt-enabled flag. Set means enabled.
Offset Size Description
------------------------------------------------------------------------
0 1 byte I
1 8 word HL',DE',BC',AF'
9 10 word HL,DE,BC,IY,IX
19 1 byte Interrupt (bit 2 contains IFF2, 1=EI/0=DI)
20 1 byte R
21 4 words AF,SP
25 1 byte IntMode (0=IM0/1=IM1/2=IM2)
26 1 byte BorderColor (0..7, not used by Spectrum 1.7)
27 49152 bytes RAM dump 16384..65535
------------------------------------------------------------------------
Total: 49179 bytes
The 128K version of the .sna format is the same as above, with extensions to include the extra memory banks of the 128K/+2 machines, and fixes the problem with the PC being pushed onto the stack - now it is located in an extra variable in the file (and is not pushed onto the stack at all). The first 49179 bytes of the snapshot are otherwise exactly as described above, so the full description is:
Offset Size Description
------------------------------------------------------------------------
0 27 bytes SNA header (see above)
27 16Kb bytes RAM bank 5 \
16411 16Kb bytes RAM bank 2 } - as standard 48Kb SNA file
32795 16Kb bytes RAM bank n / (currently paged bank)
49179 2 word PC
49181 1 byte port 0x7ffd setting
49182 1 byte TR-DOS rom paged (1) or not (0)
49183 16Kb bytes remaining RAM banks in ascending order
...
------------------------------------------------------------------------
Total: 131103 or 147487 bytes
The third RAM bank saved is always the one currently paged, even if this is page 5 or 2 - in this case, the bank is actually included twice. The remaining RAM banks are saved in ascending order - e.g. if RAM bank 4 is paged in, the snapshot is made up of banks 5, 2 and 4 to start with, and banks 0, 1, 3, 6 and 7 afterwards. If RAM bank 5 is paged in, the snapshot is made up of banks 5, 2 and 5 again, followed by banks 0, 1, 3, 4, 6 and 7.
Обычные регистра я загрузить смогу, а вот как правильно настроить прерывания, стек и запуск программы ?
Описание не точное, вместо word надо читать byte !
Последний раз редактировалось zx-kit; 09.11.2015 в 16:19.
"L-256"
в случае sna48k есть одна проблема - адрес с которого должна продолжится программа (РС) хранится на стеке программы.
(если в момент сброса игры стек находится в-данных, то они естественно портятся)
и где после пересылки программы в-память 16384,49152 будут храниться данные которые необходимо переслать в регистры ?
Последний раз редактировалось goodboy; 09.11.2015 в 21:54.
Эту тему просматривают: 1 (пользователей: 0 , гостей: 1)