zeal8bit / zeal-8-bit-os Goto Github PK
View Code? Open in Web Editor NEWAn Operating System for Z80 computers, written in assembly
License: Apache License 2.0
An Operating System for Z80 computers, written in assembly
License: Apache License 2.0
With default config:
Building packer
make[1]: Entering directory '/mnt/d/Projects/Zeal-8-bit-OS/packer'
gcc pack.c -o pack -std=c99 -W
make[1]: Leaving directory '/mnt/d/Projects/Zeal-8-bit-OS/packer'
Executing pre commands...
Compiling for TRS-80!
/usr/local/bin/z88dk-z80asm -Iinclude/ -Itarget/trs80/./ -Itarget/trs80/./include -Obuild target/trs80/linker.asm
/usr/local/bin/z88dk-z80asm -Iinclude/ -Itarget/trs80/./ -Itarget/trs80/./include -Obuild kernel/rst_vectors.asm
/usr/local/bin/z88dk-z80asm -Iinclude/ -Itarget/trs80/./ -Itarget/trs80/./include -Obuild kernel/boot.asm
/usr/local/bin/z88dk-z80asm -Iinclude/ -Itarget/trs80/./ -Itarget/trs80/./include -Obuild kernel/drivers.asm
/usr/local/bin/z88dk-z80asm -Iinclude/ -Itarget/trs80/./ -Itarget/trs80/./include -Obuild kernel/strutils.asm
/usr/local/bin/z88dk-z80asm -Iinclude/ -Itarget/trs80/./ -Itarget/trs80/./include -Obuild kernel/disks.asm
/usr/local/bin/z88dk-z80asm -Iinclude/ -Itarget/trs80/./ -Itarget/trs80/./include -Obuild kernel/vfs.asm
/usr/local/bin/z88dk-z80asm -Iinclude/ -Itarget/trs80/./ -Itarget/trs80/./include -Obuild kernel/time.asm
/usr/local/bin/z88dk-z80asm -Iinclude/ -Itarget/trs80/./ -Itarget/trs80/./include -Obuild kernel/log.asm
/usr/local/bin/z88dk-z80asm -Iinclude/ -Itarget/trs80/./ -Itarget/trs80/./include -Obuild kernel/syscalls_nommu.asm
/usr/local/bin/z88dk-z80asm -Iinclude/ -Itarget/trs80/./ -Itarget/trs80/./include -Obuild kernel/loader_nommu.asm
/usr/local/bin/z88dk-z80asm -Iinclude/ -Itarget/trs80/./ -Itarget/trs80/./include -Obuild kernel/fs/rawtable.asm
/usr/local/bin/z88dk-z80asm -Iinclude/ -Itarget/trs80/./ -Itarget/trs80/./include -Obuild kernel/fs/zealfs.asm
/usr/local/bin/z88dk-z80asm -Iinclude/ -Itarget/trs80/./ -Itarget/trs80/./include -Obuild target/trs80/video.asm
/usr/local/bin/z88dk-z80asm -Iinclude/ -obuild/os.bin -b -m -s build/target/trs80/linker.o build/kernel/rst_vectors.o build/kernel/boot.o build/kernel/drivers.o build/kernel/strutils.o build/kernel/disks.o build/kernel/vfs.o build/kernel/time.o build/kernel/log.o build/kernel/syscalls_nommu.o build/kernel/loader_nommu.o build/kernel/fs/rawtable.o build/kernel/fs/zealfs.o build/target/trs80/video.o
kernel/vfs.asm:164: error: undefined symbol: zos_sys_remap_bc_page_2
^---- zos_sys_remap_bc_page_2
kernel/vfs.asm:311: error: undefined symbol: zos_sys_remap_de_page_2
^---- zos_sys_remap_de_page_2
kernel/vfs.asm:356: error: undefined symbol: zos_sys_remap_de_page_2
^---- zos_sys_remap_de_page_2
kernel/vfs.asm:449: error: undefined symbol: zos_sys_remap_de_page_2
^---- zos_sys_remap_de_page_2
kernel/vfs.asm:490: error: undefined symbol: zos_sys_remap_user_pages
^---- zos_sys_remap_user_pages
kernel/vfs.asm:622: error: undefined symbol: zos_sys_remap_de_page_2
^---- zos_sys_remap_de_page_2
kernel/vfs.asm:719: error: undefined symbol: zos_sys_remap_de_page_2
^---- zos_sys_remap_de_page_2
kernel/vfs.asm:749: error: undefined symbol: zos_sys_remap_de_page_2
^---- zos_sys_remap_de_page_2
kernel/vfs.asm:847: error: undefined symbol: zos_sys_remap_de_page_2
^---- zos_sys_remap_de_page_2
kernel/vfs.asm:975: error: undefined symbol: zos_sys_remap_de_page_2
^---- zos_sys_remap_de_page_2
kernel/time.asm:217: error: undefined symbol: zos_sys_remap_de_page_2
^---- zos_sys_remap_de_page_2
make: *** [Makefile:92: all] Error 1```
i'm having problems installing the dependencies to compile an iso.
I compiled the OS + ROMdisk, producing os_with_romdisk.img, which loads and runs flawlessly in the emulator. However, after flashing the board with the same image, the computer hangs while booting the new OS.
The image is available here. It's configured to boot and run zorth.bin
.
This is the dialog in the bootloader section (57.600, 8 bit, 1 stop bit, no parity):
Zeal 8-bit Computer bootloader v1.2.1
...
Enter your choice: a
Numbers must be provided in hexadecimal
New entry name (max 32 chars): Zorth
22-bit physical address, aligned on 16KB: 4000
16-bit virtual address: 0
Entering menu. Please select an option:
1 - Boot Zeal 8-bit OS (0x004000 -> 0x0000)
2 - Boot Zorth (0x004000 -> 0x0000)
p - Load program from UART
a - Add a new entry
d - Delete an existing entry
s - Save configuration to flash
b - Change baudrate
f - Flash/Program the ROM
q - Quick format I2C EEPROM (ZealFS)
t - Test hardware
Enter your choice: f
Numbers must be provided in hexadecimal
ROM address to flash, aligned on 4KB: 4000
Binary size: c70d
Please, send file...
Flashing in progress, do not turn off...
Entering menu. Please select an option:
1 - Boot Zeal 8-bit OS (0x004000 -> 0x0000)
2 - Boot Zorth (0x004000 -> 0x0000)
p - Load program from UART
a - Add a new entry
d - Delete an existing entry
s - Save configuration to flash
b - Change baudrate
f - Flash/Program the ROM
q - Quick format I2C EEPROM (ZealFS)
t - Test hardware
Enter your choice: 2
Now booting Zorth
That is as after as it goes.
env:
make output:
errors_h.asm:1: error: syntax error
^---- ../../../include/errors_h.asm
ls.asm:73: error: undefined symbol: ERR_NO_MORE_ENTRIES
^---- ERR_NO_MORE_ENTRIES
errors_h.asm:1: error: syntax error
^---- ../../../include/errors_h.asm
errors_h.asm:1: error: syntax error
^---- ../../../include/errors_h.asm
errors_h.asm:1: error: syntax error
^---- ../../../include/errors_h.asm
errors_h.asm:1: error: syntax error
^---- ../../../include/errors_h.asm
errors_h.asm:1: error: syntax error
^---- ../../../include/errors_h.asm
errors_h.asm:1: error: syntax error
^---- ../../../include/errors_h.asm
errors.asm:10: error: undefined symbol: ERR_NO_MORE_ENTRIES
^---- ERR_NO_MORE_ENTRIES
errors.asm:105: error: undefined symbol: ERR_FAILURE
^---- ERR_FAILURE
make[1]: *** [Makefile:13: all] Error 1
make[1]: Leaving directory '/home/buff/projects/asm/Zeal-8-bit-OS/target/zeal8bit/romdisk'
make: *** [Makefile:106: precmd] Error 2
l think Micro is not support, but l aleardy use the last version z88dk
When I Enable Video Driver
buut use UART Driver
Aas standard output, I got an error:
~/Zeal-8-bit-OS > make 09/01/2023 08:24:06 AM
Building packer
make[1]: Entering directory '/home/jasonmo/Zeal-8-bit-OS/packer'
gcc pack.c -o pack -std=c99 -W
make[1]: Leaving directory '/home/jasonmo/Zeal-8-bit-OS/packer'
Executing pre commands...
make[1]: Entering directory '/home/jasonmo/Zeal-8-bit-OS/romdisk'
rm -rf build/ disk.img
No extra file to pack into romdisk
Creating romdisk...
z88dk-z80asm -I/home/jasonmo/Zeal-8-bit-OS/kernel_headers/z88dk-z80asm -Obuild -m -b init.asm parse.asm ls.asm less.asm opt.asm mkdir.asm cd.asm rm.asm errors.asm uart.asm strutils.asm date.asm cp.asm misc.asm hexdump.asm
Packing the files
pack disk.img build/init.bin simple.txt
make[1]: Leaving directory '/home/jasonmo/Zeal-8-bit-OS/romdisk'
z88dk-z80asm -Iinclude/ -Itarget/zeal8bit/./ -Itarget/zeal8bit/./include -Obuild target/zeal8bit/linker.asm
z88dk-z80asm -Iinclude/ -Itarget/zeal8bit/./ -Itarget/zeal8bit/./include -Obuild kernel/rst_vectors.asm
z88dk-z80asm -Iinclude/ -Itarget/zeal8bit/./ -Itarget/zeal8bit/./include -Obuild kernel/boot.asm
z88dk-z80asm -Iinclude/ -Itarget/zeal8bit/./ -Itarget/zeal8bit/./include -Obuild kernel/drivers.asm
z88dk-z80asm -Iinclude/ -Itarget/zeal8bit/./ -Itarget/zeal8bit/./include -Obuild kernel/strutils.asm
z88dk-z80asm -Iinclude/ -Itarget/zeal8bit/./ -Itarget/zeal8bit/./include -Obuild kernel/disks.asm
z88dk-z80asm -Iinclude/ -Itarget/zeal8bit/./ -Itarget/zeal8bit/./include -Obuild kernel/vfs.asm
z88dk-z80asm -Iinclude/ -Itarget/zeal8bit/./ -Itarget/zeal8bit/./include -Obuild kernel/time.asm
z88dk-z80asm -Iinclude/ -Itarget/zeal8bit/./ -Itarget/zeal8bit/./include -Obuild kernel/log.asm
z88dk-z80asm -Iinclude/ -Itarget/zeal8bit/./ -Itarget/zeal8bit/./include -Obuild kernel/syscalls.asm
z88dk-z80asm -Iinclude/ -Itarget/zeal8bit/./ -Itarget/zeal8bit/./include -Obuild kernel/loader.asm
z88dk-z80asm -Iinclude/ -Itarget/zeal8bit/./ -Itarget/zeal8bit/./include -Obuild kernel/fs/rawtable.asm
z88dk-z80asm -Iinclude/ -Itarget/zeal8bit/./ -Itarget/zeal8bit/./include -Obuild kernel/fs/zealfs.asm
z88dk-z80asm -Iinclude/ -Itarget/zeal8bit/./ -Itarget/zeal8bit/./include -Obuild target/zeal8bit/uart.asm
z88dk-z80asm -Iinclude/ -Itarget/zeal8bit/./ -Itarget/zeal8bit/./include -Obuild target/zeal8bit/pio.asm
z88dk-z80asm -Iinclude/ -Itarget/zeal8bit/./ -Itarget/zeal8bit/./include -Obuild target/zeal8bit/i2c.asm
z88dk-z80asm -Iinclude/ -Itarget/zeal8bit/./ -Itarget/zeal8bit/./include -Obuild target/zeal8bit/keyboard.asm
z88dk-z80asm -Iinclude/ -Itarget/zeal8bit/./ -Itarget/zeal8bit/./include -Obuild target/zeal8bit/romdisk.asm
z88dk-z80asm -Iinclude/ -Itarget/zeal8bit/./ -Itarget/zeal8bit/./include -Obuild target/zeal8bit/mmu.asm
z88dk-z80asm -Iinclude/ -Itarget/zeal8bit/./ -Itarget/zeal8bit/./include -Obuild target/zeal8bit/interrupt_vect.asm
z88dk-z80asm -Iinclude/ -Itarget/zeal8bit/./ -Itarget/zeal8bit/./include -Obuild target/zeal8bit/eeprom.asm
z88dk-z80asm -Iinclude/ -Itarget/zeal8bit/./ -Itarget/zeal8bit/./include -Obuild target/zeal8bit/video.asm
target/zeal8bit/video.asm:184: error: undefined symbol: video_map_start
^---- video_map_start
target/zeal8bit/video.asm:236: error: undefined symbol: video_map_end
^---- video_map_end
target/zeal8bit/video.asm:275: error: undefined symbol: video_map_start
^---- video_map_start
target/zeal8bit/video.asm:279: error: undefined symbol: video_map_end
^---- video_map_end
target/zeal8bit/video.asm:293: error: undefined symbol: video_map_start
^---- video_map_start
target/zeal8bit/video.asm:321: error: undefined symbol: video_map_end
^---- video_map_end
make: *** [Makefile:118: target/zeal8bit/video.o] Error 1
include/osconfig.asm:
IFNDEF OSCONFIG_H
DEFINE OSCONFIG_H
DEFC CONFIG_CPU_FREQ=10000000
MACRO CONFIG_TARGET
DEFM "zeal8bit"
ENDM
DEFC CONFIG_TARGET_ZEAL_8_BIT=1
DEFC CONFIG_TARGET_HAS_MMU=1
DEFC CONFIG_KERNEL_RAM_PHYS_ADDRESS=0x88000
DEFC CONFIG_ROMDISK_ADDRESS=0x8000
DEFC CONFIG_KERNEL_PHYS_ADDRESS=0x0000
DEFC CONFIG_KERNEL_TARGET_HAS_MMU=1
DEFC CONFIG_TARGET_ENABLE_VIDEO=1
DEFC CONFIG_TARGET_STDOUT_UART=1
DEFC CONFIG_TARGET_KEYBOARD_QWERTY=1
DEFC CONFIG_TARGET_UART_SET_MONITOR_SIZE=1
DEFC CONFIG_KERNEL_STACK_ADDR=0xFFFF
DEFC CONFIG_KERNEL_RAM_START=0xC000
DEFC CONFIG_KERNEL_MAX_LOADED_DRIVERS=16
DEFC CONFIG_KERNEL_MAX_OPENED_DEVICES=16
DEFC CONFIG_KERNEL_MAX_OPENED_FILES=16
DEFC CONFIG_KERNEL_PATH_MAX=128
MACRO CONFIG_KERNEL_INIT_EXECUTABLE
DEFM "A:/init.bin"
ENDM
DEFC CONFIG_KERNEL_INIT_EXECUTABLE_ADDR=0x4000
DEFC CONFIG_KERNEL_LOG_SUPPORT_ANSI_COLOR=1
DEFC CONFIG_KERNEL_ENABLE_ZEALFS_SUPPORT=1
ENDIF
I use "load nnn" to load a program via UART and run it. No problem.
How do I do to have that program stored permanently in the file system, like init.bin?
It's a user program, not a bootable one.
I want to try it in the emulator, but I can't find any tutorials. The only useful information is a tweet from the target author, and I wish we had a wiki explaining how to use it
less command on linux will not clear the screen, there's a little difference in this behavior.
i have a diy z80 sbc
cpu:hd64r180rop
ram: 62256x2
rom:w27c512
clock:9.13mhz
can i use your boot loader ?
This code read from stdin and return a Forth counted string (len in the first byte). Tested using the emulator, while waiting for my board from Aliexpress.
; Parameters:
; H - Device to read from.
; DE - Buffer to store the line.
; B - Size of the buffer passed.
; Returns:
; A - ERR_SUCCESS on success, error value else
read_line:
push h ; device
push de ; buffer
ld c, 0 ; line len
ld (de), c ; store line len.
inc de ; Reserve 1 byte for the len.
; Test for zero length buffer
ld a, 0
cp b
jp z, end
cycle:
; Read bytes by polling, one at time
push bc
ld bc, 1
READ
pop bc
cp a, ERR_SUCCESS
jr nz, cycle
br:
; Move char to buffer
ld a, (de) ; a <- last char read
inc de ; buffer++
; Update count
inc c ; used++
; Check the ending '\n'
cp a, '\n'
jr z, end
; Check buffer full
djnz cycle
end:
pop de
pop h
ld a, ERR_SUCCESS
ld (de), c ; len of the counted string
ret
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.