This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <stdint.h> | |
#include <stdbool.h> | |
#include <math.h> // For INFINITY | |
#include "llama.h" | |
#define MODEL_PATH "llama-3.2-1b-instruct-q8_0.gguf" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
MIT License | |
Copyright (c) Ninja Dynamics | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> // Include standard input/output header | |
int main() { | |
char name[50]; // Declare an array of chars to store the name | |
int age; // Declare an integer to store the age | |
printf("Enter your name: "); // Prompt the user to enter their name | |
scanf("%49[^\n]", name); // Read a string from the user input including spaces | |
getchar(); // Consume the newline character to avoid issues with subsequent inputs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#version 450 // Specify the GLSL version to use | |
// CRT Emulation | |
// by Mattias | |
// https://www.shadertoy.com/view/lsB3DV | |
// Updated 2024.11.17 by Ninja Dynamics | |
// Define a push constant block to pass parameters to the shader | |
layout(push_constant) uniform Push { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
beetle_psx_hw_adaptive_smoothing = "disabled" | |
beetle_psx_hw_analog_calibration = "disabled" | |
beetle_psx_hw_analog_toggle = "disabled" | |
beetle_psx_hw_analog_toggle_combo = "l1+r1+select" | |
beetle_psx_hw_analog_toggle_hold = "1" | |
beetle_psx_hw_aspect_ratio = "corrected" | |
beetle_psx_hw_cd_access_method = "sync" | |
beetle_psx_hw_cd_fastload = "2x(native)" | |
beetle_psx_hw_core_timing_fps = "force_progressive" | |
beetle_psx_hw_cpu_dynarec = "execute_one" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.segment "CODE" | |
.export _famitone_init,_famitone_update | |
.export _music_play,_music_stop,_music_pause | |
;from mmc3.h | |
.importzp _music_bank,_sfx_bank,_dpcm_bank | |
.importzp _mmc3_cpu_bank, _mmc3_register | |
.importzp _mmc3_last_register, _mmc3_last_cpu_bank | |
.importzp _active_data_bank,_active_data_bank_index |