Emuforums.com

Go Back   Emuforums.com > General Discussion > Web development / Programming
Home Register Downloads FAQ Members List Calendar Arcade Mark Forums Read

WON'T YOU JOIN US?
You are not a registered member and
are viewing this site as a guest.
Registration is simple and FREE.
Join this CrowdGather community today.
Registration offers the following perks:

» Less advertising throughout
» Post and participate in discussions
» Network with other forum members
» Free private messaging

join

Reply
 
Thread Tools Display Modes
Old August 13th, 2012, 04:26   #601
paul_nicholls
Registered User
 
Join Date: Sep 2011
Location: Australia, Tasmania
Posts: 180
Quote:
Originally Posted by refraction View Post
8bit read/writes arent uncommon for higher machines. Even the PS2 has 8bit memory read/writes :P It's also not like we have too many store/load functions already.
I think most real-world assembly language opcodes include an 8-bit load/store opcode
I think ours should too
paul_nicholls is offline   Reply With Quote

Advertisement [Remove Advertisement]
Old August 20th, 2012, 08:15   #602
tykel
Sober coder
 
tykel's Avatar
 
Join Date: Aug 2010
Location: London, UK
Posts: 433
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
__________________
tchip16 (chip16 assembler) Js16 (browser chip16 emulator)
mash16 (chip16 emulator) img16 (chip16 sprite converter)
______________________________________

Desktop: i5 750 @ 3.6 Ghz, 4GB ram, GTX 570 OC | Windows 7 Pro 64
Laptop: (Thinkpad) i5 430M, 4GB ram, Intel IGP | Arch Linux, Windows 7 Pro 64
tykel is offline   Reply With Quote
Old August 20th, 2012, 11:11   #603
paul_nicholls
Registered User
 
Join Date: Sep 2011
Location: Australia, Tasmania
Posts: 180
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.

Last edited by paul_nicholls; August 20th, 2012 at 12:33..
paul_nicholls is offline   Reply With Quote
Old August 24th, 2012, 14:46   #604
sammy jankis
Registered User
 
sammy jankis's Avatar
 
Join Date: Jul 2012
Location: rus
Posts: 5
Cool

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

BAD display , he very slow and less memory
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
Ihave idea.

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




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

NOT tested : PAL, RND


and BUUuuuugggggg

srs :
AVCHIP16.rar

Sorry for my bad english
sammy jankis is offline   Reply With Quote
Old August 24th, 2012, 16:48   #605
tronix286
Registered User
 
tronix286's Avatar
 
Join Date: Aug 2010
Location: Russia, Moscow
Posts: 48
Quote:
Originally Posted by sammy jankis View Post
Hello people

I write simple emulator for AVR controller.
My hardware : AtMega32 + L2F50 + 62256( x2 for 64k SRAM)
Awesome work, sammy jankis! Congratulation!
__________________
tronix286 is offline   Reply With Quote
Old August 26th, 2012, 10:01   #606
ShendoXT
Moderator
 
ShendoXT's Avatar
 
Join Date: Feb 2006
Location: Croatia
Posts: 4,548
Wow, as tronix286 already said it's awesome.
Hehe, if you encase this in something it would be a C16 console
__________________
Shendo's software blog

Core i5 2400 3.1 Ghz | ASRock H67M | GTX460 768Mb | 8GB DDR3 1333 | 1500 Gb HDD
Grundig VLC 7121 C (1080p) 32" | Razer DeathAdder | Logitech G110 | Windows 7 x64

Don't PM or ask me about VMP-MCR conversions. I will ignore you if you do.
ShendoXT is offline   Reply With Quote
Old August 28th, 2012, 00:05   #607
Bill_gates
Linux's worst nightmare..
 
Bill_gates's Avatar
 
Join Date: Feb 2004
Location: USA
Posts: 1,505
wow thats pretty cool!
__________________
OS: WinXP Professional Service Pack 3
CPU: Intel pentium 4 3.0GHz
Video: Nvidia Geforce 8400GS
Sound: ASUS Xonar DS 7.1 Channels 24-bit 192KHz PCI Interface Audio Card
Memory: 512 MB
HD: [C:] 140.36/449.09 GB
Connection: Marvell Yukon 88E8053 PCI-E Gigabit Ethernet Controller
Bill_gates is offline   Reply With Quote
Old August 28th, 2012, 02:23   #608
paul_nicholls
Registered User
 
Join Date: Sep 2011
Location: Australia, Tasmania
Posts: 180
That is very cool Sammy, awesome
paul_nicholls is offline   Reply With Quote
Old September 8th, 2012, 10:12   #609
sbeng
Registered User
 
Join Date: Feb 2009
Location: Italy
Posts: 27
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.
Attached Files
File Type: txt code.txt (54.3 KB, 11 views)
sbeng is offline   Reply With Quote
Old September 8th, 2012, 11:36   #610
ShendoXT
Moderator
 
ShendoXT's Avatar
 
Join Date: Feb 2006
Location: Croatia
Posts: 4,548
From the Readme:
Quote:

/****************/
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)?
__________________
Shendo's software blog

Core i5 2400 3.1 Ghz | ASRock H67M | GTX460 768Mb | 8GB DDR3 1333 | 1500 Gb HDD
Grundig VLC 7121 C (1080p) 32" | Razer DeathAdder | Logitech G110 | Windows 7 x64

Don't PM or ask me about VMP-MCR conversions. I will ignore you if you do.
ShendoXT is offline   Reply With Quote
Old September 8th, 2012, 11:57   #611
sammy jankis
Registered User
 
sammy jankis's Avatar
 
Join Date: Jul 2012
Location: rus
Posts: 5
Thank you all

Last edited by sammy jankis; September 8th, 2012 at 12:04..
sammy jankis is offline   Reply With Quote
Old September 8th, 2012, 13:18   #612
sbeng
Registered User
 
Join Date: Feb 2009
Location: Italy
Posts: 27
Quote:
Originally Posted by ShendoXT View Post
From the Readme:

Have you tried some other ROMs (from the package)?
Yes, other roms do not work perfectly in my emulator?
Opcodes listed below are correct in my code?

Last edited by sbeng; September 8th, 2012 at 18:31..
sbeng is offline   Reply With Quote
Old September 11th, 2012, 00:30   #613
sammy jankis
Registered User
 
sammy jankis's Avatar
 
Join Date: Jul 2012
Location: rus
Posts: 5
Arrow

hi



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 ?

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!
sammy jankis is offline   Reply With Quote
Old September 11th, 2012, 00:44   #614
refraction
PCSX2 Coder
 
refraction's Avatar
 
Join Date: Jan 2004
Location: Plymouth, UK
Posts: 10,037
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
__________________

http://www.pcsx2.net
Intel i7 920 @ 3.4Ghz, POV GTX 570 1.3Gb, 1.8Tb HD space, 6Gb OCZ Reaper PC3-14400 Triple Channel
Dont PM me for help, use the forums, thats what its for!


My Chip16 Emulator RefChip16 http://code.google.com/p/refchip16/
refraction is offline   Reply With Quote
Old September 19th, 2012, 20:08   #615
sammy jankis
Registered User
 
sammy jankis's Avatar
 
Join Date: Jul 2012
Location: rus
Posts: 5
Talking

Hello!
how are things?

I was interested in reading the documentation ARM architecture.
you thought about removing registers PC, SP? And the use of GPR?
I want to sketch a simple code of a multitasking operating system.
new registers to facilitate this and to remove unnecessary commands.
to switch application will use the interrupt handler placed after 0xFFF4 address or destination address on the handler.
interrupt will vblank. and will be a transition to 0xFFF4-0xFFFF

code of the program will be inactive Peren to higher addresses. active - 0x0000

You can also use something like a phantom shift register, which will be added to the PC, the switch from application to application, located in several locations.

all just for lulz
sammy jankis is offline   Reply With Quote
Old September 20th, 2012, 09:17   #616
refraction
PCSX2 Coder
 
refraction's Avatar
 
Join Date: Jan 2004
Location: Plymouth, UK
Posts: 10,037
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.
__________________

http://www.pcsx2.net
Intel i7 920 @ 3.4Ghz, POV GTX 570 1.3Gb, 1.8Tb HD space, 6Gb OCZ Reaper PC3-14400 Triple Channel
Dont PM me for help, use the forums, thats what its for!


My Chip16 Emulator RefChip16 http://code.google.com/p/refchip16/
refraction is offline   Reply With Quote
Old September 20th, 2012, 09:54   #617
sammy jankis
Registered User
 
sammy jankis's Avatar
 
Join Date: Jul 2012
Location: rus
Posts: 5
you do not understand me.
just replace such

example :

general-purpose register R0 - R12

PC = R13
SP = R14
Status Reg = R15

and del
commnd used sp and pc , sr.

they will simply registers.
will be easy to work and reduce the number of commands.

now SP gradually lose its significance
sammy jankis is offline   Reply With Quote
Old September 21st, 2012, 15:09   #618
tykel
Sober coder
 
tykel's Avatar
 
Join Date: Aug 2010
Location: London, UK
Posts: 433
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.
__________________
tchip16 (chip16 assembler) Js16 (browser chip16 emulator)
mash16 (chip16 emulator) img16 (chip16 sprite converter)
______________________________________

Desktop: i5 750 @ 3.6 Ghz, 4GB ram, GTX 570 OC | Windows 7 Pro 64
Laptop: (Thinkpad) i5 430M, 4GB ram, Intel IGP | Arch Linux, Windows 7 Pro 64
tykel is offline   Reply With Quote
Old October 1st, 2012, 07:37   #619
tronix286
Registered User
 
tronix286's Avatar
 
Join Date: Aug 2010
Location: Russia, Moscow
Posts: 48
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:
P1110228_измен.размер.JPG

Pocket LOOX 720 Windows Mobile 2003 se:
P1110234_измен.размер.JPG

Oldschool 80486 (Am5x86 133 P75) notebook running at realy MS-DOS v6.22:
P1110233_измен.размер.JPG

Speed ​​is not good, even on real 486 hardware. Need heavy optimization.
Attached Files
File Type: rar CH16_dos.rar (24.6 KB, 3 views)
__________________

Last edited by tronix286; October 1st, 2012 at 08:34..
tronix286 is offline   Reply With Quote
Old October 1st, 2012, 10:53   #620
tykel
Sober coder
 
tykel's Avatar
 
Join Date: Aug 2010
Location: London, UK
Posts: 433
You never cease to impress, tronix. Good job
__________________
tchip16 (chip16 assembler) Js16 (browser chip16 emulator)
mash16 (chip16 emulator) img16 (chip16 sprite converter)
______________________________________

Desktop: i5 750 @ 3.6 Ghz, 4GB ram, GTX 570 OC | Windows 7 Pro 64
Laptop: (Thinkpad) i5 430M, 4GB ram, Intel IGP | Arch Linux, Windows 7 Pro 64
tykel is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +1. The time now is 04:13.

© 2006 - 2012 Emu Forums | About Emu Forums | Advertisers | Investors | Legal | A member of the Crowdgather Forum Community


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.