diff --git a/Makefile b/Makefile index 5aca7d7..b85a7cb 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -all: $(patsubst %.cpp,%.elf,$(wildcard example/*.cpp)) +all: $(patsubst %.cpp,%.bin,$(wildcard example/*.cpp)) include base.mk include common.mk diff --git a/example/clipping.cpp b/example/clipping.cpp index 40e3335..19808fe 100644 --- a/example/clipping.cpp +++ b/example/clipping.cpp @@ -31,8 +31,8 @@ static ft0::data_transfer::data_format data[4]; -uint32_t send_buf[1024] __attribute__((aligned(32))); -uint32_t recv_buf[1024] __attribute__((aligned(32))); +uint8_t send_buf[1024] __attribute__((aligned(32))); +uint8_t recv_buf[1024] __attribute__((aligned(32))); void do_get_condition() { diff --git a/example/clipping2.cpp b/example/clipping2.cpp index 051f76b..e732748 100644 --- a/example/clipping2.cpp +++ b/example/clipping2.cpp @@ -34,8 +34,8 @@ static ft0::data_transfer::data_format data[4]; -uint32_t send_buf[1024] __attribute__((aligned(32))); -uint32_t recv_buf[1024] __attribute__((aligned(32))); +uint8_t send_buf[1024] __attribute__((aligned(32))); +uint8_t recv_buf[1024] __attribute__((aligned(32))); void do_get_condition() { diff --git a/example/clipping_textured.cpp b/example/clipping_textured.cpp index 586e476..2725270 100644 --- a/example/clipping_textured.cpp +++ b/example/clipping_textured.cpp @@ -36,8 +36,8 @@ static ft0::data_transfer::data_format data[4]; -uint32_t send_buf[1024] __attribute__((aligned(32))); -uint32_t recv_buf[1024] __attribute__((aligned(32))); +uint8_t send_buf[1024] __attribute__((aligned(32))); +uint8_t recv_buf[1024] __attribute__((aligned(32))); void do_get_condition() { diff --git a/example/maple_analog.cpp b/example/maple_analog.cpp index d977017..9dfb1cb 100644 --- a/example/maple_analog.cpp +++ b/example/maple_analog.cpp @@ -30,8 +30,8 @@ static ft0::data_transfer::data_format data[4]; -uint32_t send_buf[1024] __attribute__((aligned(32))); -uint32_t recv_buf[1024] __attribute__((aligned(32))); +uint8_t send_buf[1024] __attribute__((aligned(32))); +uint8_t recv_buf[1024] __attribute__((aligned(32))); void do_get_condition() { diff --git a/example/maple_controller.cpp b/example/maple_controller.cpp index cc44c2c..c073501 100644 --- a/example/maple_controller.cpp +++ b/example/maple_controller.cpp @@ -16,8 +16,8 @@ void do_get_condition() { - uint32_t send_buf[1024] __attribute__((aligned(32))); - uint32_t recv_buf[1024] __attribute__((aligned(32))); + uint8_t send_buf[1024] __attribute__((aligned(32))); + uint8_t recv_buf[1024] __attribute__((aligned(32))); auto writer = maple::host_command_writer(send_buf, recv_buf); @@ -54,8 +54,8 @@ void do_get_condition() void do_lm_request(uint8_t port, uint8_t lm) { - uint32_t send_buf[1024] __attribute__((aligned(32))); - uint32_t recv_buf[1024] __attribute__((aligned(32))); + uint8_t send_buf[1024] __attribute__((aligned(32))); + uint8_t recv_buf[1024] __attribute__((aligned(32))); auto writer = maple::host_command_writer(send_buf, recv_buf); @@ -112,8 +112,8 @@ void do_lm_requests(uint8_t port, uint8_t lm) void do_device_request() { - uint32_t send_buf[1024] __attribute__((aligned(32))); - uint32_t recv_buf[1024] __attribute__((aligned(32))); + uint8_t send_buf[1024] __attribute__((aligned(32))); + uint8_t recv_buf[1024] __attribute__((aligned(32))); auto writer = maple::host_command_writer(send_buf, recv_buf); diff --git a/example/maple_font.cpp b/example/maple_font.cpp index 5b9231e..38c77a3 100644 --- a/example/maple_font.cpp +++ b/example/maple_font.cpp @@ -42,8 +42,8 @@ static uint8_t * framebuffer; void send_vmu_framebuffer(uint8_t port, uint8_t lm) { - uint32_t send_buf[1024] __attribute__((aligned(32))); - uint32_t recv_buf[1024] __attribute__((aligned(32))); + uint8_t send_buf[1024] __attribute__((aligned(32))); + uint8_t recv_buf[1024] __attribute__((aligned(32))); using command_type = maple::block_write; using response_type = maple::device_reply; @@ -82,8 +82,8 @@ void send_vmu_framebuffer(uint8_t port, uint8_t lm) void do_lm_request(uint8_t port, uint8_t lm) { - uint32_t send_buf[1024] __attribute__((aligned(32))); - uint32_t recv_buf[1024] __attribute__((aligned(32))); + uint8_t send_buf[1024] __attribute__((aligned(32))); + uint8_t recv_buf[1024] __attribute__((aligned(32))); auto writer = maple::host_command_writer(send_buf, recv_buf); @@ -145,8 +145,8 @@ void do_lm_requests(uint8_t port, uint8_t lm) void do_device_request() { - uint32_t send_buf[1024] __attribute__((aligned(32))); - uint32_t recv_buf[1024] __attribute__((aligned(32))); + uint8_t send_buf[1024] __attribute__((aligned(32))); + uint8_t recv_buf[1024] __attribute__((aligned(32))); auto writer = maple::host_command_writer(send_buf, recv_buf); diff --git a/example/maple_mouse.cpp b/example/maple_mouse.cpp index 0559c8f..aaeb190 100644 --- a/example/maple_mouse.cpp +++ b/example/maple_mouse.cpp @@ -34,8 +34,8 @@ static ft9::data_transfer::data_format data; void do_get_condition() { - uint32_t send_buf[1024] __attribute__((aligned(32))); - uint32_t recv_buf[1024] __attribute__((aligned(32))); + uint8_t send_buf[1024] __attribute__((aligned(32))); + uint8_t recv_buf[1024] __attribute__((aligned(32))); using command_type = maple::get_condition; using response_type = maple::data_transfer; diff --git a/example/maple_storage.cpp b/example/maple_storage.cpp index 2fcca49..787f120 100644 --- a/example/maple_storage.cpp +++ b/example/maple_storage.cpp @@ -16,8 +16,8 @@ #include "systembus.hpp" struct storage_state { - uint32_t * send_buf; - uint32_t * recv_buf; + uint8_t * send_buf; + uint8_t * recv_buf; uint32_t host_port_select; uint32_t destination_ap; struct { @@ -289,8 +289,8 @@ bool allocate_file_information_data(storage_state& state, void do_lm_request(uint8_t port, uint8_t lm) { - uint32_t send_buf[1024] __attribute__((aligned(32))); - uint32_t recv_buf[1024] __attribute__((aligned(32))); + uint8_t send_buf[1024] __attribute__((aligned(32))); + uint8_t recv_buf[1024] __attribute__((aligned(32))); const uint32_t host_port_select = host_instruction_port_select(port); const uint32_t destination_ap = ap_port_select(port) | ap::de::expansion_device | lm; @@ -547,8 +547,8 @@ void do_lm_requests(uint8_t port, uint8_t lm) void do_device_request() { - uint32_t send_buf[1024] __attribute__((aligned(32))); - uint32_t recv_buf[1024] __attribute__((aligned(32))); + uint8_t send_buf[1024] __attribute__((aligned(32))); + uint8_t recv_buf[1024] __attribute__((aligned(32))); auto writer = maple::host_command_writer(send_buf, recv_buf); diff --git a/example/maple_vibrator.cpp b/example/maple_vibrator.cpp index 613e701..e06b0f2 100644 --- a/example/maple_vibrator.cpp +++ b/example/maple_vibrator.cpp @@ -11,8 +11,8 @@ #include "maple/maple_bus_ft8.hpp" #include "sh7091/serial.hpp" -uint32_t send_buf[1024] __attribute__((aligned(32))); -uint32_t recv_buf[1024] __attribute__((aligned(32))); +uint8_t send_buf[1024] __attribute__((aligned(32))); +uint8_t recv_buf[1024] __attribute__((aligned(32))); void do_lm_request(uint8_t port, uint8_t lm) { diff --git a/example/maple_wink.cpp b/example/maple_wink.cpp index e1bf1df..b1aeabc 100644 --- a/example/maple_wink.cpp +++ b/example/maple_wink.cpp @@ -48,8 +48,8 @@ inline void copy(T * dst, const T * src, const int32_t n) noexcept void send_wink(uint8_t port, uint8_t lm) { - uint32_t send_buf[1024] __attribute__((aligned(32))); - uint32_t recv_buf[1024] __attribute__((aligned(32))); + uint8_t send_buf[1024] __attribute__((aligned(32))); + uint8_t recv_buf[1024] __attribute__((aligned(32))); using command_type = maple::block_write; using response_type = maple::device_reply; @@ -86,8 +86,8 @@ void send_wink(uint8_t port, uint8_t lm) void do_lm_request(uint8_t port, uint8_t lm) { - uint32_t send_buf[1024] __attribute__((aligned(32))); - uint32_t recv_buf[1024] __attribute__((aligned(32))); + uint8_t send_buf[1024] __attribute__((aligned(32))); + uint8_t recv_buf[1024] __attribute__((aligned(32))); auto writer = maple::host_command_writer(send_buf, recv_buf); @@ -149,8 +149,8 @@ void do_lm_requests(uint8_t port, uint8_t lm) void do_device_request() { - uint32_t send_buf[1024] __attribute__((aligned(32))); - uint32_t recv_buf[1024] __attribute__((aligned(32))); + uint8_t send_buf[1024] __attribute__((aligned(32))); + uint8_t recv_buf[1024] __attribute__((aligned(32))); auto writer = maple::host_command_writer(send_buf, recv_buf); diff --git a/example/modifier_volume_with_two_volumes.cpp b/example/modifier_volume_with_two_volumes.cpp index f22d0c5..f77b258 100644 --- a/example/modifier_volume_with_two_volumes.cpp +++ b/example/modifier_volume_with_two_volumes.cpp @@ -37,8 +37,8 @@ static ft0::data_transfer::data_format data[4]; void do_get_condition() { - uint32_t send_buf[1024] __attribute__((aligned(32))); - uint32_t recv_buf[1024] __attribute__((aligned(32))); + uint8_t send_buf[1024] __attribute__((aligned(32))); + uint8_t recv_buf[1024] __attribute__((aligned(32))); auto writer = maple::host_command_writer(send_buf, recv_buf); diff --git a/example/texture_filtering_maple.cpp b/example/texture_filtering_maple.cpp index b216525..a1d9a14 100644 --- a/example/texture_filtering_maple.cpp +++ b/example/texture_filtering_maple.cpp @@ -246,8 +246,8 @@ void do_get_condition(uint32_t * command_buf, uint32_t * receive_buf, button_state& buttons) { - uint32_t send_buf[1024] __attribute__((aligned(32))); - uint32_t recv_buf[1024] __attribute__((aligned(32))); + uint8_t send_buf[1024] __attribute__((aligned(32))); + uint8_t recv_buf[1024] __attribute__((aligned(32))); auto writer = maple::host_command_writer(send_buf, recv_buf); diff --git a/font/dejavusansmono/dejavusansmono_mono.data.h b/font/dejavusansmono/dejavusansmono_mono.data.h index 3025b64..0e34347 100644 --- a/font/dejavusansmono/dejavusansmono_mono.data.h +++ b/font/dejavusansmono/dejavusansmono_mono.data.h @@ -1,5 +1,15 @@ #pragma once -#include + +#include + +#ifdef __cplusplus +extern "C" { +#endif + extern uint32_t _binary_font_dejavusansmono_dejavusansmono_mono_data_start __asm("_binary_font_dejavusansmono_dejavusansmono_mono_data_start"); extern uint32_t _binary_font_dejavusansmono_dejavusansmono_mono_data_end __asm("_binary_font_dejavusansmono_dejavusansmono_mono_data_end"); extern uint32_t _binary_font_dejavusansmono_dejavusansmono_mono_data_size __asm("_binary_font_dejavusansmono_dejavusansmono_mono_data_size"); + +#ifdef __cplusplus +} +#endif diff --git a/serial_load.cpp b/serial_load.cpp index 0eb6da5..29ce99e 100644 --- a/serial_load.cpp +++ b/serial_load.cpp @@ -6,6 +6,7 @@ #include "serial_load.hpp" #include "crc32.h" +#include "memory.hpp" #include "align.hpp" #include "memory.hpp" diff --git a/tools/ftdi.conf b/tools/ftdi.conf index aa09738..002a2ce 100644 --- a/tools/ftdi.conf +++ b/tools/ftdi.conf @@ -68,16 +68,16 @@ eeprom_type=6 # Integer: Chip Type / EEPROM Type. Corresponds to ftdi_ # Strings to be used in this config file are: # "TRISTATE", "TXLED", "RXLED", "TXRXLED", "PWREN", "SLEEP", "DRIVE_0", "DRIVE1", "IOMODE", "TXDEN", "CLK30", "CLK15", "CLK7_5" ##Type_232H Chips -cbush0=TRISTATE # String parsed to integer: -cbush1=TRISTATE # String parsed to integer: +cbush0=RXLED # String parsed to integer: +cbush1=TXLED # String parsed to integer: cbush2=TRISTATE # String parsed to integer: cbush3=TRISTATE # String parsed to integer: cbush4=TRISTATE # String parsed to integer: -cbush5=TRISTATE # String parsed to integer: -cbush6=TRISTATE # String parsed to integer: +cbush5=IOMODE # String parsed to integer: +cbush6=IOMODE # String parsed to integer: cbush7=TRISTATE # String parsed to integer: -cbush8=TXLED # String parsed to integer: -cbush9=RXLED # String parsed to integer: +cbush8=IOMODE # String parsed to integer: +cbush9=IOMODE # String parsed to integer: # Group Drive # Strings to be used in this config file are: # "4MA", "8MA", "12MA", "16MA"