Skip to content

Commit

Permalink
Ref #85 ART/Prefetch有効化
Browse files Browse the repository at this point in the history
  • Loading branch information
kamiyaowl committed Sep 23, 2019
1 parent d8871ac commit 11fe168
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions embedded/main.cpp
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
#include "mbed.h"

// for peripheral
#include "stm32f769i_discovery.h"
#include "stm32f769i_discovery_lcd.h"
#include "stm32f769i_discovery_sdram.h"
#include "stm32f769i_discovery_ts.h"
#include "stm32f769i_discovery_sd.h"
#include "stm32f769i_discovery_audio.h"

// for system
#include "stm32f7xx_hal_flash.h"
#include "core_cm7.h"

// for emulator
#include "rust_nes_emulator_embedded.h"


Expand All @@ -32,6 +37,8 @@ void print_framebuffer(uint32_t offset_x, uint32_t offset_y, uint32_t scale) {
int main()
{
// for performance
__HAL_FLASH_ART_ENABLE();
__HAL_FLASH_PREFETCH_BUFFER_ENABLE();
SCB_EnableDCache();
SCB_EnableICache();
__DMB();
Expand Down
4 changes: 2 additions & 2 deletions embedded/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ pub unsafe extern "C" fn EmbeddedEmulator_reset() {
/// `data` - nesファイルのバイナリ
#[no_mangle]
pub unsafe extern "C" fn EmbeddedEmulator_load() -> bool {
// let binary = include_bytes!("../../roms/other/hello.nes");
let binary = include_bytes!("../../roms/my_dump/mario.nes");
let binary = include_bytes!("../../roms/other/hello.nes");
// let binary = include_bytes!("../../roms/my_dump/mario.nes");

if let Some(ref mut emu) = EMULATOR {
let success = emu
Expand Down

0 comments on commit 11fe168

Please sign in to comment.