quinta-feira, 17 de dezembro de 2020

Assembling a 1 MB ASCII MegaFlashRom with 32 kB SRAM using the LZ93A13 mapper

 

DIY – Assembling a 1 MB ASCII MegaFlashRom with 32 kB SRAM over an LZ93A13 mapper

 

Hello everyone!

 

The MSX ASC8 (ASCII) ROM mappers can control up to 1024kB of cartridge memory with chip LZ93A13 (ASC1) or up to 2048kB with chip M60002 (ASC2), when in 8 kB mode (and twice the size in 16 kB mode). Several game designers used this Rom mapper.

 

So, this DIY project will use a 1 MB (8 Mbit) KOEI cartridge with SRAM to create a 1024kB MegaflashROM with a 32 kB SRAM

 

List of components:

1) MSX cartridge with LZ93A13 (ASC1) or with the M60002 (ASC2).

2) Optionally, an MSX cartridge with a SRAM (CXK58257) and battery backup already connected.

3) 1 mini switch (2-pin) to turn on/off the MegaflashROM

4) 2 flash memory - 512 kB (am29f040b) – optionally, you can use only 1

5) 1 decoder 74HC139 (or LS139) to decode MA19 (B6) to switch between the flash memories

6) 1 resistor of 4.7 kΩ

 

The connections will be made from (both) the flash memory to the MSX bus and to the LZ93A13:

1)  A0 to A12 of (both) flash memory connected to the MSX address bus

2)  A13 to A18 of (both) flash memory connected to B0 to B5 of the LZ93A13 (or M60002)

3)  D0 to D7 of (both) flash memory connected to the MSX data bus

4)  /WE of (both) flash memory connected to /WR of the MSX address bus

5)  /OE of (both) flash memory connected to /OE.00-7F (pin 8) of the LZ93A13 (or M60002)

6)  /CE of flash 1 to pin 5 (/Y1) of the LS139 

7)  Optionally, /CE of flash 2 to pin 7 (/Y3) of the LS139

8)  /SLTSL of the MSX address bus to pin 1 of the switch

9)  Pin 2 of the switch to pin 1 (/G) of the LS139

10) Resistor of 4.7 kΩ between VCC and pin 1 (/G) of the LS139

11) /RESET of the MSX address bus to pin 2 (A) of the LS139

12) B6 of the LZ93A13 (or M60002) to pin 3 (B) of the LS139


Diagram for the connections: 


 

 For the project, the game Nobunaga's Ambition 3: Rising Sun (信長の野望・武将風雲録) was used (https://www.generation-msx.nl/software/koei/nobunagas-ambition-3-rising-sun/release/1548/):

 


 

 I put together these diagrams with pinouts in order to properly identify and solder the pins and wires:


 After, the SHARP MASK-ROM was removed and the First FLASH MEMORY was connected:

 



In order to test it, FL8.COM was used with a ROM smaller than 512 KB:

 


 

Finally, both FLASH memories were installed and tested:

 


 

And finally, it was tested as shown on this YouTube video (https://www.youtube.com/watch?v=eXTdpdrzfeM): 




In order to erase both FLASH memories, I had to change the program FL8.COM. The modified program and the source can be downloaded here (http://msxvillage.fr/upload/fl8dual.zip).

 

Also, in order to download/upload the contents of the SRAM, or even to upload 512 kB or smaller files to the first FLASH, you can use OPF version 0.78, that can be downloaded from herehttps://msxcartridgeshop.com/bin/opf.zip


PS: I´ve realized that, when you connect /OE of both Flashes directly to the /RD signal of the MSX bus, the program OPF.COM recognizes the cartridge as a 1024 ASC1 FLASHROM, but you and the games lose the capability of accessing the SRAM, as both devices (FLASH and SRAM) are on the same cartridge. So, the only way to "mux" the FLASHES and the SRAM on the same cartridge is to connect /OE.00-7F to /OE of both FLASHES, as /OE of the SRAM is already connected to /OE.80-FF and as /WE of the the SRAM is already connected to /WE.80-FF of the LZ93A13. In this way, bit 7 can be used at the switching addresses of the LZ93A13 in order to select the SRAM.

 

Acknowledgements:

First, thanks to Luciano Menezes (in memoriam) for the idea of this project and for the initiative of importing some KOEI cartridges to Brazil to implement and test it.

Second, thanks to K.Tsujikawa for the diagram of the original ESE-RAM (似非RAM). どうもありがとうございます!

Finally, thanks for GDX and all the folks at the MSX Village forum (http://msxvillage.fr/forum/topic.php?id=329) for all the ideas, schematics and modifications of the original project. Merci beaucoup!

segunda-feira, 8 de junho de 2020

Expanding MSX Sony HB-F1 internal memory to 512k

Hello everyone!

All MSX computers that use MSX Engine S1985 are easy to expand, including Sony HB-F1.


So, with the help of Alexandre Tabajara and his post here, I´ve expanded my Sony HB-F1´s internal memory.

I chose to use a SRAM since it doesn´t require extra DRAM refreshing circuitry, and the S1985 has already all internal circuitry in order to provide a total of 512k of mapper ram.

For starters, the logic behind it is that you will need to connect a SRAM to the MSX bus by using "standard" connections:
  • A0 to A13 of the SRAM connected to the MSX address bus
  • D0 to D7 of the SRAM connected to the MSX data bus
  • /OE of the SRAM connected to the /RD pin of the Z80
  • /WE of the SRAM connected to the /WR pin of the Z80
  • A14 to A18 of the SRAM connected to pins MA14 to MA18 of the S1985
  • /CS of the SRAM connected to the slot you want to allocate the RAM at. In HB-F1´s case, it connects to slot 3.3 (slot 3, subslot 3) of the S1985

The catch: The  S1985 has pins with dual functions, which are configured at the boot sequence  according to keyboard signals.  At startup conditions, only 256k of mapper are allowed, unless X5 receives GND for at least 0.2 seconds at startup (this line originally has VCC with a pull-up resistor). With GND at startup, the MA18 line is provided by the S1985, thus allowing for 512 Kb of mapper.

List of components:
  • 512K SRAM (AS6C4008 recommended).
  • Transistor BC548
  • Diode 1N4148
  • Resistor of 1 kΩ x 1/8W
  • Resistor of 4.7 kΩ x 1/8W
  • Capacitor of 220uF

Datasheets from Alexandre Tabajara´s webpage:


First step: Remove both DRAMs 4464 from the computer´s PCB.

Second step: Fold up the following SRAM pins:  1, 2, 3, 32, 31, 30, 29, 24 and 22.


This is the resulting appearance (first picture from Alexandre Tabajara´s post):



Third step: Place the SRAM directly on top of the main ROM (piggyback), and directly solder all pins that are not folded up (picture from Alexandre Tabajara´s post):


All pins that are folded up will be soldered directly either to the Z80 or to the S1985.

The final result will be:
  • Pin 24 of the SRAM (/OE) connected to pin 21 of the Z80 (/RD)
  • Pin 29 of the SRAM (/WE) connected to pin 22 of the Z80 (/WR)
  • Pin 22 of the SRAM (/CE) connected to the disconnected pin 56 of the S1985 (/SLT33)
  • Pin 32 of the SRAM (VCC) connected to +5 Volts (pin 28 of the ROM)

Hint: Instead of disconnecting pin 56 of the S1985, as the Sony HB-F1 has jumpers all over the PCB, simply cut/disconnect J8 jumper (the right most jumper on the frontal side of the S1985) and solder its upper position to get a direct signal from pin 56 of the S1985 (/SLT33), as shown on the pictures bellow:



Fourth step: Solder pins 3 to 7 of the S1985 - MA18, MA17, MA16, MA15 and MA14 (picture from Alexandre Tabajara´s post):


Fifth step: Solder MA18, MA17, MA16, MA15 and MA14 from the S1985 to the SRAM:
  • MA14 to pin 3 of the SRAM
  • MA15 to pin 31 of the SRAM
  • MA16 to pin 2 of the SRAM
  • MA17 to pin 30 of the SRAM
  • MA18 to pin 1 of the SRAM

After these steps/connections, if you turn the computer on and run a memory test program (as TESTRAM) it should show 256 Kbytes of Mapper RAM.

Sixth step: In order to activate the MA18/KBDIR line,  thus activating 512k of memory mapper, you will need a circuit that sends out GND to keyboard´s X5 pin at the boot sequence time.

The RESET line can be found on a jumper the main PCB:


Also, the X5 pin can be found on back side the keyboard connector (RB105). On the back side of the PCB, it is the third pin from right to left, coming directly from pin 78 of the S1985.

The circuit was assembled using the following diagram:


I´ve assembled the circuit over the original RAM´s location (DRAMs 4464) of the computer´s PCB, as it has VCC and GND close by:


After all the connections, this is the main board:


After these steps/connections, if you turn the computer on and run a memory test program (as TESTRAM) it should show 512 Kbytes of Memory Mapper.

Good job! Now, you can boot up your computer and have a well deserved fun with your upgraded 512k of Memory Mapper :D







segunda-feira, 28 de março de 2011

SD/MMC Operacional

Olá amigos.

Finalmente o SD/MMC enviado pelo Fernando Martinez está operacional.


Aqui descrevo o passo-a-passo dos testes:


Essa é a estação de testes, um Expert 3 montado em um gabinete de DDPlus e com um monitor M1721A, que particularmente recomendo a todos os entusiastas de MSX, pelo fato da imagem ficar perfeita, e o próprio monitor apresentar as mais diversas entradas para todo tipo de equipamento. Maiores detalhes sobre o mesmo no blog do Victor Trucco (http://www.victortrucco.com/Diversos/MonitorM1921A/MonitorM1921A.asp):



Como os senhores podem notar, do lado direito encontramos meu leitor SD/MMC artesanal (SD/MMC_Old), o qual se encontra operacional, e do lado esquerdo o leitor SD/MMC compacto e muito bem confeccionado pelo Fernando e Taylor (SD/MMC_New).

Agora vem a primeira pergunta: Como testar os sinais, sem analisador lógico ou mesmo osciloscópio? Simples: vejam os LED soldados nas duas placas, logo abaixo: 



Com esses LED foi possível seguir os sinais suspeitos no SD/MMC_Old operacional ao longo do boot, até o momento de reconhecimento e leitura do SD, e assim comparar com os respectivos sinais do SD/MMC_New.

Bem, agora vamos aos resultados:

1) Inicialmente notei que o conversor de tensão +5V para +3,3V que veio com o equipamento apresentava funcionamento suspeito, pois estava com uma saída de 4,6V. Além disso, como já notado pelos Fernando e Taylor (FT), a pinagem do conversor SMD utilizado é diferente do LM3940 tradicional. Neste caso somente instalei um LM3940 tradicional sobressalente, e constatei que a tensão entre os pinos 3 e 4 do SD está correta: 3,3V (instalado no extremo direito da placa, conforme foto acima).

2) Como também já observado pelos FT, a pinagem do LS244 está invertida no esquema, porém como o mesmo já veio com uma adaptação para "desinvertê-lo", resolvi refazer tal adaptação e já testar as saídas do 244. Notei que o 244 SMD que veio estava queimado, assim troquei por um 244 DIP sobressalente, conforme pode ser observado na foto abaixo (componente "adaptado" do lado esquerdo).


3) Como próximo passo, analisando o circuito de leitura do pino 7 (Data Out) do SD, nota-se que que o LS164 não está recebendo o sinal de CLOCK corretamente. Assim, através de avaliação dos componentes, foi observado que as portas AND (LS08) não estão funcionando. Analisando-se com calma o diagrama da LS08, observa-se que no esquema novo dos FT, a mesma não está sendo alimentada no pino 14, e nem devidamente aterrada no pino 7, portanto como pode ser observado na figura acima, são conectados VCC e GND para o LS08 (U10).

4) Finalmente, seguindo-se o esquema e os sinais, nota-se que o LS125 não está recebendo sua correta ativação do buffer de passagem de leitura para D0 no pino 10. Seguindo-se os sinais e os comparando, foi observado que o flip-flop D ligado a D1 (U11A - pino 5) não está corretamente conectado em sua saída não invertida à porta AND (U10B - pino 4). No diagrama enviado por FT, aparentemente tal conexão está projetada, bem como na parte de trás da placa a referida conexão está fisicamente íntegra, porém não pôde ser verificada a correta integridade na parte frontal da placa, pelo fato do SCC estar sobre a maior parte da trilha que faz a conexão entre tais pinos. Para correção, simplesmente fez-se uma ponte com fio entre tais pinos, como também pode ser observado na imagem acima.

Finalmente, o resultado:

1) Reconhecimento e Formatação de um SD de 2 GB


2) Leitura de 2 SD conectados ao leitor simultaneamente:


3) Jogo Firehawk - Thexder 2 lido direto do SD conectado à porta 1:



Finalmente, fica a lista das modificações a serem feitas neste protótipo para a versão final:

A) Implementar o sinal de VCC para a posição OFF da chave liga/desliga do AT29C040A;
B) Modificar pinagem do conversor de tensão na placa para o conversor SMD (U20) utilizado;
C) Corrigir a pinagem do LS244 (U13) de acordo com o esquema original do Yeongman Seo;
D) Implementar VCC e GND para o LS08 (U10); e
E) Verificar se realmente existe a conexão entre U11A - pino 5 e U10B - pino 4 na placa final não montada.

Um abraço a todos e fiquem na paz do Senhor.


segunda-feira, 14 de março de 2011

SD/MMC Chegou

Bom dia colegas. 

Como já informado pelo blog do colega Fernando Martinez, a interface SD/MMC chegou recentemente para manutenção, devido ao não reconhecimento dos cartões SD por parte da nova interface.

Aqui encaminho algumas fotos da mesma, no lado direito, comparada com a minha operacional e completamente "artesanal" do lado esquerdo:







Conforme rápida avaliação, a interface está com o módulo flash operacional, porém não está apresentando, já na própria inicialização, qualquer retorno no reconhecimento de cartões SD, inclusive quando a testo com cartões já previamente formatados e operacionais na interface SD da esquerda.

Creio que em uns 15 dias inicio os primeiros testes no hardware da interface, assim mantendo os senhores atualizados na sequência.

Um abraço;

Fernando Gallego Dias