TNS HC-08

TNS HC-08 (Also called Home computer 8bit.Computer was manufactured from 1988 by JZD AK Slušovice.) Also called Home computer 8bit.Computer was manufactured from 1988 by JZD AK Slušovice. The computer was inspired by or was successor to TNS GC. Hardware is based on U880D @ 3 MHz.Operating system running on the computer: TNS-DOS(TurboDOS).

Contents
Parts of this topic may be machine translated.

About 4,000 units were produced (according to the HC-16 authors).

Connectable to the TNS-NET network, the HC-08 enables system booting over the network.

Keyboard identical to TNS HC-16.

Variants

Periphery

BootROMs

A total of 3 variants have survived:

For variants with two 2716 memories, the first is from address 0x0000, the second from address 0x1000 (i.e. there is a gap, apparently due to the plan for a larger circuit). The code first copies the contents to RAM, then the ROM is disconnected from the memory range.

Bootloader Description

The TNS-HC bootloader loads the OS from diskettes (drives 0, 1) or from the network (fast line - UPP-NET, slow line - current loop of A/B channels via ASK/QASK). Fast line and channel A share the same HW, so cannot be used at the same time; only one variant according to the switches is always active.

After the reset, the bootloader prints the header and automatically tests the disks (0 → 1). If it finds the floppy, it tries to load OSBOOT; on success it loads SYS.SYS and passes control to the OS, on failure the system freezes. If it does not find the diskettes, it will prompt you to select a source.

Challenge:

xxx asks where to boot from (A,B,L,X,Y,0-31 + Take) ?

Choices:

Bootloader always tests floppies first; this step can be skipped by holding down the option at the same time as RESET, which will immediately use the desired resource.

When typing, an error can be corrected with the [<-] key.

The presence of a diskette does not mean that it is usable - the decisive factor is the successful loading of OSBOOT and SYS.SYS.

Examples

📋Loader TNS (FWLP) - in 1.2 JZD Slušovice 1989


Floppy 0
Floppy 1
003 asks where to introduce (A,B,0-31 + Take) ? 2
The line is connecting...ok
reading the operating system ... ddd
I'm handing over control to OS

TNS HC-08 Bootloader - Technical documentation

HC-08 v1.2 bootloader binary image analysis (MD5: c7e98595cb45e562e8613a67110a50f4),

2×2 kB EPROM (TNSROM1 + TNSROM2), JZD Slušovice 1989.

Overview of Bootloader Subroutines

Address Name Description
------- ---------------------- --------------------------------------------------------------------
0x0000 reset_vec Initialization vector in ROM; set PPI, test bit
and decides whether to boot from RAM or jump directly.
0x0124 reset_ram_start Main initialization after moving code to RAM.
It verifies the memory CRC, initializes the HW, displays the banner.
0x01DF get_boot_option Reads an option from the keyboard (BDOS call C=3).
0x01E5 init Initialization: PPI ports 0x12/0x2B, memory-mapper,
screen clearing, banner listing.
0x025A do_netboot_selected Prints the line name and calls netboot.
0x0267 boot_from_floppy Boot the OS from a floppy disk (retry 5x).
0x02EE reloc_bootcode_restart Relocation: copy 0x2400 B from 0x2400 → 0x0100, restart.
0x0302 parse_decimal_str Parsing the number 1-3 digits from the text buffer.
0x036C print_dollarstr Set C=9, fall into bootromdoscall.
0x036E bootromdoscall Mini-BDOS dispatcher (C=1,2,3,9,0Ah).
0x038A kbd_input Blocking key read + echo.
0x039C aux_input Non-blocking keyboard test.
0x03A5 print_until_dollar Print string to '$' character.
0x03B1 read_cons_buf Reading a line from the console (CP/M buffer format).
0x04D4 bgd_clear Clear video RAM (0xF580-0xFFFF).
0x04E9 putchar Character dump; LF/CR/BS/FF, scrolling.
0x0530 kbdscan Scan keyboard matrix (17 columns, ports 0x11–0x21).
0x0543 getkey Blocking key reading + debounce.

FDC - Disk Drive (WD2797)

Address Name Description
------- ---------------------- --------------------------------------------------------------------
0x0610 floppy_routine Main FDC dispatcher: init/read/info by (IX+0).
0x069F fdc_select_and_spinup Unit selection (port 0x14), waiting for motor spinup.
0x06DE fdc_motor_off Motor off (port 0x14 = 1), byte_79B = 0xFF.
0x06FF fdc_check_diskette Diskette presence test.
0x070E fdc_read_sector Read sector via WD2797.
0x0730 fdc_read_to_buffer Read data from FDC to buffer (INI instruction, port 0x1B).
0x0752 fdc_send_cmd_wait Writing command to WD2797 + waiting for completion.
0x075B fdc_wait_drq Waiting for DRQ/end of operation; timeout = reset 0xD8.
0x0772 fdc_save_track_regs Backup 4B of track/page parameters to unk_797.
0x077F fdc_restore_track_regs Restoring parameters from unk_797 back to 0x66.
0x078C delay_ms_loop Delay loop (E × 0xBB iterations).

= Tables of sequence numbers =

unk_92E[64]: RX table - next expected sequence from each node (0-63)
Initialization: 0x80 (uninitialized = always accept)
unk_974[64]: TX table - next sequence when transmitting to each node
Initialization: 0x40 (uninitialized)

= Overview of TNS-NET subroutines =

Address Name Description
------- --------------------------------------------------------------
0x07D1 netboot Main net boot function.
0x09B4 sio_fast_line_init Initialize SIO-A for TNS-NET.
0x09D0 sio_receive_or_ack RX/TX dispatcher for fast line.
0x09E8 delay_network_slots Delay loop (backoff, HL timeslots).
0x09F5 sio_poll_and_decode_frame Polling SIO RX + frame decoding, timeout 200.
0x0AD4 sio_transmit_packet Send packet: TX enable, address, data.
0x0B1A sio_random_backoff Random backoff on collision (via R register).
0x0B29 sio_receive_ack_frame Waiting for ACK frame from SIO-A.
0x0B73 sio_send_with_ack Send + wait for ACK, retries on collision.
0x0B7F sio_send_frame Send the entire data frame (OUTI by byte).
0x0BBA sio_decode_incoming Decode received frame from SIO-A.
0x08B4 net_transceive Sending/receiving a network packet (2x call lines).
0x08D0 net_print_block_counter Print a 3-digit block counter to the console.
0x0901 net_setup_node_params Address and channel initialization from DIP switches.
0x091E net_call_tx_init Indirect jump via unk_2211 (line init).
0x0922 net_call_rx_tx Indirect jump via unk_2213 (RX/TX lines).

= Overview of Slow Line Subroutines =

Address Name Description
------- ---------------------------------------------------------------
0x0D3C serial_init_channel SIO + CTC initialization for slow link.
0x0D83 serial_rx_tx_block Receive or transmit block (C=0 TX, C≠0 RX).
0x0DDB serial_send_ctrl_byte Send control byte (ACK/NAK) to SIO data port.
0x0E5F serial_tx_fsm TX state machine (6 states, frame bytes 1 each).
0x0EB6 serial_rx_fsm RX state machine (7 states, SOH detection, data, CRC).
0x0F48 serial_check_ack_nak Test if received byte is ACK (0x06) or NAK (0x15).
0x0F54 serial_bit_delay Delay loop for bit timing.
0x0F61 crc16_compute Compute CRC-16 (nibble XOR, input HL/B/DE).
0x0F8C serial_setup_tx_buffer TX/RX buffer setup (shift of pointers by 4 B).

= TX state machine (unk_22E4) =

State 1 → SOH came out (0x01) → state 2
State 2 → They released SEQ (unk_22E7) → state 3
State 3 → Bytes out of buffer (unk_22E0→22E2) → state 3 (loop)
After empty buffer → state 4
State 4 → ~CRC_LO (complement unk_22E5) → state 5 exited
State 5 → ~CRC_HI (complement unk_22E6) → state 6 came out
State 6 → Reset state (end of frame)

= RX state machine (unk_22D9) =

State 0 → Idle: SOH/ACK/NAK detection
State 1 → After command: waiting for ACK → state 2
State 2 → Receives SEQ → unk_22DC → state 3
State 3 → Accepts length + sets buffer; if 0 → retry
State 4 → Receives data bytes into unk_22D5 (incrementing ptr)
State 5 → End of data (signal for outer loop)
State 6 → Receive CRC_LO → unk_22DA, CRC_HI → unk_22DB → state 0

RAM Map (0x2200–0x22FF)

Address Length Name Description
------- ------ ------------------ ----------------------------------------------------
0x2200 14 B stack Stack + work area (IX parameters)
0x220E 2 B floppy_driver_ptr Pointer to the floppy driver function
0x2210 1 B hw_node_address Node address from DIP switches (port 0x11)
0x2211 2 B net_tx_init_ptr Pointer to line init function
0x2213 2 B net_rx_tx_ptr Pointer to RX/TX line function
0x2215 2 B boot_sel_title Pointer to a string with the line name
0x2217 1 B net_packet_type Packet type / mode flag
0x2218 1 B net_dest_node Destination node address for boot
0x221B 1 B net_own_node Own node address (bits 4:0 of 0x2210)
0x221C 1 B net_channel_num Channel number (from bits7:5, rotated +1)
0x22CC 1 B serial_ch_select 0=channel A (SIO-A), 1=channel B (SIO-B)
0x22CD 1 B serial_ctc_port CTC port (0x04 or 0x01)
0x22CE 1 B serial_data_port SIO data port (0x0C or 0x0D)
0x22CF 1 B serial_status_port SIO status port (0x0E

Computers derived from TNS HC-08

The following computers were inspired by or derived from TNS HC-08:

References