Skip to content
This repository was archived by the owner on Jun 29, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
b1b3d10
add displaytest initial checkin
networkfusion Jun 19, 2020
3ee9010
comment out unsupported res (for the moment)
networkfusion Jun 19, 2020
7820a32
fix lost issues with mkdfs on windows
networkfusion Jun 20, 2020
ef4d14e
fix tools
networkfusion Jun 22, 2020
e780767
Add newest resolutions found in official version
networkfusion Jun 23, 2020
7d3e459
add n64memory
networkfusion Jun 23, 2020
dae15fa
fix compiler errors (not sure if they are correct)
networkfusion Jun 23, 2020
deaf509
revert n64memory, it is too sketchy!
networkfusion Jun 23, 2020
d77f87d
Bring in latest libdragon change align display buf
networkfusion Jun 23, 2020
05b32df
Update comment in previous commit.
networkfusion Jun 23, 2020
cfd51bd
write register rather than DRAM register
networkfusion Jun 24, 2020
18ff6eb
Adds latest changes
networkfusion Jun 25, 2020
94ccc58
Reintroduce sprite mirroring
networkfusion Jun 25, 2020
7355868
Fix sprite rendering when mirror disabled?
networkfusion Jun 25, 2020
db578eb
Minor fixups
networkfusion Jun 25, 2020
13ab9c3
revert RSP to official version for the moment
networkfusion Jun 25, 2020
558a476
Revert whitespace changes in system.c
networkfusion Jun 25, 2020
d15093d
correct xscale
networkfusion Jun 25, 2020
3f7e9fe
Add extra header options for convenience.
networkfusion Jun 25, 2020
841ac3e
Further try!
networkfusion Jun 25, 2020
dad177e
further reverts to mksprite (whitespace/comments)
networkfusion Jun 25, 2020
8ecb279
Try a different path...
networkfusion Jun 26, 2020
0625d2e
Try another
networkfusion Jun 26, 2020
a9d5b6a
revert change to system.c errno
networkfusion Jun 26, 2020
aadb467
Corrects header bytes in mksprite
networkfusion Jun 26, 2020
a1243d0
correct issues with newlib includes?
networkfusion Jun 29, 2020
7b90bee
Minor spelling correction.
networkfusion Jun 29, 2020
1827e59
correct xscale for PAL 512p
networkfusion Jun 30, 2020
c56c83f
try different offset for high res...
networkfusion Jun 30, 2020
a373182
Correct me...
networkfusion Jun 30, 2020
1798da1
remove un-necessary include.
networkfusion Jun 30, 2020
631e5a8
Make fonts more generic
networkfusion Jul 3, 2020
3e50996
add missing proto to last commit
networkfusion Jul 3, 2020
062aef5
revert font.h to original
networkfusion Jul 3, 2020
697bc24
revert last commit for the moment
networkfusion Jul 3, 2020
c3026c8
Fix some whitespace issues
networkfusion Aug 5, 2020
7f15d92
Further whitespace changes
networkfusion Aug 5, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ install:
script:
- docker pull anacierdem/libdragon:toolchain
- docker run --name=libdragon -d --mount type=bind,source=$(pwd),target=/libdragon -w=/libdragon anacierdem/libdragon:toolchain tail -f /dev/null
- docker exec libdragon /bin/bash ./build.sh
- docker exec libdragon /bin/bash ./build.sh

2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
## [1.3.9] - 2019-27-10
### Added

- Add texture mirroring. https://github.com/DragonMinded/libdragon/commit/00a6cc8e6d136cf2578a50320f6ff0814dfb6657
- Add texture mirroring. https://github.com/DragonMinded/libdragon/commit/00a6cc8e6d136cf2578a50320f6ff0814dfb6657
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ install: libdragon.a libdragonsys.a
install -m 0644 libdragonsys.a $(INSTALLDIR)/mips64-elf/lib/libdragonsys.a

install -m 0644 n64.ld $(INSTALLDIR)/mips64-elf/lib/n64.ld
install -m 0644 header $(INSTALLDIR)/mips64-elf/lib/header
install -m 0644 headers/header $(INSTALLDIR)/mips64-elf/lib/header

clean:
rm -f *.o *.a
Expand Down
8 changes: 6 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,12 @@ jobs:

mkdir -p $BUILD_ARTIFACTSTAGINGDIRECTORY/lib/
cp "$BUILD_SOURCESDIRECTORY/"*.a "$BUILD_ARTIFACTSTAGINGDIRECTORY/lib/"
cp "$BUILD_SOURCESDIRECTORY/"*.ld "$BUILD_ARTIFACTSTAGINGDIRECTORY/lib/"
cp "$BUILD_SOURCESDIRECTORY/header" "$BUILD_ARTIFACTSTAGINGDIRECTORY/lib/"

mkdir -p $BUILD_ARTIFACTSTAGINGDIRECTORY/ldscripts/
cp "$BUILD_SOURCESDIRECTORY/"*.ld "$BUILD_ARTIFACTSTAGINGDIRECTORY/ldscripts/"

mkdir -p $BUILD_ARTIFACTSTAGINGDIRECTORY/headers/
cp "$BUILD_SOURCESDIRECTORY/headers/"* "$BUILD_ARTIFACTSTAGINGDIRECTORY/headers/"
displayName: 'Move Artifacts to Staging Directory'
continueOnError: false

Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ make -j8 && \
make install && \
popd && \
rm -rf /tmp/libmikmod && \
make -j8 examples
make -j8 examples
1 change: 0 additions & 1 deletion examples/dfsdemo/dfsdemo.c
Original file line number Diff line number Diff line change
Expand Up @@ -411,4 +411,3 @@ int main(void)

return 0;
}

2 changes: 1 addition & 1 deletion examples/ucodetest/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ basic.o: loader.S text.section.bin data.section.bin
clean:
rm -f *.v64 *.z64 *.elf *.o *.bin

.PHONY : clean
.PHONY : clean
2 changes: 1 addition & 1 deletion examples/ucodetest/basic.S
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ deadloop:

.data
var1: .word 0xDEADBEEF
var2: .word 0xBEEFF00D
var2: .word 0xBEEFF00D
2 changes: 1 addition & 1 deletion examples/ucodetest/loader.S
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ __basic_ucode_start:

.balign 8
.global __basic_ucode_end
__basic_ucode_end:
__basic_ucode_end:
Binary file added headers/header
Binary file not shown.
Binary file added headers/header-0
Binary file not shown.
Binary file added headers/header-6105
Binary file not shown.
Binary file added headers/header-6105-0
Binary file not shown.
Binary file added headers/header-6105-ntsc
Binary file not shown.
Binary file added headers/header-6105-pal
Binary file not shown.
Binary file added headers/header-ntsc
Binary file not shown.
Binary file added headers/header-pal
Binary file not shown.
5 changes: 5 additions & 0 deletions include/audio.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ extern "C" {
*/
typedef void(*audio_fill_buffer_callback)(short *buffer, size_t numsamples);

void audio_init_ex(const int frequency, int numbuffers, int maxsamples, void (*cb)());

void audio_init(const int frequency, int numbuffers);
void audio_set_buffer_callback(audio_fill_buffer_callback fill_buffer_callback);
void audio_pause(bool pause);
Expand All @@ -34,6 +36,9 @@ void audio_write_silence();
void audio_close();
int audio_get_frequency();
int audio_get_buffer_length();
void audio_set_num_samples(int numsamples);
short *audio_get_next_buffer(int *lastbuf);
volatile int audio_send_buffer(int lastbuf);

#ifdef __cplusplus
}
Expand Down
18 changes: 17 additions & 1 deletion include/controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
/**
* @name Bitmasks for controller status
* @see #get_controllers_present
* @see #get_accessories_present
* @see #get_accessories_present
* @{
*/
/** @brief Controller 1 Inserted */
Expand Down Expand Up @@ -44,6 +44,21 @@
#define ACCESSORY_TRANSFERPAK 4
/** @} */

/**
* @name Controller ID Values
* @see #identify_controller
* @{
*/
/** @brief No controller present */
#define CONTROLLER_NONE 0xFF
/** @brief Mouse present */
#define CONTROLLER_MOUSE 2
/** @brief Keyboard present */
#define CONTROLLER_KEYBOARD 4 // ?? fixme!
/** @brief Digital pad present */
#define CONTROLLER_PAD 5
/** @} */

/**
* @name SI Error Values
* @{
Expand Down Expand Up @@ -192,6 +207,7 @@ int get_dpad_direction( int controller );
int read_mempak_address( int controller, uint16_t address, uint8_t *data );
int write_mempak_address( int controller, uint16_t address, uint8_t *data );
int identify_accessory( int controller );
int identify_controller( int controller );
void rumble_start( int controller );
void rumble_stop( int controller );
void execute_raw_command( int controller, int command, int bytesout, int bytesin, unsigned char *out, unsigned char *in );
Expand Down
28 changes: 25 additions & 3 deletions include/display.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,19 @@
* @{
*/

/**
* @brief Valid television types
*/
typedef enum
{
/** @brief PAL */
TV_TYPE_PAL,
/** @brief NTSC */
TV_TYPE_NTSC,
/** @brief MPAL */
TV_TYPE_MPAL
} tvtype_t;

/**
* @brief Valid video resolutions
*/
Expand All @@ -29,7 +42,7 @@ typedef enum
/** @brief 512x240 mode, high-res progressive */
RESOLUTION_512x240,
/** @brief 640x240 mode, high-res progressive */
RESOLUTION_640x240,
RESOLUTION_640x240
} resolution_t;

/** @brief Valid bit depths */
Expand All @@ -38,7 +51,9 @@ typedef enum
/** @brief 16 bits per pixel (5-5-5-1) */
DEPTH_16_BPP,
/** @brief 32 bits per pixel (8-8-8-8) */
DEPTH_32_BPP
DEPTH_32_BPP,
/** @brief 16 bits per pixel (5-5-5-1) with HW Dither */
DEPTH_16_BPP_DITHER
} bitdepth_t;

/** @brief Valid gamma correction settings */
Expand All @@ -62,7 +77,13 @@ typedef enum
/** @brief Anti-aliasing and resampling with fetch-on-need */
ANTIALIAS_RESAMPLE_FETCH_NEEDED,
/** @brief Anti-aliasing and resampling with fetch-always */
ANTIALIAS_RESAMPLE_FETCH_ALWAYS
ANTIALIAS_RESAMPLE_FETCH_ALWAYS,
/** @brief Resampling anti-aliasing Divot off */
ANTIALIAS_RESAMPLE_NODIVOT,
/** @brief Anti-aliasing and resampling with fetch-on-need Divot off */
ANTIALIAS_RESAMPLE_FETCH_NEEDED_NODIVOT,
/** @brief Anti-aliasing and resampling with fetch-always Divot off */
ANTIALIAS_RESAMPLE_FETCH_ALWAYS_NODIVOT
} antialias_t;

/** @brief Display context */
Expand All @@ -73,6 +94,7 @@ extern "C" {
#endif

void display_init( resolution_t res, bitdepth_t bit, uint32_t num_buffers, gamma_t gamma, antialias_t aa );
void display_init_ex( tvtype_t tv, resolution_t res, bitdepth_t bit, uint32_t num_buffers, gamma_t gamma, antialias_t aa );
display_context_t display_lock();
void display_show(display_context_t disp);
void display_close();
Expand Down
Loading