9

Radyokonstruktor AVR ZX Spectrum V2_0 (Description, assembly instructions, Programming instructions)

1. OverviewAVR ZX Spectrum V2_0The described apparatus is a further development ZXSpectrum microcontroller AVRV1_0, already submitted earlier. How and earlier, is a complete hardware and software emulator of the world famous and to this day the PC ZXSpectrum.

Specifications:

  • Screen resolution: 256 x 192 score;
  • Matrix screen familiarity: 32 x 24;
  • Number of colors on familiarity: 2;
  • Number of colors the display area: 8;
  • The number of border colors: 8;
  • The number of gradations of brightness for each color: 2;
  • The equivalent frequency of the CPU: 2,333 MHz;
  • I / O Ports: 0xFE, 0x7FFD, 0xFFFD, 0xBFFD;
  • keyboard interface: PS/2;
  • The number of keys involved: 82;
  • The number of audio channels: 4;
  • List of audio channels: left AY8910, right AY8910, average AY8910, buzzer;
  • Video Outputs: B & W output, RGB output, separate synchronization yield;
  • Support for loading / unloading "on tape": there is;
  • Additional input / output devices: micro-SD card;
  • Supported models ZXSpectrum: Pentagon 128 K, zxspectrum 128 K, ZXSpectrum48 K, Zxspectrum + 2, Zxspectrum + 3, ZXSpectrum48 K` 2006; OPEN SE BASIC 128 K, OPENSEBASIC 48 K,
  • Additional operating system: SDDOS;
  • File system: FAT32;
  • Socket I / O bus: there is;
  • Design: double-faced printed circuit board 140 x 22 mm, installing inside the keyboard or in a separate housing;
  • Power unit: Connector mini-USB «F», voltage +5 AT.

As can be seen from the above specifications, V2_0 version differs from its predecessor, a number of design, hardware and software enhancements.

  1. The presence SDkarty SDDOS and disk operating system, operating under the FAT32 file system, It allows you to conveniently prepare files on IBM-compatible PCs, writing them to the memory card, and instantly run it in SDDOS;
  2. The keyboard is now greatly expanded. Fully activated the keypad, F1 key…F12, «-», «+», «[», «]», «:», «/», «<», «>», «”», that provides significant convenience;
  3. You can install the connector to connect the keyboard to the board. What makes it more convenient location within the design board of any housing.
  4. Emulator musical coprocessor AY8910(12) no longer were soldered to vias, and joined to the system bus on the connector;
  5. We derive individual connectors for external programming of microcontrollers ATMega128-16AU;
  6. Power devices are now performed through mini-USB connector, mounted on board, which makes it possible to use the device for powering conventional chargers and power supplies for numerous gadgets for today;
  7. The CPU is now focused in the right way on the board;

2. The schematic circuit diagram

Driving device shown in Figure 1.

The device can distinguish the following functional blocks:

  • the CPU is assembled on elements D2, C2, C2, R17…R19, R26, C10…C13, XS3, XP2;
  • keyboard controller is configured to elements D4, C4, C6, BQ1, R11, R17, R26, XS1;
  • the video processor is configured to elements D1, C1, R1…R8, XP1;
  • video signal generating unit is implemented on the elements D3, C5, R9, R12…R41, VT1…VT5, VD1, VD2, K1…K7;
  • RAM unit with pageable executed on elements D5…D7, C7…C9, VD1, VD2;
  • emulator unit musical coprocessor implemented on cell D8, C17…C24, R43…R46, BQ2, XS2 XS6, K8, K9;
  • the power supply circuit includes elements DA1, C14, C15, XS5.

Picture 1 - electrical schematic diagram AVRZXSpectrumV2_0

scheme

Fig.1.

XS4 connector is designed to connect micri-SD memory card.

As can be seen from the scheme, device is implemented in eight chips. All eight chips operate from supply voltages +5 AT, is fed through connector mini-USB XS5. To supply the micro-SD card required voltage 3,3 AT, is formed and a voltage stabilizer DA1 ZR78L033G (possible replacement - L78L33ACUTR, housing SOT-89).

Let us consider separately the principle of operation of each functional unit.

central processing unit executed on the microcontroller D2 ATMega128-16AU (TQFP64 housing). It performs the task of emulating microprocessor Z80 Zilog and I / O ports. Z80 team, emulated by the CPU, located in the FLASH memory of the microcontroller with a physical address 0X8000 pages on 16 For each. In this way, from this address when you compile the project should have the ROM emulated ROM files ZX-Spectrum-compatible machines. After the supply voltage is an initialization of internal microcontroller devices, use them at work, configuration of I / O ports of the microcontroller, forming tables in the RAM of the microcontroller, used in the Z80 emulation. Further there is a cyclic process of checking the masked interrupt, sample emulated instructions, increment program counter, transition and implementation of the selected emulation program instructions and return to the beginning of the cycle. In the presence of the allowed masked interrupts a transition to its treatment program.

Masked interrupt signal (signal MINT) It comes from the video processor CPU D1 with a frequency sweep personnel - 50 Hz. It is used for processing the analog comparator input AIN controller, since the interruption of the analog comparator can quickly check the sample before the next instruction. Also, it's easy to enable and disable, which is used in emulation commands EI and DI.

Accessing external memory CPU is performed a standard manner through an external memory interface. At the beginning of the treatment cycle to external RAM microcontroller puts RBBCP signal, addressable video processor (active low). This signal "warning" of the video processor, that ranked CPU external RAM read / write operation. Next, the CPU opens an external memory interface, and performs a read or write operation. Thus the physical address of the RAM determined signals A15_CP, A14_CP, A13…A8, AD7…AD0, MUXA17…MUXA14. Low byte of the address is set to the register-address latches Jr. D6 to AD7 lines…AD0 and rewritten into it by the rising edge of signal ALE controller. Further there is a proper read / write operation of RAM, When reading the activated signal RD ~, and when recording - ~ WR signal controller. After performing the read / write controller closes the interface with external memory and deactivates (set to "1") signal RBBCP.

When emulating a port write operation on lines 0xFE port D of the microcontroller (signals BORDH:BORDM:BORDL) exhibited binary border color, which remains on these lines until the next recording operation in port 0xFE. Thus TOTAPE signal is set in accordance with the bit 3 number, recorded in the port, and signal BEEP (beep sound) in accordance with the bit 4 this number. When the read operation from the emulation 0XFE port request occurs keyboard controller D4. Query signal is formed on the external interrupt line KEYMH(on the falling edge of the signal). When this happens RBBCP activation signal to prohibit the video processor memory reads at the time of issuing the controller keyboard poll code, the Keyboard poll code A15_CP lines, A14_CP, A13…A8. In response to the keyboard controller exhibits a 5-bit code on the response lines KEYH:KEYMH:KEYML:KEYL port F microcontroller. This code is read by the CPU and is involved in the formation of 8-bit data read 0XFE port operations. bits 7 and 5 in this case set to "1", a bit 6 It is determined by the MSB code data analog-to-digital converter controller, connected to the discharge 6 gate F. ADC controller is set by the value of the reference voltage, equal to the supply voltage. In this way, if FROMTAPE / signal level at terminal PF6 less than half the supply voltage, the discharge 6 0xFE port when the reading is reset to 0, otherwise - set 1. Hardware voltage on this pin is set to half the supply voltage by means of a resistive divider R18, R19.

When the port emulation recording musical coprocessor addresses the operation 0XFFFDkod addresses exposed on the bus A15_CP, A14_CP, A13…A8 with active level (0) signal RBBCP, Further there is an activation (setting to "1") Signal BC1 and BDIR, which are addressed to the emulator musical coprocessor at a time, necessary for its operation. Thereafter the deactivation signals RBBCP, BC1 and BDIR.

Similarly a write operation occurs in 0XBFFD musical coprocessor data port with the difference, BC1 that the activation signal does not occur.

When the write operation to port 0X7FFD (port to record only) the three least significant bits (2, 1, 0) bytes involved in the formation of memory page number, hook to addresses 0XC000-0XFFFF. The page number memory thus determined signals MUXA17…MUXA14, addressable paged multiplexer D7. bit 3 participates in the selection of the usual («0») shadow or "1") screen. When this mode is selected when "normal display" and A14_CP A15_CP signals are set to "0" and "1" respectively,, and when you select the "shadow shield" – in nuly. bit 4 determines the selection of the ROM page. "0" corresponds to the ROM younger page, "2" – senior. Entry Bit 5 "1" prevents the possibility of future entry into the port.

For CPU-circuit programming circuit connector provided XP2. PDI2 signals, PDO2, SCK2 and ~ RESET2 used in-circuit programming and equivalent signals MOSI, MISO, SCKy ~ RESET programmer. Also PDI2 signals, PDO2, SCK2 with the signal ~ CS_SD used as a SPI interface with micro-SD memory card, and equivalent signals SD_IN (input), SD_OUT (output), CLK (data synchronization) и CS (card selection) interface micro-SD card. Matching levels occurs programmatically, logical "1" on PDO2 and SCK2 controller outputs generated by including pullup.

keyboard controller executed on the microcontroller D4 ATTINY2313A-SU (possible replacement – ATTINY2313-20SU), body SOIC-20. It performs the task of keyboard emulation (0XFE port when the read operation), implements an interface PS / 2 keyboard, and a source of clock pulses for the CPU and GPU D1 D2.

CPU timing is derived from an external crystal frequency BQ1 20 MHz. For this controller is the limiting frequency of operation in accordance with its specifications. Conclusion PD2 is configured to fuse-bits for programming the output clock frequency for clocking the CPU and GPU (signal MHz20), for which the frequency is higher than the guaranteed in accordance with a proprietary technical description (datasheet), so that they work in overclock mode,and as practice shows, completely stable.

When the power supply controller initialization occurs, configuration and its initial setting of input / output ports. signal KEYDATA (data) и KEYCLK (data synchronization) consistent interface PS / 2 and are input to the microcontroller. In the main mode controller is busy reading the keyboard scan codes and the formation of the eight internal registers COLOMN7…COLOMN0 matrix keyboard state. Also, the controller generates an emulation of additional keys by setting the registers of the matrix keyboard simultaneous pressing of two keys, one of which Capsshift or Symbolshift. Wherein the controller operates in the permitted external interrupt INT1 (signal KEYMH) on the falling edge of the signal. In interrupt mode D2 from the CPU goes to the interrupt routine, reads a line A15_CP, A14_CP, A13…A8 (PORTB) keyboard poll code, generates a response code by combining (AND operation) Information relevant (respondents) registers COLOMN7…COLOMN0). In the play of the data merge register, data bits for which the reset to keyboard polling code. The generated response code is set to PORTB (line KEYH:KEYMH:KEYML:Keyl) for securities.

video processor unit executed on the microcontroller D1 ATMega128-16AU (TQFP64 housing). Its task is reading video data from the video RAM region, of RAM color attributes Read, formation video, synchronization signal, installation of curb color, as well as the formation of the flicker (Flash) familiarity with the single bit value 7 attribute.

Upon power initialization occurs internal configuration of the controller device and its I / O port.

Formation sinhrosmesi of horizontal and vertical synchronizing pulses (SYNC signal) It occurs by PWM. It uses an internal 16-razryadnyyschotchik TCNT1.

Read video data from the RAM to the next video line occurs during the forward stroke of the beam after the withdrawal of the current video line and install curb color. Thus there is a signal analysis RBBCP, permitting reading from RAM. If this signal is active («0»), then wait its deactivation. Immediately thereafter reads the data byte from RAM and the final signal analysis RBBCP. If RBBCPsnova was active, it concludes, that the data byte can be unreliable, and the whole cycle repeats his reading. should say, that the video processor is connected to the RAM unit via a current-limiting resistors R1…R7, that prevents a hardware conflict CPU and GPU in the case, if there will be simultaneous treatment of MX to the external RAM.

Byte read image data is stored in the corresponding general purpose register and is used in the derivation of a corresponding video line familiarity.

As it becomes clear, valid only those data have been read, that have been read in the absence of read / write operations of the CPU external RAM. Here, the interface from the external memory CPU closed, and line A15_cp and A14_CP CPU installed in accordance with the selected screen (Cm. section referring to the CPU block). In this case, the video processor and software are always disconnected from the mains and A15_CP A14_CP, which control the operation of the paging multiplexer. In this way, at this time in A15_CP normal screen mode = 0, A14_CP = 1, SCRA16=0, page multiplexer switched to transfer output signals of section A, and, in this way, signals A17…A14, determined by the highest 4 bit address RAM, It is set to "0010", which corresponds to the area of ​​RAM memory, allotted under normal screen. In shadow mode screen A15_CP = 0, A14_CP = 0, SCRA16=0, page multiplexer switched to transfer output signals of section A, and, in this way, signals A17…A14, determined by the highest 4 bit address RAM, It is set to "0000", which corresponds to the area of ​​RAM memory, allotted under the shadow screen.

color attribute is read during the output lines of the lower and upper borders similar to reading video. Thus if bit 7 attribute set, ie including familiarity flicker mode, It occurs when the necessity of its correction - the bits of paper color and ink color bits are swapped. The attributes are stored in internal RAM controller.

During the forward stroke of the beam when forming an image occurs cyclically output to the port B data register corresponding, LSL shift left command data of this register and one clock cycle delays. After the last output (the eighth in a row) a video port cycle is repeated until the first image line output end. Attribute bytes are read from the internal RAM using the POP command after the output of the penultimate bit of each byte of video data, and their output to the port attributes of color - PORTE - takes place immediately prior to the conclusion of the next byte video. In the E port controller on lines Y / 2:PG:PR:PB:IG:AND:IB present paper color code (PG:PR:PB), ink color code (IG:AND:IB) and the luminance gradation signal Y / 2, which are intended multiplexer D3 74AC257D (body SOIC-16). While signal PIXEL determines which color value - paper color (PIXEL=0) or black (PIXEL=1) involved in the formation of the video signal.

At the beginning of each frame (that is, with a frequency 50 Hz) video processor generates a signal MINT, active level 0, which is fed to the analog input of the comparator CP for forming masked interrupt.

RAM unit with pageable built on-chip SRAM D5 CY7C1049D-10VXI (possible replacement – AS7C4096A-12JIN), Corps SOJ-36, volume 512 TO, register-latch lowest address D6 74AC373MTC (possible replacement – MC74AC373DT), TSSOP-housing 20 and the page-multiplexer D7 74AC257D, body SOIC-16. Space, adresuemoe CP, It is in the range of 0X0000 to 0XFFFF (64 TO). elder 16 By this space (the address 0XC000 in 0XFFFF) reserved for the page memory, and managed paged multiplexer D7. For this and signals A15_CP A14_CP, are two older address bus signals, integrated logic "OR", formed on the resistor R10 and diodes VD1, VD2. When accessing the upper memory page and both of A15_CP A14_CP signal are in "1" state and the voltage at the control input of the multiplexer paging high, so he switched to the mode «B» and its outputs (circuit A17, A16, A15, A14) signals present MUXA17, MUXA16, MUXA15, MUXA14, determining the number of memory pages attached. When referring to any other page of memory page multiplexer switched to «A» mode and at its outputs (circuit A17, A16, A15, A14) there is a direct memory access address (corresponds numerically 0:0:A15_CP:A14_CP).

Meaning lowest address when accessing the RAM is rewritten into register latch-D6 younger addresses on the rising edge of signal ALE. Reading is an activation signal RD ~, and post - activation signal WR ~.

Block emulator musical coprocessor executed on the microcontroller D8 ATTINY2313A-SU (possible replacement – ATTINY2313-20SU), body SOIC-20, and is a standalone device, connectable to connector XP3 main board using the connector XS6.

The apparatus has two output audio signal - the left and right channel. The audio signal generated by pulse width modulation (Prosperity). On R44 cells, R46 and C22 LPF implemented right, and on elements of the R43, R45 and C21 - the left channel. Quartz crystal BQ2 provides the oscillation frequency at the first harmonic series resonance 28 MHz. In this case, the microcontroller operates in the "acceleration" mode, and, as practice shows, absolutely sustainable. The device is powered from + 5V circuit baseboard, Capacitors C23 and C24 act as additional power filters.

management interface emulator consists of eight-unidirectional data bus (signals A15_CP, A14_CP, A13…A8) and control bus, including a circuit BC1 and BDIR, similar to the destination of the same name signals AY8910(12).

Despite, the real musical coprocessor AY8910(12) It has 3 sound channel A, AT, WITH, emulator are only two: L and R. Channel A is connected to the left L, channel C of the right hand R, In a software channel is divided and mixed between channels L and R. Also, a signal beeper, input to the microcontroller input PD4 (signal / BEEP), software is divided and mixed between channels L and R. Thus is formed a ready stereo output.

3. Assembly

Although properly assembled and programmed device starts to work immediately after power, there is a certain sequence of assembly, which will help to avoid errors, related to the installation and fault elements. When installing you should follow some rules, which will help to avoid the output elements of the system:

  1. should be used when brazing solder with a low melting point, soldering tip temperature should not exceed 300 ° C;
  2. soldering tip should be securely grounded;
  3. when soldering is to be used wrist strap;
  4. The workplace should be well lit.;
  5. After each assembly operation is necessary for the tester to check the continuity test mode assembly mounted to the absence of a short circuit,, especially between adjacent pin chips and between the supply circuits;
  6. After each assembly operation is recommended to wash away traces of flux (kanifoli) with board alcohol-gasoline blend and dry thoroughly fee;
  7. Working with SMD mounting, on a suitably equipped workplace with good lighting;
  8. When assembling, use the assembly drawing (Cm. picture 3).

Before you begin, you must carefully check the PCB for the absence of technological defects (continuity and circuits printed conductors poor metallization vias), especially in places, that the installation will be hidden body member, so after installation will make it much harder to. Circuit board should have a view in accordance with figure 2

Picture 2 - PCB views (upper and lower sides)

2

rice. 2 (a)

3

rice. 2 b

3

rice. 3.

Picture 3 - assembly drawing board

Assembling keyboard controller unit

Replace the elements XS5 PCB, Cl6, C1, C4, C6, R11, R17, R26, BQ1, D4. When installing, use the assembly drawing (Cm. picture 3).

Note - microcontroller D4 before installing the board to be programmed. Programming instructions, see. in the "Programming" section.

Check the board for short circuits and are connected to the power supply connector XS5 + 5V. The power supply can be used with the charger cable mini-USB connector. When a tester check that the supply voltage at terminal 20 D4 of the microcontroller - it should be in the range of 4,8 to 5,2 AT. Check the voltage at terminal 6 D4 of the microcontroller (output clock frequency) - it should be in the range of 2,3 to 2,7 AT. you need to find and eliminate the fault If these requirements.

Assembling the video block and video block formation






Replace the PCB elements R1…R9, R12…R15, R20…R24, R27…R33, R35…R41, C3, C5, D1, VD3…VD5, VT1…VT5, XP1. To contact K7 (overall) и K6 (video output) RCA connector solder technology (Female) "Tulip". Check the board for short circuits. For further work will need a video device with a standard video input (TV set, TVtyuner, monitor with a standard video input) and programmer type ByteBlaster MV (http://www.zx-kit.ru/katalog-1/zxkit-003-1). Connect the power to the device and make GPU programming (Programming instructions, see. in the "Programming" section). Adjust the monitor to the video input and connect the video output device. On the screen in black and white image to be observed, a similar figure. 4

The image must be clearly the synchronized, the image field must be clearly expressed rectangular shape, We must be different shades of gray and curb. Also in the image field must be present to effect fibrillation - the change of image on the direct and inverse inversely with frequency of the order 4 Hz. Allowed to change the border color and the color of the logo Developer «LISITSINDEVELOPMENT» in the top field border. If these requirements are not met, should find and repair.

Disconnect the device from the monitor and power source.

Picture 4 - devices without video RAM block.

4

rice. 4.

Assembling RAM block

Replace the PCB elements R10, VD1, VD2, C7, D5, C8, C9, D6, D7.

Connect with short output conductors 1 and output 5 D7 paging multiplexer to the common bus (GND). This will enable the multiplexer D7 of the page mode and fix the address A16 of RAM. Check the board for short circuits.

Connect the device to the monitor and power source. On the screen in black and white image to be observed, a similar figure. 5

Picture 5 - devices with video RAM unit and without a central processor unit

5

rice. 5.

We should be observed clearly pronounced rectangular video field borders and border. The image must have a stable horizontal and vertical synchronization. There is a breakdown of the image on familiarity. Within each there must be a constant familiarity grayscale color of the paper and ink, picture (familiarity filling) It should be the same. At the same time allowed the flicker of familiarity with the frequency of the order 4 Hz. We must be different shades of gray. Allowed to change the border color. When non-compliance with these terms and conditions necessary to make troubleshooting.

Disconnect the device from the power supply and monitor. Unsolder Guides, paging terminals connecting to the common bus multiplexer.

Assembling the central processor unit

Replace the elements R18 PCB, R19, R42, C10…C15, D2, DA1, XP2, XP3, XS1 and XS3. Check the board for short circuits.

Connect the device to the programmer through the connector and make XP2 CPU programming (Programming instructions, see. in the "Programming" section).

after programming, if there was no error allowed, the device starts to work. The screen will appear after the start of the image in accordance with the selected model ZX Spectrum (Cm. rice. 6 - the main menu Pentagon 128). To verify that you can perform load tests and other software "with tape" or micro-SD card. If the tests and the programs are executed correctly, you can proceed to the assembly of musical coprocessor emulator AY8910.

6

rice. 6.

block assembly emulator musical coprocessor

Emulator musical coprocessor AY8910(12) He is going on a separate board (Cm. rice. 3), which comes complete with a main board.

Replace the elements C17 PCB…C24, R44…R46, BQ2, D8, XS6. Check the board for short circuits.

Note - microcontroller D4 before installing the board to be programmed. Programming instructions, see. in the "Programming" section.

Note 2 - As the crystal oscillator instead of the above in Scheme DSX321G 28 MHz is possible to use a quartz resonator HC49US 28 MHz (quartz resonator requires, operating the primary resonance frequency), which is set in position BQ2 * card.

-Plug collected fee to XS6 mainly through the connector as shown in Figure title.

If the unit emulator of musical coprocessor has been assembled correctly and all the elements are OK - it starts to work immediately after power-up and does not require adjustment.

4. Connecting device and Function Check

To connect AVRZXSpectrumV2_0 to obtain a color image requires a video device (monitor) with RGBvhodom, a video device with a standard video input PAL chrominance encoder and (SECAM). AVRZXSpectrumk to connect a VGA monitor needs RGB-VGA converter (For example, http://www.zx-kit.ru/katalog-1/zxkit-001).

Connecting AVRZXSpectrumV2_0 should be performed in accordance with the table 1, using rice. 3

After connecting to the video device, connect the keyboard connector XS1. For convenience, you can stick the labels on the keys for the keyboard ZXSpectrum, printed on self-adhesive paper (the image file is in the project folder).

For connection to a "tape recorder" audio cable is required, "Jack 3,5 - Jack 3.5 ", whereby the connector XS3 is joined to the input or output "tape", as which may be any audio device with linear output (entry). When working with audio equalizer should be switched off and all sound effects.

By connector XS2 (audio output) connected active computer speakers or LF amplifier input, operating on the column. You can also connect high-impedance headphones.

Table 1

Contact card appointment signal Contact SCART Note
K1 RGB ON 16 Switching video sources to RGB (for SCART)or the supply circuit +5 AT (PAL encoders (SECAM)). When working with PAL encoder(SECAM) replace with resistor R36 jumper.
K2 SYNC 20* The synchronization signal
KH3 BLUE 7 Blue color component
K4 RED 15 The red color component
K5 GREEN 11 Green color component
K6 GND 4,5,9,13,17 The total chain
K7 VIDEO 20* Output video signal BW
K8 LEFT 6 The output of the left channel audio
K9 RIGHT 2 Exit right audio channel

* At clock input SCART (conclusion 20) signal fed from the output of the synchronization device SYNC or with its video output BW, depending on the type of monitor.

At least the connector XS5 connect an external power supply (For example, charger cable connector mini-USB), which occurs stitched start system.

Working with AVRZXSpectrumV2_0 is no different from working with conventional ZXSpectrum, so any related issues can be obtained from numerous books on ZXSpectum. To enable testing can be downloaded and pass such tests, how TESTPROG, tender, Z80TESTS, ZEXALLi t. P. Download these tests can be like a "tape recorder" entry, and with SDkarty (Cm. "Working in SDDOS» section).

Work in SD DOS.

Disk Operating System SD DOS is designed to work with the card micro-SD memory as an external drive. micro-SD memory card for use in SD DOS must first be formatted with the FAT32 file system and record it on ZX Spectrum files to a supported format. Currently supported file formats and .Z80 .SNA. The list of supported formats, expanding files.

Start SD DOS happens when you press the keyboard «F12» keys. In this case, if the memory card is not inserted, appears on the screen «INSERT SD CARD» to insert the card into the connector. Once the card is inserted, It begins a dialogue with it at the hardware level. Result dialog is displayed on the screen. So, For example, you can see the message «SD CARD DETECTED», informing about detection of the memory card, Message «INITIALISING … OK »says the normal completion of the initialization process of the SD card, Message «FAT32 DETECTED» speaks, that the FAT32 file system is detected. At the end of a system of dialogue with the card the message «STARTING COMMANDER … », preceding the start of the program SD Commander, tool works with files (Cm. rice. 7).

7

rice. 7 - Start File Manager SD Commander

SD Commander is a two panel navigation (left and right) file system (files and directories). It displays the list of files in the selected directory (default - in the root directory). Navigating through directories and files is carried out using the "down" keys (next file), "up" (the previous file or the previous level of investments), "Right" (transition in the right panel), "Left" (shift to the left panel), «ENTER» (selection of a file or directory). In this way, to run the file, you must go to him on the way, and select it by pressing «ENTER».

To save the file to the card in .SNA format necessary to the desired point in time, press and release the F11 key, then press F12. When prompted to enter a file name with extension .SNA. The saved file appears in the current directory.

The SD DOS also provides the following operations on files / directories: renaming (F4), displacement (F6), removal (F8), creature ( F7 – for directories).

SD DOS function expands, It is intended to support the most common file formats for the ZX Spectrum and all standard file management operations, also it planned to support all SD DOS functions at the level of Z80 type EDhh teams, not employed in the microprocessor Z80. It is also planned to feature changing AVR ZX Spectrum software from a memory card, by running the ROM-file, to be recorded on the memory card to the internal memory of the CPU FLASH, which will not only update software, but also download other versions of the ZX Spectrum-compatible machines. For the latest software versions, and the new SD DOS functions can learn from the developer (contacts at the end of the article).

5. Programming

In Scheme four AVR microcontroller device, requiring programming. Two of them - D4 controller and keyboard controller emulator musical coprocessor the D8 - programmed to be mounted on board, and the remaining two - D1 video processor and a central processor programmed D2 after installation on board through specially provided connectors for in-circuit programming XP1 and XP2 respectively.

When programming is required in-system programming, using ISP-interface - signals MOSI? MISO, SCK and RESET. A possible scheme programmer, connects to a computer via an LPT port, shown in Figure 8 (http://www.zx-kit.ru/katalog-1/zxkit-003-1).

Picture 8 – LPT programmer circuit ByteBlaster MV

6

rice. 8.

Programming scheme is made based ALTERA ByteBlaster MV (http://www.altera.ru/cgi-bin/go?35)
and adapters for AVREAL program (http://real.kiev.ua/old/avreal/ru/adapters.html).
additional connector standard ATMEL displayed for microcontroller EEPROM ATMEL.
It applied the same plume desyatizhilny, which is connected to a corresponding pair of connectors.
Power programmer board is taken from a stitched card.

Programming will be connected via a connector XP2 (ALTERA). As the program can be used Ponyprog or AVREAL. The programmer requires supply voltage of + 5V, in which case, D4 ​​and D8 fed from an external programming stabilizer, and in case of D1 and D2 is supplied programming from the board AVR ZX Spectrum, connected to a power source.

For firmware D4 keyboard controller and controller emulator D8 musical coprocessor will use the files ... \ Soft Keyboard Controller (D4)\ zxkeyboard_v2_0.hex и … \\Soft Emulator AY (D8)\ AY_Emul.bin respectively. These modules are written in the FLASH memory of the microcontroller, and are executable programs. EEPROM programming is required. The configuration bits must be set in accordance with Table 2

Table 2 - configuration bits D4 and D8 controllers

configuration bits The controller

D4 *

Comment The controller

D8 *

Comment
LOCK1 ~ protection

at your discretion

~ protection

at your discretion

LOCK2 ~ ~
DWEN
EESAVE ~ EEPROM is not used ~ EEPROM is not used
REPENT V Default SPI allowed V Default SPI allowed
WDTON WDT is not used WDT is not used
BODLEVEL2 Reset to reduce the supply voltage

included

Reset to reduce the supply voltage

included

BODLEVEL1 V V
BODLEVEL0 V V
RSTDISBL Default Default
CKDIV8 Frequency division off Frequency division off
CKOUT V Yield clock allowed
SUT1
SUT0 V
CKSEL3  

Configured external crystal resonator

 

Configured external crystal resonator

CKSEL2
CKSEL1
CKSEL0 V

* «V» means the active (programmed, «0»), «-» – inactivity (not programmed, «1»), configuration status bits, «~» – at the discretion of the user.

When programming the video D1 and D2 programmer CPU is connected to the connector XP1 and XP2 sootvetstven6no and fed to a device supply voltage. In the FLASH memory D1 sutured file ... \ Soft Video Processor (D1)\videocpu.hex from the project folder, in FLASH memory D2 sutured one of the files ... \ Soft The CPU (D2)\Pentagon128.hex (ZX_Spectrum_48K.hex, ZX_Spectrum_128K.hex, Open_se_basic 48 К.hex, Open_se_basic 128 К.hex) from the project folder, depending on the desired model ZX Spectrum. Besides, the EEPROM D2 sutured file …\\ CPU (D2) \DAA_TABLE.hex from the project folder, which is a table of results and flags for emulation command DAA Z80.

When the firmware is also installed (programmed, «0») The following configuration bits (same for D1 and D2): EESAVE, BOOTRST, CKSEL3, CKSEL2, CKSEL1, CKSEL0.

Note - when programming D1 D2 recommended to set a reset mode setting jumpers on pins 5 and 6 XP2 connector, and when D2 D1 programming recommended to set a reset mode setting jumpers on pins 5 and 6 connector XP1.

6. Feedback

If you have any comments, suggestions for the improvement of the device, or questions to the developer, please write to Vasil.lisitsin@yandex.ru.

Ready to buy the device or printed circuit board for self assembly AVR ZX Spectrum V2_0 possible developer, Email Vasil.lisitsin@yandex.ru, ICQ 615692808, Basil Lisitsyn. Also, the author can learn about the latest versions of the software and the new features of your device, get advice on assembly, Programming device and troubleshooting.

The author expresses his gratitude to Ivan Kosarev (St. Petersburg), Igor Titar (Magnitogorsk) and participants Zx.pk.ru for assisting in the development of the project.

AVR ZX Spectrum V2_0 topAVR ZX Spectrum V2_0AVR ZX Spectrum V2_0 bottomThe author expresses his gratitude to Ivan Kosarev (St. Petersburg), Igor Titar (Magnitogorsk) and participants Zx.pk.ru for assisting in the development of the project.

Archive of the project:

[hidepost] Download [/hidepost]

Video of Radiokonstruktore AVR ZX Spectrum V2_0:

9 Comments

  1. At present, the AVR ZX Spectrum supports TR-DOS. The latest firmware version can be found here: http://zx-pk.ru/showthread.php?t=23671&page=8
    To open the disc TR-DOS disk is necessary through SD-DOS operating system (which is also supported) select the image TR-DOS disk file with the extension .TRD on request SD-DOS specify one of 4 drives, in which the disc is inserted – A, B, C or D. Further – TR-DOS to run any standard manner for the ZX Spectrum (through the main menu or from the BASIC). Next, instruct the TR-DOS. for example, List – to view the disk directory, Load – to download from the disk, Load “Filename” – to run a file called Filename.
    Video:

    • TurboSound module interface Kempston joystick for AVR ZX Spectrum has successfully developed, project is supported, wishing to purchase contact the developer)

  2. once everything is done on new element base? and then connect to the TV, it is desirable to make cordless, say over Wi-Fi.

Leave a Reply

Your email address will not be published.