diff -r vecx.emulated/e6522.c vecx.emulated-extended/e6522.c
17a18,19
>         // This may be where we pick up the IRQ bit for handling 4-bank switching
>         // for vectorblade.  Update IRQ bit of 'bank' variable here?
52a55,58
> 	        // See http://vide.malban.de/18th-of-march-2018-vectorblade-iii
> 		//  - extracting PB6 bit is a little complicated - depends on
> 		//    whether ddrb is in input or output mode.
> 		// Update PB6 bit of 'bank' variable here?
diff -r vecx.emulated/main.c vecx.emulated-extended/main.c
47c47
< 	if (fread(rom, 1, sizeof(rom), f) != sizeof(rom))
---
> 	if (fread(bios, 1, sizeof(bios), f) != sizeof(bios))
55c55
< static void load_cart(void)
---
> static void load_cart(void)  // needs to be modified for 48K and banked cartridges
60a61,71
> 		// Note by happy coincidence, loading the 'big' vectorblade rom
> 		// will work, since it is padded to a 4*64K image (and this code
> 		// pulls out the ram and bios address space separately from the
> 		// banked eprom)
> 		// However to be more general, this code really should explicitly
> 		// understand bank-switched rom images, and also should set a flag
> 		// to indicate that bank-switching is in use, otherwise a change
> 		// in PB6 or IRQ is liable to cause a spurious bank-switch in
> 		// a non-banked rom, where there is nothing in the other bank
> 		// images.
> 		// A mask for the bank variable might be enough to do the trick. (0, 1, or 3)
66c77
< 		fread(cart, 1, sizeof(cart), f);
---
> 		fread(cart[0], 1, 4*64*1024, f);
diff -r vecx.emulated/vecx.c vecx.emulated-extended/vecx.c
20,21c20,22
< //uint8_t rom[8192];
< uint8_t cart[32768];
---
> uint8_t bank = 0;
> uint8_t bios[8192];
> uint8_t cart[4][64*1024];
139,140c140,141
< 		/* rom */
< 		data = rom[address & 0x1fff];
---
> 		/* bios rom */
> 		data = bios[address & 0x1fff];
155c156
< 	else if (address < 0x8000)
---
> 	else if (address < 0xC000)
158c159
< 		data = cart[address];
---
> 		data = cart[bank][address];
184c185
< 	else if (address < 0x8000)
---
> 	else if (address < 0xC000)
186c187
< 		/* cartridge */
---
> 		/* 48K cartridge */
diff -r vecx.emulated/vecx.h vecx.emulated-extended/vecx.h
37,38c37,39
< extern uint8_t rom[8192];
< extern uint8_t cart[32768];
---
> extern uint8_t bank;
> extern uint8_t bios[8192]; // not paged
> extern uint8_t cart[4][64*1024]; // support 48k eproms up to 4 banks (hopefully will allow Vectorblade to run)
