From cd3fd49758c9980141539bf9cfd8a31d4423f032 Mon Sep 17 00:00:00 2001 From: y4my4my4m <8145020+y4my4my4m@users.noreply.github.com> Date: Fri, 25 Aug 2023 14:54:17 +0900 Subject: [PATCH 1/9] init --- src/Home/Yuugure.ZC | 29 +++++++++++++++++++++++++++++ src/HomeKeyPlugIns.ZC | 10 ++++++++++ src/MakeHome.ZC | 1 + 3 files changed, 40 insertions(+) create mode 100755 src/Home/Yuugure.ZC diff --git a/src/Home/Yuugure.ZC b/src/Home/Yuugure.ZC new file mode 100755 index 000000000..e449e4c5c --- /dev/null +++ b/src/Home/Yuugure.ZC @@ -0,0 +1,29 @@ +I64 initialWinBottom = sys_task->win_bottom; +CDoc *initialDisplayDoc = sys_task->display_doc; + +U0 Yuugure() +{ + // Hide SysLog + if (sys_task->win_bottom != 0) { + while(sys_task->win_bottom > -1){ + sys_task->win_bottom--; + Sleep(20); + } + + sys_task->display_doc = NULL; + WinBorder(OFF, sys_task); + } + // Show SysLog + else { + WinBorder(ON, sys_task); + sys_task->display_doc = initialDisplayDoc; + + while(sys_task->win_bottom != initialWinBottom){ + sys_task->win_bottom++; + Sleep(20); + } + + } + + WinZBufUpdate; +} diff --git a/src/HomeKeyPlugIns.ZC b/src/HomeKeyPlugIns.ZC index fdc3bda9c..0b949635b 100755 --- a/src/HomeKeyPlugIns.ZC +++ b/src/HomeKeyPlugIns.ZC @@ -110,6 +110,16 @@ Bool MyPutKey(I64 ch, I64 sc) } return TRUE; + case SC_F12: + if (!(sc & SCF_SHIFT)) + { + if (sc & SCF_KEY_DESC) + KeyDescSet("Cmd /Yuugure"); + else + Yuugure; + } + return TRUE; + case SC_DELETE: if (sc & SCF_SHIFT) { diff --git a/src/MakeHome.ZC b/src/MakeHome.ZC index 39f77698e..9b650e41a 100755 --- a/src/MakeHome.ZC +++ b/src/MakeHome.ZC @@ -8,6 +8,7 @@ Cd(__DIR__);; #include "~/HomeWrappers" MapFileLoad("::/Kernel/Kernel"); MapFileLoad("::/Compiler/Compiler"); +#include "~/Yuugure" #include "~/HomeKeyPlugIns" #include "~/HomeSys" Cd("..");; From 828b2493a4127f5cc76bdb08ad0232c29ce9000b Mon Sep 17 00:00:00 2001 From: Michael Mikonos Date: Tue, 30 Jan 2024 20:40:37 +0800 Subject: [PATCH 2/9] for newline, RawPutChar() is called at least once, so convert loop to do-while --- src/Kernel/Display.ZC | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Kernel/Display.ZC b/src/Kernel/Display.ZC index f8cadcb9e..5c0ce6f79 100755 --- a/src/Kernel/Display.ZC +++ b/src/Kernel/Display.ZC @@ -47,9 +47,8 @@ See also $LK,"GrUpdateScreen",A="MN:GrUpdateScreen"$(). } else if (ch == '\n') { - RawPutChar(CH_SPACE); - while (text.raw_col % text.cols) - RawPutChar(CH_SPACE); + do RawPutChar(CH_SPACE); + while (text.raw_col % text.cols); } else if (Bt(char_bmp_displayable, ch)) { From 6c976d8b561fe50de34c5453213861b1fdf8584f Mon Sep 17 00:00:00 2001 From: retu2libc Date: Thu, 7 Mar 2024 00:05:39 -0500 Subject: [PATCH 3/9] Offload FCS to driver specific code --- src/Home/Net/Drivers/PCNet.ZC | 8 +++++++- src/Home/Net/Protocols/Ethernet.ZC | 7 +++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/Home/Net/Drivers/PCNet.ZC b/src/Home/Net/Drivers/PCNet.ZC index bf84da616..637956de8 100755 --- a/src/Home/Net/Drivers/PCNet.ZC +++ b/src/Home/Net/Drivers/PCNet.ZC @@ -635,7 +635,13 @@ I64 PCNetPacketReceive(U8 **packet_buffer_out, U16 *packet_length_out) NetDebug("PCNET RECEIVE PACKET: de_index incremented = 0x%0X", pcnet.current_rx_de_index); *packet_buffer_out = pcnet.rx_buffer_addr_phys + de_index * ETHERNET_FRAME_SIZE; - *packet_length_out = packet_length; + + // ASTRPRCV causes 802.3 packets to be stripped and FCS to be checked + U16 ethertype = (*packet_buffer_out)[ETHERNET_ETHERTYPE_OFFSET + 1] | (*packet_buffer_out)[ETHERNET_ETHERTYPE_OFFSET] << 8; + if (ethertype < ETHERNET_v2_MTU) + *packet_length_out = ethertype; + else + *packet_length_out = packet_length - FCS_LENGTH; // ethertype ii TODO: Validate FCS return de_index; } diff --git a/src/Home/Net/Protocols/Ethernet.ZC b/src/Home/Net/Protocols/Ethernet.ZC index 611b3b344..cdd54b331 100755 --- a/src/Home/Net/Protocols/Ethernet.ZC +++ b/src/Home/Net/Protocols/Ethernet.ZC @@ -29,6 +29,8 @@ U0 EthernetGlobalsInit() U0 EthernetFrameParse(CEthernetFrame *frame_out, U8 *frame, U16 length) { + // length is assumed to NOT include the FCS. + // Shrine says MemCopy has a high overhead. // Almost tempted to say that means that a lot // of the current system should be done with @@ -45,10 +47,7 @@ U0 EthernetFrameParse(CEthernetFrame *frame_out, U8 *frame, U16 length) frame_out->data = frame + ETHERNET_DATA_OFFSET; - if (frame_out->ethertype <= ETHERNET_v2_MTU) // check if the field is a length or an ethertype - frame_out->length = frame_out->ethertype; - else - frame_out->length = length - ETHERNET_MAC_HEADER_LENGTH - FCS_LENGTH; + frame_out->length = length - ETHERNET_MAC_HEADER_LENGTH; } U0 EthernetFrameFinish(I64 de_index) From 7edf953c2465cb0c7fee16662976e801f58567de Mon Sep 17 00:00:00 2001 From: GutPuncher Date: Thu, 7 Mar 2024 00:22:13 -0500 Subject: [PATCH 4/9] chore: inc os version patch num --- src/Kernel/KGlobals.ZC | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Kernel/KGlobals.ZC b/src/Kernel/KGlobals.ZC index c794b0ebb..783ea1162 100755 --- a/src/Kernel/KGlobals.ZC +++ b/src/Kernel/KGlobals.ZC @@ -14,7 +14,7 @@ U8 *rev_bits_table; //Table with U8 bits reversed CDate local_time_offset; F64 *pow10_I64, sys_os_version = 2.03; -U64 sys_os_version_sub = 113; +U64 sys_os_version_sub = 114; U8 *sys_os_version_str; U8 *sys_os_version_full; U8 *sys_os_version_nice; From d63cfd809975600aa2af8a2928a9e6530f3c3170 Mon Sep 17 00:00:00 2001 From: GutPuncher Date: Mon, 11 Mar 2024 02:05:24 -0400 Subject: [PATCH 5/9] feat: CI build check for ISOs and fail if missing --- .github/workflows/build.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3f5398416..f07d25530 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -40,12 +40,19 @@ jobs: sudo udevadm trigger --name-match=kvm - name: Run ISOs Build Script + timeout-minutes: 10 if: ${{ success() }} run: | cd build ./build-iso.sh --headless cd .. + - name: ISO Check + if: ${{ success() && hashFiles('./build/*.iso') == '' }} + run: | + echo "ISOs not built!" + exit 1 + - name: Releasing Latest ISOs if: ${{ success() && github.event_name == 'push'}} uses: "GutPuncher/action-automatic-releases@latest" From fca34d8b3d34555faaec60fdf31122331585fa34 Mon Sep 17 00:00:00 2001 From: GutPuncher Date: Mon, 11 Mar 2024 02:52:35 -0400 Subject: [PATCH 6/9] feat: revise/refactor #124 , inc patch num --- src/Home/Yuugure.ZC | 29 ----------------------------- src/HomeKeyPlugIns.ZC | 4 ++-- src/Kernel/Job.ZC | 8 ++++++++ src/Kernel/KGlobals.ZC | 2 +- src/Kernel/KernelC.HH | 1 + 5 files changed, 12 insertions(+), 32 deletions(-) delete mode 100755 src/Home/Yuugure.ZC diff --git a/src/Home/Yuugure.ZC b/src/Home/Yuugure.ZC deleted file mode 100755 index e449e4c5c..000000000 --- a/src/Home/Yuugure.ZC +++ /dev/null @@ -1,29 +0,0 @@ -I64 initialWinBottom = sys_task->win_bottom; -CDoc *initialDisplayDoc = sys_task->display_doc; - -U0 Yuugure() -{ - // Hide SysLog - if (sys_task->win_bottom != 0) { - while(sys_task->win_bottom > -1){ - sys_task->win_bottom--; - Sleep(20); - } - - sys_task->display_doc = NULL; - WinBorder(OFF, sys_task); - } - // Show SysLog - else { - WinBorder(ON, sys_task); - sys_task->display_doc = initialDisplayDoc; - - while(sys_task->win_bottom != initialWinBottom){ - sys_task->win_bottom++; - Sleep(20); - } - - } - - WinZBufUpdate; -} diff --git a/src/HomeKeyPlugIns.ZC b/src/HomeKeyPlugIns.ZC index 22e3f4972..0563468df 100755 --- a/src/HomeKeyPlugIns.ZC +++ b/src/HomeKeyPlugIns.ZC @@ -114,9 +114,9 @@ Bool MyPutKey(I64 ch, I64 sc) if (!(sc & SCF_SHIFT)) { if (sc & SCF_KEY_DESC) - KeyDescSet("Cmd /Yuugure"); + KeyDescSet("Cmd /SysLogToggle"); else - Yuugure; + SysLogToggle; } return TRUE; diff --git a/src/Kernel/Job.ZC b/src/Kernel/Job.ZC index 983a40da4..a27489ed9 100755 --- a/src/Kernel/Job.ZC +++ b/src/Kernel/Job.ZC @@ -504,6 +504,14 @@ I64 Sys(U8 *format, ...) return res; } +U0 SysLogToggle() +{ + if (Bt(&sys_task->display_flags, DISPLAYf_SHOW)) + LBtr(&sys_task->display_flags, DISPLAYf_SHOW); + else + LBts(&sys_task->display_flags, DISPLAYf_SHOW); +} + U0 SysLog(U8 *format, ...) {//Display text in sys_task. U8 *buf = StrPrintJoin(NULL, format, argc, argv); diff --git a/src/Kernel/KGlobals.ZC b/src/Kernel/KGlobals.ZC index 783ea1162..31b9bdac3 100755 --- a/src/Kernel/KGlobals.ZC +++ b/src/Kernel/KGlobals.ZC @@ -14,7 +14,7 @@ U8 *rev_bits_table; //Table with U8 bits reversed CDate local_time_offset; F64 *pow10_I64, sys_os_version = 2.03; -U64 sys_os_version_sub = 114; +U64 sys_os_version_sub = 115; U8 *sys_os_version_str; U8 *sys_os_version_full; U8 *sys_os_version_nice; diff --git a/src/Kernel/KernelC.HH b/src/Kernel/KernelC.HH index 3c984c9a1..18c28999b 100755 --- a/src/Kernel/KernelC.HH +++ b/src/Kernel/KernelC.HH @@ -437,6 +437,7 @@ public extern I64 Scale2Mem(I64 min, I64 max, I64 limit=2*1024*1024*1024); public extern U0 SysErr( U8 *format, ...); public extern U0 SysWarn(U8 *format, ...); public extern U0 SysLog( U8 *format, ...); +public extern U0 SysLogToggle(); public extern I64 ExeCmdLine(CCompCtrl *cc); public extern U0 JobDel(CJob *tmpc); public extern I64 JobsHandler(I64 run_flags, CTask *task=NULL); From 314b4630640b615bc7fc414d5f98f0ff5ac21a27 Mon Sep 17 00:00:00 2001 From: Arsenic Blood <127725014+GutPuncher@users.noreply.github.com> Date: Mon, 11 Mar 2024 02:54:46 -0400 Subject: [PATCH 7/9] Update MakeHome.ZC --- src/MakeHome.ZC | 1 - 1 file changed, 1 deletion(-) diff --git a/src/MakeHome.ZC b/src/MakeHome.ZC index 9b650e41a..39f77698e 100755 --- a/src/MakeHome.ZC +++ b/src/MakeHome.ZC @@ -8,7 +8,6 @@ Cd(__DIR__);; #include "~/HomeWrappers" MapFileLoad("::/Kernel/Kernel"); MapFileLoad("::/Compiler/Compiler"); -#include "~/Yuugure" #include "~/HomeKeyPlugIns" #include "~/HomeSys" Cd("..");; From cf4d34c8b2d3eec8d18b3c097226c018b73f96a5 Mon Sep 17 00:00:00 2001 From: Arsenic Blood <127725014+GutPuncher@users.noreply.github.com> Date: Mon, 11 Mar 2024 02:59:45 -0400 Subject: [PATCH 8/9] Update Display.ZC --- src/Kernel/Display.ZC | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Kernel/Display.ZC b/src/Kernel/Display.ZC index 5c0ce6f79..ef89e85f1 100755 --- a/src/Kernel/Display.ZC +++ b/src/Kernel/Display.ZC @@ -47,7 +47,8 @@ See also $LK,"GrUpdateScreen",A="MN:GrUpdateScreen"$(). } else if (ch == '\n') { - do RawPutChar(CH_SPACE); + do + RawPutChar(CH_SPACE); while (text.raw_col % text.cols); } else if (Bt(char_bmp_displayable, ch)) From d77e52698ff32109591208d05c477039bb12a0b2 Mon Sep 17 00:00:00 2001 From: Arsenic Blood <127725014+GutPuncher@users.noreply.github.com> Date: Mon, 11 Mar 2024 03:02:10 -0400 Subject: [PATCH 9/9] Update KGlobals.ZC --- src/Kernel/KGlobals.ZC | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Kernel/KGlobals.ZC b/src/Kernel/KGlobals.ZC index 31b9bdac3..f5f71ef30 100755 --- a/src/Kernel/KGlobals.ZC +++ b/src/Kernel/KGlobals.ZC @@ -14,7 +14,7 @@ U8 *rev_bits_table; //Table with U8 bits reversed CDate local_time_offset; F64 *pow10_I64, sys_os_version = 2.03; -U64 sys_os_version_sub = 115; +U64 sys_os_version_sub = 116; U8 *sys_os_version_str; U8 *sys_os_version_full; U8 *sys_os_version_nice;