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/6] 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 00000000..e449e4c5 --- /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 fdc3bda9..0b949635 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 39f77698..9b650e41 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 6c976d8b561fe50de34c5453213861b1fdf8584f Mon Sep 17 00:00:00 2001 From: retu2libc Date: Thu, 7 Mar 2024 00:05:39 -0500 Subject: [PATCH 2/6] 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 bf84da61..637956de 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 611b3b34..cdd54b33 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 3/6] 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 c794b0eb..783ea116 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 4/6] 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 3f539841..f07d2553 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 5/6] 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 e449e4c5..00000000 --- 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 22e3f497..0563468d 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 983a40da..a27489ed 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 783ea116..31b9bdac 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 3c984c9a..18c28999 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 6/6] Update MakeHome.ZC --- src/MakeHome.ZC | 1 - 1 file changed, 1 deletion(-) diff --git a/src/MakeHome.ZC b/src/MakeHome.ZC index 9b650e41..39f77698 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("..");;