Next Generation Emulation banner
601 - 620 of 872 Posts
Discussion starter · #602 ·
Hello guys, I am quite busy with RL at the moment, so I don't really have the time to come here or work on my emu.
I like the idea of 8 bit load/stores, although they are not strictly necessary as tronix pointed out; if we add them, we should strive to fit them in a consistent way into the ISA though.
The MOD should definitely be in, I'm surprised it isn't already!
Let's cook up a draft and we can review that ;)
 
Ok, how about this as a draft of the additions to the spec for MOD and load/store 8-bit values:


MOD operations
Code:
A3 0X LL HH	MODI RX, HHLL		Mod immediate value with register X. Remainder is stored in register X. Affects [c,z,n]
A4 YX 00 00	MOD RX, RY		Mod value of register Y with value of register X. Remainder is stored in register X. Affects [c,z,n]
A5 YX 0Z 00	MOD RX, RY, RZ		Mod value of register Y with value of register X. Remainder is stored in register Z. Affects [c,z,n]
load 8-bit values
Code:
25 0X LL HH	LDB RX, HHLL		Load low-byte of register X with the 8bit value at the specified address. high-byte of RX is zeroed.
26 YX 00 00	LDB RX, RY		Load low-byte of register X with the 8bit value at the specified address pointed by register Y. high-byte of RX is zeroed.
store 8-bit values
Code:
32 0X LL HH	STB RX, HHLL		Store low-byte value of register X at the specified address.
33 YX 00 00	STB RX, RY		Store low-byte value of register X at the specified address pointed by register Y.
 
Hello people :)

I write simple emulator for AVR controller.
My hardware : AtMega32 + L2F50 + 62256( x2 for 64k SRAM)

All emul write on C.
I use this :

http://habrahabr.ru/post/146496/ (russian)
RefCHIP16: code.google.com/p/refchip16/downloads/list
chip16debugger: code.google.com/p/chip16debugger/downloads/list

Tested : BC_TestRom.c16 OK!
PaleteTest.c16 OK!
Maze.c16 OK!
other now tested :eyemove:

BAD display , he very slow and less memory :mad:
All rom copy on external sram (controlled programm, not hardware)

Real emulate frequency CPU : min 4MHz (slowly command - DRW,RND ....other ) max 16MHz

All project requires videocontroller + VRAM for fast work:evil:
Ihave idea.

video http://www.youtube.com/watch?v=SENqERoeu3s

Image



NOT work : all sound (im work on this) , flip (work only flip 0,0) , drawing func (bad , bugged :dead:) , vblnk (not requir, uC drawing sprite in real time, not VRAM :( )

NOT tested : PAL, RND


and BUUuuuugggggg :drool:

srs :
View attachment 218259

Sorry for my bad english :D
 
wow thats pretty cool! :)
 
My CHIP16 doesn't work fine

Hi,
i've created a simple C# form project that read BTC_Test_Rom. When it does run, it prints green screen e some pixel and it not does print text. :(
I've attached my code.
Can you help me?
Thank you and best regards.
 
From the Readme:
/****************/
IMPORTANT
/***************/

Before using this test rom, you should check manually:

- 14 00 LL HH CALL HHLL
- 20 0X LL HH LDI RX, HHLL
- 23 YX 00 00 LDM RX, RY
- 24 YX 00 00 MOV RX, RY
- 10 00 LL HH JMP HHLL
- 40 0X LL HH ADDI RX, HHLL , check the carry flag
- 50 0X LL HH SUBI RX, HHLL , check the carry flag and zero flag
- 31 YX 00 00 STM RX, RY
- 61 YX 00 00 AND RX, RY
- 90 0X LL HH MULI RX, HHLL
- 05 YX LL HH DRW RX, RY, HHLL
Have you tried some other ROMs (from the package)?
 
hi

:idea:

I have the idea of ​​a new command.
it will complement the old SPR and DRW
new fully compatible with older

Code:
04 N0 LL HH	SPR N ,HHLL		Set the size of the sprite number N: width (LL) and height (HH)
05 YX LL HH 	DRW RX, RY, HHLL        Draw the sprite number 0, from memory addresses HHLL the coordinates specified in the registers X and Y. The result affects the carry flag.
06 YX 0Z N0 	DRW N, RX, RY, RZ       Draw the sprite from memory address pointed to by register Z coordinates specified in the registers X and Y.  Number of sprite N. The result affects the carry flag.
N - 4bit value or mb NN - 8 bit value ? oO

Now we can have an array of sizes sprites.
if N paramet = 0 this old programm all work and new too.
if N not 0 , old prog also work (not use this param in opcode) and new prog work!
:)
 
the only drawback to that is we would have to allocate a space in memory for it, so we are starting to slowly eat away at our limited memory space for the sake of remembering 15 sprite sizes.

You are essentially substituting having to do SPR everytime with having to move the memory address in to RZ every time :p Tho i guess if things are drawn in a tight loop of similar size, it would be reasonably useful. If we did have it though, i recon we should have an 8bit index rather than 4. 15 sprites seems rather limited
 
It will never be removed. CPU registers and program counters and stacks are fundamental parts of computing, especially in emulation, without gpr's, emulating instructions is pretty much impossible or at least inaccurate in how a CPU works.
 
Discussion starter · #618 ·
Well, although it is a nice idea, it would be too significant a change at this stage. It reminds me of the ARM architecture somewhat.
The most we can do now, though, is add instructions if a serious need is proven.
 
Hi all!

Just for fun i ported my emu to MS-DOS with modex 320x240, so it can possible run chip16 demos on system, which supported DosBox (Win mobile, Symbian, Android, jailbreaked iPhone and other platforms).

Nokia 5230 Symbian 9.4:
View attachment 218372

Pocket LOOX 720 Windows Mobile 2003 se:
View attachment 218374

Oldschool 80486 (Am5x86 133 P75) notebook running at realy MS-DOS v6.22:
View attachment 218373

Speed ​​is not good, even on real 486 hardware. Need heavy optimization.
 
601 - 620 of 872 Posts