Skip to content

Commit

Permalink
Fixed icon
Browse files Browse the repository at this point in the history
  • Loading branch information
JaCzekanski committed Mar 6, 2015
1 parent 063261d commit f90792c
Show file tree
Hide file tree
Showing 8 changed files with 65 additions and 28 deletions.
2 changes: 1 addition & 1 deletion AnotherNES.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<AdditionalDependencies>SDL2_ttf.lib;sdl2.lib;XInput9_1_0.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>SDL2_ttf.lib;SDL2_image.lib;sdl2.lib;XInput9_1_0.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## AnotherNES - NES console emulator/debugger

![logo](photos/logo.png)

#WARNING

If you're looking for **good** NES emulator check out [PuNES](http://forums.nesdev.com/viewtopic.php?t=6928), [Nestopia](http://nestopia.sourceforge.net/) or [FCEUX](http://www.fceux.com/web/home.html).
Expand All @@ -11,7 +13,7 @@ This is an educational project for which purpose was learning how to create an e
**License: GNU GPLv2**

#Language and libraries
I am using C++ (occasionally c++11 and c++14 features). The IDE is Visual Studio 2013. For graphics and sound **SDL 2** is used. As for now code is not cross-platform, because Windows libraries such as XInput and Winapi are used (it will change in a future). For GUI I've created simple SDL and **SDL_ttf** based library, but in the future I'll move to Qt.
I am using C++ (occasionally c++11 and c++14 features). The IDE is Visual Studio 2013. For graphics and sound **SDL 2** and **SDL2\_image** is used. As for now code is not cross-platform, because Windows libraries such as XInput and Winapi are used (it will change in a future). For GUI I've created simple SDL and **SDL_ttf** based library, but in the future I'll move to Qt.

#Details
- CPU (2A03, 6502 clone) - 90% completed
Expand Down Expand Up @@ -63,7 +65,7 @@ I am using C++ (occasionally c++11 and c++14 features). The IDE is Visual Studio
Start - S

# Building
To build this project you need SDL2 and SDL_ttf paths configured in Visual Studio.
To build this project you need SDL2, SDL2\_ttf and SDL2\_image paths configured in Visual Studio.

# Screenshots

Expand Down
Binary file added photos/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 5 additions & 3 deletions src/App.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include <XInput.h>
#include <SDL_syswm.h>
#include <SDL_ttf.h>
#include <SDL_image.h>
#include <algorithm>
#include "resource.h"

Expand Down Expand Up @@ -39,6 +40,7 @@ bool App::initializeSDL()
Log->Fatal("SDL_Init failed");
return false;
}
IMG_Init(0);
return true;
}

Expand Down Expand Up @@ -91,9 +93,8 @@ SDL_Window* App::createMainWindow()
return false;
}

SDL_Surface *icon = SDL_LoadBMP("icon.bmp");
if (!icon)
Log->Error("Cannot load icon.bmp");
SDL_Surface *icon = IMG_Load("icon.ico");
if (!icon) Log->Error("Cannot load icon.ico");
else
{
SDL_SetWindowIcon(mainWindow, icon);
Expand Down Expand Up @@ -562,6 +563,7 @@ void App::cleanup()
SDL_DestroyTexture(canvas);
SDL_DestroyRenderer(renderer);
SDL_DestroyWindow(mainWindow);
IMG_Quit();
SDL_Quit();
}

Expand Down
2 changes: 0 additions & 2 deletions src/resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
#define RES_MENU 101
#define DIALOG_ABOUT 109
#define RES_ICON_SMALL 116
#define RES_ICON_BIG 120
#define ABOUT_IMAGE 1003
#define ABOUT_VERSION 1004
#define FILE_OPEN 40000
#define FILE_CLOSE 40001
Expand Down
30 changes: 11 additions & 19 deletions src/resource.rc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Generated by ResEdit 1.5.11
// Copyright (C) 2006-2012
// Generated by ResEdit 1.6.3
// Copyright (C) 2006-2014
// http://www.resedit.net

#include <windows.h>
Expand All @@ -10,14 +10,6 @@



//
// Bitmap resources
//
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
RES_ICON_BIG BITMAP "..\\iconbig.bmp"



//
// Menu resources
//
Expand Down Expand Up @@ -51,9 +43,9 @@ RES_MENU MENU
{
MENUITEM "OAM", DEBUG_WINDOWS_OAM
MENUITEM "Palette", DEBUG_WINDOWS_PALETTE
MENUITEM "Nametable", DEBUG_WINDOWS_NAMETABLE
MENUITEM "Nametable", DEBUG_WINDOWS_NAMETABLE
MENUITEM "Patterntable", DEBUG_WINDOWS_PATTERNTABLE
MENUITEM "RAM", DEBUG_WINDOWS_RAM
MENUITEM "RAM", DEBUG_WINDOWS_RAM
MENUITEM "CPU", DEBUG_WINDOWS_CPU
}
}
Expand All @@ -69,17 +61,17 @@ RES_MENU MENU
// Dialog resources
//
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
DIALOG_ABOUT DIALOG 0, 0, 197, 198
DIALOG_ABOUT DIALOG 0, 0, 197, 138
STYLE DS_3DLOOK | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_CAPTION | WS_VISIBLE | WS_POPUP | WS_SYSMENU
CAPTION "AnotherNES: About"
FONT 8, "Ms Shell Dlg"
{
GROUPBOX "AnotherNES", IDC_STATIC, 7, 7, 183, 184
CONTROL RES_ICON_BIG, ABOUT_IMAGE, WC_STATIC, SS_BITMAP | SS_CENTERIMAGE, 55, 18, 86, 86
LTEXT "Author: Jakub Czeka�ski", IDC_STATIC, 59, 176, 80, 8, SS_LEFT
LTEXT "AnotherNES", IDC_STATIC, 79, 112, 40, 8, SS_LEFT
LTEXT "Version: ", IDC_STATIC, 78, 123, 28, 8, SS_LEFT
LTEXT "0.00", ABOUT_VERSION, 109, 123, 15, 8, SS_LEFT
GROUPBOX "AnotherNES", IDC_STATIC, 7, 7, 183, 124, 0, WS_EX_LEFT
ICON RES_ICON_SMALL, 0, 67, 18, 64, 64, SS_ICON | SS_REALSIZECONTROL | SS_REALSIZEIMAGE, WS_EX_LEFT
LTEXT "Author: Jakub Czeka�ski", IDC_STATIC, 59, 114, 80, 8, SS_LEFT, WS_EX_LEFT
LTEXT "AnotherNES", IDC_STATIC, 79, 91, 40, 8, SS_LEFT, WS_EX_LEFT
LTEXT "Version: ", IDC_STATIC, 78, 102, 28, 8, SS_LEFT, WS_EX_LEFT
LTEXT "0.00", ABOUT_VERSION, 109, 102, 15, 8, SS_LEFT, WS_EX_LEFT
}


Expand Down
2 changes: 1 addition & 1 deletion src/version.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#pragma once

#define MAJOR_VERSION 0
#define MINOR_VERSION 2
#define MINOR_VERSION 3
43 changes: 43 additions & 0 deletions todo.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
Klasa Config/Options
- Zapis i odczyt INI
- Singleton?

Okno input
- Niestety musi u�ywa� mojego GUI
- Obs�uga 2 graczy
- Klawiatura
- Xinput (domy�lny mapping)
- SDL Joystick api

CPU_RAM
- Klasa bazowa Mapper (definuje mapper 0?)
x Mapper 0 - NROM, no mapping
X Mapper 1 - MMC1 (Zelda, Mega Man, Metroid) - quite easy
x Mapper 2 (UxROM): ROM remapping, CHR-RAM (Contra, Metal Gear, Duck tales)
x Mapper 3 - CNROM - CHR remapping (Arkanoid)
/ Mapper 4 - MMC3 (Megaman 3,4,5,6, Kirby's Adventure, SMB2,3)
FIX IRQ / MIRRORING glitch
- Mapper 65 - Irem's H3001 (Chip'n'Dales, Antarctic Adventures, Bubble Bobble
- Mapper 7 - Rare games, easy, just PRG mapping
- Normalny dost�p do PPU i APU

Input
- Obs�uga klawiatury, xinput i joystick


Debugger
- Step, Continue, Pause, Restart
- Step til return
- Podgl�d rejestr�w
- Podgl�d stosu
- Podgl�d pami�ci (RAM lub ca�a przestrze� adresowa)
- Edycja kodu (opcody lub prosty assembler jak b�dzie czas)
- Breakpointy
- Memory breakpoint
- Watches

Emulator
- Save states?
- Obs�uga save (.sav)
- Hard reset
- Skr�ty klawiszowe

0 comments on commit f90792c

Please sign in to comment.