Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
CiriousJoker committed Sep 23, 2016
0 parents commit 1cf4955
Show file tree
Hide file tree
Showing 7 changed files with 790 additions and 0 deletions.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2016 Philipp Bauer

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, and/or sublicense
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# nTrade Advanced

A program for the [Ti-Nspire](https://education.ti.com/en/us/products/calculators/graphing-calculators/ti-nspire-cx-cas-handheld/), which allows you to trade Pokemon between the third generation Pokemon games *(FireRed, LeafGreen, Ruby, Sapphire & Emerald)*

##Screenshots##
<img src="screenshots/Screenshot.png" width="320px" height="240px"/>

##Requirements
[Ndless](http://ndless.me/) is required.
Currently nTrade Advanced confirmed to work on the following versions of Ndless
- [x] 3.1
- [x] 3.6
- [x] 3.9
- [x] 4.0
- [ ] 4.2

##Usage
1. Copy your and your friend's savestate into ***/documents/1.sav*** and ***/documents/2.sav***
2. Start nTrade Advanced
3. Select, which Pokemon you want to trade
4. Trade

##Other Functions
####Fixing savefiles
>When a savefile gets corrupted (for example due to cheating), this might fix it for you.
>Here are some excellent links on how a .sav file is structured in the third generation
>* [Save Data Structure](http://bulbapedia.bulbagarden.net/wiki/Save_data_structure_in_Generation_III)
>* [Pokemon Data Structure](http://bulbapedia.bulbagarden.net/wiki/Pok%C3%A9mon_data_structure_in_Generation_III)
>
>What the function does, is that it recalculates the checksum of each section, so the game believes, that the .sav file is valid (even if it's completely messed up). This lets you at least load the save file (and maybe rescue some Pokemon)
>**However** it does **not** recover corrupted Pokemon (so-called *Bad Eggs*) as each Pokemon has it's own checksum and I haven't yet figured out, how this one is getting calculated
##License
This sourcecode is licensed under the [MIT license](LICENSE)
Binary file added bin/nTradeAdvanced.tns
Binary file not shown.
Binary file added screenshots/Screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 42 additions & 0 deletions src/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
DEBUG = FALSE
GCC = nspire-gcc
AS = nspire-as
GXX=nspire-g++
LD = nspire-ld-bflt
GCCFLAGS = -Wall -W -marm -std=gnu99
LDFLAGS =
ifeq ($(DEBUG),FALSE)
GCCFLAGS += -Os
else
GCCFLAGS += -O0 -g
LDFLAGS += --debug
endif
CPPOBJS = $(patsubst %.cpp,%.o,$(wildcard *.cpp))
OBJS = $(patsubst %.c,%.o,$(wildcard *.c)) $(patsubst %.S,%.o,$(wildcard *.S)) $(CPPOBJS)
ifneq ($(strip $(CPPOBJS)),)
LDFLAGS += --cpp
endif
EXE = nTradeAdvanced.tns
DISTDIR = .
vpath %.tns $(DISTDIR)

all: $(EXE)

%.o: %.c
$(GCC) $(GCCFLAGS) -c $<

%.o: %.cpp
$(GXX) $(GCCFLAGS) -c $<

%.o: %.S
$(AS) -c $<

$(EXE): $(OBJS)
mkdir -p $(DISTDIR)
$(LD) $^ -o $(DISTDIR)/$@ $(LDFLAGS)
ifeq ($(DEBUG),FALSE)
@rm -f $(DISTDIR)/*.gdb
endif

clean:
rm -f *.o *.elf $(DISTDIR)/*.gdb $(DISTDIR)/$(EXE)
Loading

0 comments on commit 1cf4955

Please sign in to comment.