Skip to content

Commit

Permalink
Sorted out
Browse files Browse the repository at this point in the history
  • Loading branch information
mojontwins committed Oct 5, 2018
1 parent a0680ea commit 8e65454
Show file tree
Hide file tree
Showing 228 changed files with 1,921 additions and 16,618 deletions.
1,382 changes: 653 additions & 729 deletions mk1_nes.sublime-workspace

Large diffs are not rendered by default.

19 changes: 7 additions & 12 deletions testers/00_tester_sideview/dev/assets/enems0.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,10 @@ const unsigned char enems_0 [] = {
0x00, 0x10, 0x10, 0x00, 0x04, 0x6B, 0x9B, 0x01,
0x0B, 0x3D, 0x3C, 0x00, 0x00, 0x10, 0x10, 0x00,
0x08, 0xCB, 0xC3, 0x00, 0x09, 0x9E, 0x8E, 0x04,
0x0A, 0x92, 0xA2, 0x02, 0x0A, 0x96, 0xB6, 0x02,
0x0A, 0x99, 0xB9, 0x01, 0x00, 0x10, 0x10, 0x00,
0x01, 0xB5, 0xB1, 0x02, 0x01, 0xB1, 0xB5, 0x01,
0x00, 0x10, 0x10, 0x00, 0x02, 0xB9, 0xBD, 0x01,
0x00, 0x10, 0x10, 0x00, 0x00, 0x10, 0x10, 0x00,
0x01, 0x65, 0x6B, 0x02, 0x00, 0x10, 0x10, 0x00,
0x00, 0x10, 0x10, 0x00, 0x00, 0x10, 0x10, 0x00,
0x0A, 0x92, 0xA2, 0x02, 0x01, 0xB5, 0xB1, 0x02,
0x01, 0xB1, 0xB5, 0x01, 0x00, 0x10, 0x10, 0x00,
0x02, 0xB9, 0xBD, 0x01, 0x00, 0x10, 0x10, 0x00,
0x00, 0x10, 0x10, 0x00, 0x01, 0x65, 0x6B, 0x02,
0x00, 0x10, 0x10, 0x00, 0x00, 0x10, 0x10, 0x00
};

Expand All @@ -26,16 +23,14 @@ const unsigned char enems_0 [] = {
#define MAX_ENEMS_TYPE_6_0 1
#define MAX_ENEMS_TYPE_8_0 1
#define MAX_ENEMS_TYPE_9_0 1
#define MAX_ENEMS_TYPE_10_0 3
#define MAX_ENEMS_TYPE_10_0 1
#define MAX_ENEMS_TYPE_11_0 1

// Hotspots structure is {T YX} x MAP_W x MAP_H
const unsigned char hotspots_0 [] = {
0x03, 0x4E, 0x02, 0x25, 0x05, 0xB7, 0x00, 0x10,
0x07, 0xA7, 0x08, 0xA7, 0x06, 0xA8, 0x00, 0x10
};
0x03, 0x4E, 0x02, 0x25, 0x05, 0xB7, 0x07, 0xA7,
0x08, 0xA7, 0x06, 0xA8};

#define MAX_HOTSPOTS_TYPE_0_0 2
#define MAX_HOTSPOTS_TYPE_1_0 0
#define MAX_HOTSPOTS_TYPE_2_0 1
#define MAX_HOTSPOTS_TYPE_3_0 1
Expand Down
18 changes: 8 additions & 10 deletions testers/00_tester_sideview/dev/assets/map0.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,27 @@
// Generated by rlemap2.exe
// Copyleft 2015, 2017 The Mojon Twins

// Map Size Is 4x2
// Map Size Is 3x2
// Screen Size Is 16x12

// Compressed map structure, screens
// Format: [SCR_SIZE, [ T COUNT | 0xF0 + COUNT T1 T2 T3 T4 ... ] | 0, 96 packed bytes]

const unsigned char scr_0_00 [] = { 0x44, 0x00, 0x20, 0xf0, 0x20, 0x00, 0x0e, 0xf0, 0x20, 0x00, 0x0e, 0xf0, 0x20, 0xf0, 0x00, 0xf0, 0xaa, 0x07, 0x07, 0xf1, 0x21, 0x02, 0x00, 0x0f, 0xf0, 0x20, 0xf0, 0x99, 0x00, 0x04, 0xf0, 0x10, 0x00, 0x06, 0xf0, 0x20, 0x00, 0x0e, 0xf0, 0x22, 0x00, 0x07, 0xf0, 0x44, 0x00, 0x05, 0xf0, 0x22, 0x00, 0x09, 0xf0, 0x10, 0xf1, 0x00, 0x02, 0xf0, 0x22, 0xf0, 0x33, 0x00, 0x0b, 0x02, 0x05, 0x04, 0x05, 0x02, 0x04, 0xf0, 0x52 };
const unsigned char scr_0_01 [] = { 0x48, 0x00, 0x0f, 0xf0, 0x10, 0x00, 0x0e, 0xf0, 0x10, 0x00, 0x06, 0xf0, 0xe0, 0x00, 0x06, 0xf0, 0x10, 0x00, 0x06, 0xf0, 0xe0, 0x00, 0x06, 0xf0, 0x10, 0x00, 0x06, 0xf0, 0xe0, 0x00, 0x06, 0xf0, 0x10, 0x00, 0x04, 0x06, 0x06, 0x00, 0x04, 0xf0, 0x10, 0x00, 0x0e, 0xf0, 0x10, 0x00, 0x0e, 0xf0, 0x10, 0x00, 0x0e, 0xf0, 0x10, 0xf1, 0x00, 0x15, 0x05, 0x07, 0xf0, 0x10, 0xf0, 0x01, 0xf1, 0x00, 0x01, 0x05, 0x08, 0xf0, 0x10, 0xf0, 0x0f, 0x02, 0x10 };
const unsigned char scr_0_02 [] = { 0x41, 0xf0, 0x10, 0x00, 0x0e, 0xf0, 0x10, 0x00, 0x0e, 0xf0, 0x10, 0x00, 0x0e, 0xf0, 0x10, 0x00, 0x0e, 0xf0, 0x10, 0x00, 0x0e, 0xf0, 0x10, 0x00, 0x0e, 0xf0, 0x10, 0x00, 0x0e, 0x01, 0x04, 0x07, 0x07, 0x00, 0x05, 0xf0, 0x10, 0xf0, 0x00, 0x07, 0x07, 0x00, 0x05, 0xf0, 0x10, 0xf0, 0x00, 0x07, 0x07, 0xf0, 0x00, 0xf1, 0x22, 0x20, 0xf1, 0x00, 0x07, 0xf1, 0x77, 0x07, 0xf0, 0x77, 0xf0, 0x00, 0x02, 0x13 };
const unsigned char scr_0_03 [] = { 0x18, 0x00, 0x5f, 0xf0, 0x20, 0x00, 0x0e, 0xf0, 0x20, 0x00, 0x0e, 0xf0, 0x20, 0x00, 0x0e, 0xf0, 0x22, 0x00, 0x0d, 0x02, 0x06, 0x00, 0x07, 0x02, 0x15 };
const unsigned char scr_0_04 [] = { 0x3c, 0x02, 0x0e, 0xf0, 0x52, 0xf0, 0x20, 0x00, 0x0c, 0xf1, 0x50, 0x20, 0x00, 0x0c, 0xf1, 0x50, 0x20, 0x00, 0x0c, 0xf1, 0x50, 0x20, 0x00, 0x0c, 0xf1, 0x50, 0x20, 0x00, 0x0c, 0xf1, 0x50, 0x20, 0x00, 0x0c, 0xf1, 0x50, 0x20, 0x00, 0x0c, 0xf1, 0x50, 0x20, 0x00, 0x0c, 0xf1, 0x50, 0x20, 0x00, 0x0c, 0xf1, 0x50, 0x20, 0x00, 0x04, 0xf1, 0x2c, 0x25, 0x05, 0x06, 0x02, 0x10 };
const unsigned char scr_0_05 [] = { 0x0d, 0x02, 0x10, 0x00, 0x90, 0x05, 0x06, 0xf1, 0x2d, 0x20, 0x00, 0x06, 0x02, 0x10 };
const unsigned char scr_0_06 [] = { 0x2a, 0x02, 0x10, 0x00, 0x55, 0x07, 0x07, 0x00, 0x09, 0x07, 0x07, 0x00, 0x09, 0xf0, 0x77, 0xf1, 0x00, 0x07, 0xf0, 0x70, 0x00, 0x08, 0xf0, 0x77, 0xf1, 0x00, 0x07, 0xf0, 0x70, 0x00, 0x08, 0xf0, 0x77, 0xf1, 0x22, 0x27, 0xf0, 0x70, 0xf1, 0x00, 0x02, 0x02, 0x0f };
const unsigned char scr_0_07 [] = { 0x2a, 0x02, 0x10, 0x00, 0x0f, 0xf0, 0x20, 0x00, 0x0e, 0xf0, 0x20, 0x00, 0x0e, 0xf0, 0x20, 0x00, 0x0e, 0xf0, 0x20, 0x00, 0x0e, 0xf0, 0x20, 0x00, 0x0e, 0xf0, 0x20, 0x00, 0x0e, 0xf0, 0x20, 0x00, 0x0e, 0xf0, 0x20, 0x00, 0x0e, 0xf0, 0x20, 0x00, 0x0e, 0x02, 0x11 };
const unsigned char scr_0_02 [] = { 0x47, 0xf0, 0x10, 0x00, 0x0e, 0xf0, 0x10, 0x00, 0x0e, 0xf0, 0x10, 0x00, 0x0e, 0xf0, 0x10, 0x00, 0x0d, 0xf0, 0x21, 0x00, 0x0e, 0xf0, 0x21, 0x00, 0x0e, 0xf0, 0x21, 0x00, 0x0e, 0xf0, 0x21, 0xf1, 0x11, 0x17, 0x07, 0x06, 0xf2, 0x00, 0x20, 0x21, 0xf1, 0x00, 0x07, 0x07, 0x06, 0xf0, 0x00, 0xf1, 0x22, 0x21, 0xf1, 0x00, 0x07, 0x07, 0x06, 0xf0, 0x00, 0xf1, 0x22, 0x20, 0xf1, 0x00, 0x07, 0xf1, 0x77, 0x07, 0xf0, 0x77, 0xf0, 0x00, 0x02, 0x13 };
const unsigned char scr_0_03 [] = { 0x3c, 0x02, 0x0e, 0xf0, 0x52, 0xf0, 0x20, 0x00, 0x0c, 0xf1, 0x50, 0x20, 0x00, 0x0c, 0xf1, 0x50, 0x20, 0x00, 0x0c, 0xf1, 0x50, 0x20, 0x00, 0x0c, 0xf1, 0x50, 0x20, 0x00, 0x0c, 0xf1, 0x50, 0x20, 0x00, 0x0c, 0xf1, 0x50, 0x20, 0x00, 0x0c, 0xf1, 0x50, 0x20, 0x00, 0x0c, 0xf1, 0x50, 0x20, 0x00, 0x0c, 0xf1, 0x50, 0x20, 0x00, 0x04, 0xf1, 0x2c, 0x25, 0x05, 0x06, 0x02, 0x10 };
const unsigned char scr_0_04 [] = { 0x0d, 0x02, 0x10, 0x00, 0x90, 0x05, 0x06, 0xf1, 0x2d, 0x20, 0x00, 0x06, 0x02, 0x10 };
const unsigned char scr_0_05 [] = { 0x49, 0x02, 0x10, 0x00, 0x0f, 0xf0, 0x20, 0x00, 0x0e, 0xf0, 0x20, 0x00, 0x0e, 0xf0, 0x20, 0x00, 0x0e, 0xf0, 0x20, 0x00, 0x0e, 0xf0, 0x20, 0x00, 0x04, 0x07, 0x07, 0xf1, 0x00, 0x02, 0x00, 0x05, 0x07, 0x07, 0xf1, 0x00, 0x02, 0x00, 0x05, 0xf0, 0x77, 0xf1, 0x00, 0x07, 0xf0, 0x70, 0xf1, 0x00, 0x20, 0x00, 0x04, 0xf0, 0x77, 0xf1, 0x00, 0x07, 0xf0, 0x70, 0xf1, 0x00, 0x20, 0x00, 0x04, 0xf0, 0x77, 0xf1, 0x22, 0x27, 0xf0, 0x70, 0xf0, 0x00, 0x02, 0x11 };

// Compressed map array

const unsigned char * const map_0 [] = {
scr_0_00, scr_0_01, scr_0_02, scr_0_03,
scr_0_04, scr_0_05, scr_0_06, scr_0_07
scr_0_00, scr_0_01, scr_0_02,
scr_0_03, scr_0_04, scr_0_05
};

// Total map size in bytes is 410
// Total map size in bytes is 375

// Locks
// Format: NP YX ...
Expand Down
2 changes: 0 additions & 2 deletions testers/00_tester_sideview/dev/assets/precalcs.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

// LUTs

const unsigned char bitmasks [] = {0xfc, 0xf3, 0xcf, 0x3f};

#ifdef ENABLE_MONOCOCOS
const unsigned char monococo_state_times [] = {
MONOCOCO_BASE_TIME_HIDDEN, MONOCOCO_BASE_TIME_APPEARING, MONOCOCO_BASE_TIME_ONBOARD, MONOCOCO_BASE_TIME_APPEARING
Expand Down
51 changes: 0 additions & 51 deletions testers/00_tester_sideview/dev/assets/precalcs.h.bak

This file was deleted.

38 changes: 1 addition & 37 deletions testers/00_tester_sideview/dev/autodefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
#define INTERACTIVES_FROM_CODE
#endif

#if defined (MAP_FORMAT_RLE53_CHRROM) || defined (MAP_FORMAT_RLE44_CHRROM) || defined (DOUBLE_WIDTH)
#if defined (MAP_FORMAT_RLE53_CHRROM)
#define MAP_RENDERER_COMPLEX
#endif

Expand Down Expand Up @@ -106,39 +106,3 @@
#if defined (ENABLE_FANTY) || defined (ENABLE_HOMING_FANTY) || defined (ENABLE_TIMED_FANTY) || defined (ENABLE_BOIOIONG) || defined (ENABLE_CATACROCKS)
#define ENEMS_NEED_FP
#endif

#if defined (PLAYER_TOP_DOWN) && defined (NO_HORIZONTAL_EVIL_TILE)
#undef NO_HORIZONTAL_EVIL_TILE
#endif

#if defined (DOUBLE_WIDTH)
#define NAMETABLE_BASE nametable_base
#define BUFF_SIZE 384
#define COORDS(x,y) (x > 15 ? (192 + (((x) & 0xf) | ((y) << 4))) : ((x) | ((y) << 4)))
#define MAX_PRX 500
#define MAX_ENX 496
#define NENEMS 6
#define EN_X_ABSOLUTE rdaa
#define PRXA gpint
#define ENXA gpint
#define COCO_RDX rdbb
#define PUNCH_RDX rdbb
#define RECOIL_RDX rdbb
#define MAX_TILE_X 31
#define HS_CUR_PANT (n_pant + gpit)
#else
#define NAMETABLE_BASE 0x2000
#define BUFF_SIZE 192
#define COORDS(x,y) ((x) | ((y) << 4))
#define MAX_PRX 244
#define MAX_ENX 240
#define NENEMS 3
#define EN_X_ABSOLUTE _en_x
#define PRXA rda
#define ENXA rda
#define COCO_RDX rdx
#define PUNCH_RDX rdx
#define RECOIL_RDX rdx
#define MAX_TILE_X 15
#define HS_CUR_PANT n_pant
#endif
Binary file modified testers/00_tester_sideview/dev/cart.nes
Binary file not shown.
Binary file removed testers/00_tester_sideview/dev/cart.nes.deb
Binary file not shown.
2 changes: 1 addition & 1 deletion testers/00_tester_sideview/dev/compile.bat
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ cd ..\script

echo Making map
cd ..\map
..\..\..\src\utils\legacy\rlemap2.exe ..\map\level0.map ..\dev\assets\map0.h 4 2 15 0
..\..\..\src\utils\legacy\rlemap2.exe ..\map\level0.map ..\dev\assets\map0.h 3 2 15 0

echo Exporting music and sound
cd ..\dev
Expand Down
12 changes: 5 additions & 7 deletions testers/00_tester_sideview/dev/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,10 @@

// In this section we define map dimmensions, initial and authomatic ending conditions, etc.

#define MAP_W 4 //
#define MAP_W 3 //
#define MAP_H 2 // Map dimmensions in screens
#define MAP_SIZE MAP_W*MAP_H

#define DOUBLE_WIDTH // Experimental 2x mode w/scroll

#define PLAYER_LIFE 5 // Vida máxima (con la que empieza, además)
#define PLAYER_REFILL 1 // Recarga de vida.

Expand All @@ -34,7 +32,7 @@

// If you aim for a single level ROM, fill in those:

#define SCR_INI 0 // Initial screen
#define SCR_INI 1 // Initial screen
#define PLAYER_INI_X 1 //
#define PLAYER_INI_Y 3 // Initial position
//#define SCR_END 99 // Final screen, undefine if N/A
Expand Down Expand Up @@ -151,7 +149,7 @@

// Breakable, beh & 16
#define ENABLE_BREAKABLE // Breakable walls
#define BREAKABLE_LIFE 1 // Amount of hits to break wall
#define BREAKABLE_LIFE 2 // Amount of hits to break wall
#define BREAKABLE_ANIM // Show explosion when breaking
#define BREAKABLE_MAX 4 // Max # of concurrent explosions
#define BREAKABLE_MAX_FRAMES 8 // Frames to show explosion
Expand Down Expand Up @@ -415,7 +413,7 @@
// Cocos will get enabled automaticly on choosing monococos or shooties.

//#define ENABLE_COCOS
#define COCOS_MAX 1
#define COCOS_MAX 3
#define COCO_V 192
//#define COCO_COLLIDES

Expand Down Expand Up @@ -458,7 +456,7 @@
// Shooting behaviour
// ------------------
#define PLAYER_CAN_FIRE // If defined, shooting engine is enabled.
//#define PLAYER_CAN_FIRE_8_WAY // If defined, use diagonals
#define PLAYER_CAN_FIRE_8_WAY // If defined, use diagonals
#define PLAYER_BULLET_SPEED 4 // Pixels/frame.
#define MAX_BULLETS 4 // Max number of bullets on screen. Be careful!.
#define PLAYER_BULLET_Y_OFFSET 0 // vertical offset from the player's top.
Expand Down
2 changes: 1 addition & 1 deletion testers/00_tester_sideview/dev/crt0.s
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ NES_MAPPER =0 ;mapper number
NES_PRG_BANKS =2 ;number of 16K PRG banks, change to 2 for NROM256
NES_CHR_BANKS =1 ;number of 8K CHR banks
.endif
NES_MIRRORING =1 ;0 horizontal, 1 vertical, 8 four screen
NES_MIRRORING =0 ;0 horizontal, 1 vertical, 8 four screen

FT_DPCM_OFF =$ffc0 ;samples offset, $c000 or higher, 64-byte steps
FT_SFX_STREAMS =4 ;number of sound effects played at once, can be 4 or less (faster)
Expand Down
4 changes: 2 additions & 2 deletions testers/00_tester_sideview/dev/definitions.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

// Macros

#define COORDS(x,y) ((x) | ((y) << 4))
#define MSB(x) (((x) >> 8))
#define LSB(x) (((x) & 0xff))
#define SGNI(n) ((n) < 0 ? -1 : 1)
Expand All @@ -26,12 +27,11 @@
#define DELTA(a,b) ((a) < (b) ? (b) - (a) : (a) - (b))
#define ATTR(x,y) (map_attr [COORDS((x),(y))])
#define QTILE(x,y) (map_buff [COORDS((x),(y))])
#define ENEMS_RECOIL_X ((_en_t == 5 || _en_t == 9 || _en_t == 11) ? 0 : ADD_SIGN2 (EN_X_ABSOLUTE, prx, ENEMS_RECOIL_ON_HIT))
#define ENEMS_RECOIL_X ((_en_t == 5 || _en_t == 9 || _en_t == 11) ? 0 : ADD_SIGN2 (_en_x, prx, ENEMS_RECOIL_ON_HIT))
#define ENEMS_RECOIL_Y ((_en_t == 5 || _en_t == 9 || _en_t == 11) ? 0 : ADD_SIGN2 (_en_y, pry, ENEMS_RECOIL_ON_HIT))
#define VRAM_READ (*((unsigned char *) (0x2007)))
#define SET_FROM_PTR(v,p) {__asm__("ldy #0");__asm__("lda (%v),y",p);__asm__("sta %v",v);}
#define IF_PLAYER_TOUCHES(x,y) rdx=(x)<<4;rdy=16+((y)<<4);if(prx+7>=rdx&&prx<=rdx+15&&pry+15>=rdt&&pry<=rdy+15)
#define ROUGHLY_EQUAL(a,b,n) (((a)>(b))?(((a)-(b))<(n)):(((b)-(a))<(n)))

// Wall hits

Expand Down
12 changes: 0 additions & 12 deletions testers/00_tester_sideview/dev/engine/bolts.h

This file was deleted.

Loading

0 comments on commit 8e65454

Please sign in to comment.