Changelog:

bugfix: Fixed NTSC mode could not be selected in Display panel (fixes #1551)
refactor: minor optimization in Display panelDon’t get the source every time, instead get it once and check for it when needed
bugfix: Savestate filename handling was buggy when starting from command line (fixes #1553)

– Refactored some logic away from the GUI class
– Use TCHAR* instead of string() for the filename, when getting the timestamp
– Use last_active_config as a fallback, when checking for the filename to pick. The previous “last_loaded_config” would be empty, if we run things from the command line and just loaded a savestate (.uss) file.
– Ensure that the variable txt is freed after we have processed it with SetLastActiveConfig(), not before
bugfix: don’t overwrite the textfield on every update (#1554)- When adding a hard drive, the text field with the path was annoyingly replaced on every widget refresh.
– Set active status on the dropdowns after initializing also, not after a widget action. This means that uaehf.device does not get to have controller type and feature level, as they don’t make sense for it.
enhancement: Updated help text in Savestates GUI panel (fixes #1557)
chore: added todo for future implementation
bugfix: Fix some socket connections would not complete properly (#1359)Some socket connections would not work properly in Amiberry (but also in most/all UAE implementations that were not WinUAE it seems, as they all use the same code).

Specifically, the optvalue would not cover cases that the type was SO_RCVTIMEO, SO_SNDTIMEO and SO_LINGER. All of these use a different struct, instead of an int value, and the result was that we’d get an error when we called setsockopt() – which got reflected back to AmigaOS, as an invalid parameter.
refactor: code improvements in amiberry_gui- Replace NULL with nullptr
– initialize structs that needed intializing
– replace _stprintf() which is deprecated, with _sntprintf() (both are macros defined in string.h)
– Changed gui_update() to void, since it always returned zero and we never checked for the result value anywhere
– other minor code improvements
bugfix: getlocaltime would return UTC time, instead of local time
Reduce compiler warnings (#1566)* refactor: fix compiler and clang-tidy warnings
* minor code improvements and modernization
* refactor: fix sprintf is deperecated warnings
* refactor: convert gfxboard encoding to UTF-8
refactor: Floppy Panel refactoring, add new button- Refactor code in Floppy panel, reduce action listeners
– Add Save Config for Disk button: saves the configuration with the name of the inserted floppy image of DF0
bugfix: Fixed config name was changed when inserting media (fixes #1564)- The config name was always changed when inserting media into a drive (floppy, CD, whdload). However, this should not happen if we already had a config file loaded earlier.
enhancement: Add RIPPLE IDEMerged from WinUAE
feat: Keyboard MCU emulation
refactor: Blacker than black update
bugfix: Fix debugger assembler MOVEM
feat: Bordercolor config entry
feat: Per-config statefile path
added missing update in options.h
more fixes for savestate changesLooks like WinUAE’s commit was missing more stuff
enhancement: Serial TCP/IP TCP_NODELAY
bugfix: Fix TekMagic memory type.
bugfix: ensure screenshot is generated even when using Quick Save State- When using the shortcuts for Quick Save state (END + SHIFT + numpad key), no screenshot was generated.
refactor: clamping, update graphics functions- Updated various functions to use `std::max` and `std::min` for clamping values.
– Removed `#ifdef PICASSO96` block in `updatepicasso96`.
– Changed surface format in `setupcursor` to `SDL_PIXELFORMAT_BGRA32`.
perf: minor drawing improvements
bugfix: fixed incorrect LED colors in status lineAfter switching to BGRA, the Blue and Red colors were inverted in the status line
refactor: reduce checks in show_screenMinor optimization to reduce the number of checks done on each frame update, from two to one
refactor: use std::max/min and modernize headersEnhanced readability and consistency by replacing manual comparisons and assignments with std::max and std::min functions. Updated #include directives to use modern C++-style headers (e.g., instead of ).
feat: Implement shortcut handling in disk_selection function (fixes #1559)

The `disk_selection` function in `amiberry_gui.cpp` has been updated to handle various types of shortcuts. The parameter name has been changed from `drive` to `shortcut`. The function now supports:
– Floppy disk images (shortcuts 0-3)
– Loading save states (shortcut 4)
– Saving save states (shortcut 5)
– Selecting CD images (shortcut 6)
enhancement: remember window size and position (#1568)When starting up, keep track of the GUI window size and position. If it’s resized or moved, store the new values and re-use them when re-opening the GUI.
refactor: remember emulation window resizes (fixes #1568)When using Windowed mode, if the emulation window is manually resized, that position will be remembered and restored, if the GUI is opened and closed again.
refactor: show the correct 32-bit RTG format usedWe switched to BGRA, might be good to show the correct option there, and make it the default
chore: minor code improvements- Use const where possible
– use std::min
– remove elaborate type specifiers
chore: initialize variables where needed in custom
refactor: rewrite bsdsocket host implementation
Revert “refactor: rewrite bsdsocket host implementation”This reverts commit b3ef00f.
doc: Update HelpPanelFloppy with new help text for save buttonEnhanced the help text in `HelpPanelFloppy` to include information about the “Save config for disk” button.
ci: add recommended compiler flags for macOS debug buildsIn order to use the profiler, Jetbrains recommend these flags for macOS Debug builds
bugfix: uaescsi.device was always enabled by default (#1570)The target default options had “automount_cddrives” enabled, which in turn enabled uaescsi.device always.
However, that should not be enabled in all cases.
bugfix: GUI would show emulation hasn’t started incorrectly when saving a state file (fixes #1570)

The dialog message “Emulation hasn’t started yet” would be incorrectly shown if you also cancelled a warning of unsafe conditions, during the save state message.

Atualizações:

Correções de bugs:

Corrigido: O modo NTSC não poderia ser selecionado no painel de exibição (corrige #1551)
Refatoração: Pequena otimização no painel de exibição. Não pegar a fonte a cada vez, mas obter uma vez e verificar quando necessário
Corrigido: O manuseio do nome do arquivo de estado salvo estava com falhas ao iniciar a partir da linha de comando (corrige #1553)
Refatoração: Algumas lógicas foram removidas da classe GUI
Usado TCHAR* em vez de string() para o nome do arquivo, ao obter o carimbo de data/hora
Usado last_active_config como fallback ao verificar o nome do arquivo a ser escolhido. O anterior “last_loaded_config” ficava vazio se executássemos a partir da linha de comando e carregássemos um arquivo de estado salvo (.uss).
Garantido que a variável txt seja liberada após ser processada com SetLastActiveConfig(), não antes
Corrigido: O campo de texto não deve ser sobrescrito em cada atualização (#1554) – Ao adicionar um disco rígido, o campo de texto com o caminho estava sendo substituído irritantemente a cada atualização do widget.
Definido o status ativo nas listas suspensas após a inicialização também, e não após uma ação no widget. Isso significa que o uaehf.device não precisa ter tipo de controlador e nível de recurso, pois não faz sentido para ele.
Melhoria: Texto de ajuda atualizado no painel de estado salvo (corrige #1557)
Tarefa: Adicionado todo para futura implementação
Corrigido: Algumas conexões de socket não completavam a conexão corretamente (#1359) – Algumas conexões de socket não funcionavam corretamente no Amiberry (mas também em outras implementações do UAE que não eram WinUAE, parece que todos usavam o mesmo código).
Refatoração: Melhorias no código em amiberry_gui
Substituído NULL por nullptr
Inicializados structs que precisavam ser inicializados
Substituído _stprintf() que está obsoleto, por _sntprintf() (ambos são macros definidos em string.h)
Mudado gui_update() para void, já que sempre retornava zero e nunca verificávamos o valor do resultado em nenhum lugar
Outras melhorias menores de código
Corrigido: getlocaltime retornava hora UTC, em vez de hora local
Reduzido avisos do compilador (#1566) – refatoração para corrigir avisos do compilador e clang-tidy
Melhoria: Melhorias menores de código e modernização
Refatoração: Corrigido o aviso de obsolescência de sprintf
Refatoração: Converter codificação de gfxboard para UTF-8
Refatoração: Refatoração no painel de disquetes, adicionando um novo botão – Refatorado o código no painel de disquetes, reduzindo ouvintes de ações
Adicionado botão “Salvar Configuração para Disco”: Salva a configuração com o nome da imagem de disquete inserido no DF0
Corrigido: O nome da configuração era alterado ao inserir mídia (corrige #1564) – O nome da configuração sempre era alterado ao inserir mídia em uma unidade (disquete, CD, whdload). No entanto, isso não deveria ocorrer se já tivéssemos um arquivo de configuração carregado anteriormente.
Melhoria: Adicionada a IDE RIPPLE (mesclado de WinUAE)
Recurso: Emulação de teclado MCU
Refatoração: Atualização Blacker than black
Corrigido: Corrigido o MOVEM no depurador de assembler
Recurso: Entrada de cor de borda configurável
Recurso: Caminho do arquivo de estado por configuração
Adicionados ajustes ausentes em options.h
Mais correções para mudanças no estado salvo
Melhoria: TCP/IP Serial TCP_NODELAY
Corrigido: Tipo de memória TekMagic.
Corrigido: Garantir que a captura de tela seja gerada mesmo ao usar “Quick Save State” – Ao usar os atalhos para “Quick Save state” (END + SHIFT + tecla numérica), nenhuma captura de tela era gerada.
Refatoração: Atualização de funções gráficas e de clamping – Atualizadas várias funções para usar std::max e std::min para limitar valores.
Removido o bloco #ifdef PICASSO96 em updatepicasso96.
Mudado o formato da superfície em setupcursor para SDL_PIXELFORMAT_BGRA32.
Desempenho: Melhorias menores no desenho
Corrigido: Cores incorretas de LED na linha de status – Após a troca para BGRA, as cores azul e vermelha estavam invertidas na linha de status
Refatoração: Reduzir verificações no show_screen – Otimização menor para reduzir o número de verificações feitas a cada atualização de quadro, de duas para uma
Refatoração: Usar std::max/min e modernizar cabeçalhos – Melhorada a legibilidade e consistência ao substituir comparações e atribuições manuais com funções std::max e std::min. Atualizados os diretórios de #include para usar cabeçalhos modernos do C++ (ex: ao invés de ).
Recurso: Implementação de tratamento de atalhos na função disk_selection (corrige #1559) – A função disk_selection foi atualizada para lidar com vários tipos de atalhos. O nome do parâmetro foi alterado de drive para shortcut. A função agora suporta:
Imagens de disquetes (atalhos 0-3)
Carregar estados salvos (atalho 4)
Salvar estados salvos (atalho 5)
Selecionar imagens de CD (atalho 6)
Melhoria: Lembre-se do tamanho e posição da janela (#1568) – Ao iniciar, rastrear o tamanho e a posição da janela da GUI. Se for redimensionada ou movida, armazenar os novos valores e reutilizá-los ao reabrir a GUI.
Refatoração: Lembre-se do redimensionamento da janela de emulação (corrige #1568) – Ao usar o modo em janela, se a janela de emulação for redimensionada manualmente, essa posição será lembrada e restaurada, caso a GUI seja aberta e fechada novamente.
Refatoração: Exibir o formato RTG correto de 32 bits utilizado – Como trocamos para BGRA, pode ser interessante exibir a opção correta e torná-la a padrão
Tarefa: Melhorias menores de código – Usado const quando possível, usou std::min, removeu especificadores de tipo elaborados
Tarefa: Inicializar variáveis onde necessário no custom
Refatoração: Reescrever implementação do host bsdsocket
Revertido “refatoração: reescrever implementação do host bsdsocket” – Este commit reverte a alteração feita anteriormente.
Documentação: Atualizado HelpPanelFloppy com novo texto de ajuda para o botão de salvar configuração
Tarefa: Adicionados flags de compilador recomendadas para builds de depuração no macOS. Para usar o profiler, a Jetbrains recomenda essas flags para builds de depuração no macOS
Corrigido: uaescsi.device estava sempre habilitado por padrão (#1570) – As opções padrão tinham “automount_cddrives” habilitado, o que, por sua vez, habilitava uaescsi.device sempre. No entanto, isso não deveria ser habilitado em todos os casos.
Corrigido: A GUI mostrava incorretamente que a emulação não havia iniciado ao salvar um arquivo de estado salvo (corrige #1570) – A mensagem de diálogo “A emulação ainda não foi iniciada” era mostrada incorretamente se você também cancelasse um aviso de condições inseguras durante a mensagem de salvar o estado.