|
|
|||||||
| Home | Register | Downloads | FAQ | Members List | Calendar | Arcade | Mark Forums Read |
» Less advertising throughout
» Post and participate in discussions
» Network with other forum members
» Free private messaging
![]() |
|
|
Thread Tools | Display Modes |
|
|
#381 |
|
Sober coder
![]() ![]() ![]() Join Date: Aug 2010
Location: London, UK
Posts: 433
|
An arithmetic shift left (SAL) and logical shift left (SHL) are the same thing, as you are not extending the sign bit. Both mnemonics are present in the spec and assembler for completeness only.
__________________
|
|
|
|
| Advertisement | [Remove Advertisement] | ||
|
|
|
#382 |
|
Registered User
Join Date: Feb 2009
Location: Italy
Posts: 27
|
Hi, i'm processing BC_Testrom.c16 rom. Into the rom there is follow opcode: 001200AC In doc there is written that 00 = NOPE. What is mean 001200AC opcode? It should be 00000000? Best regards. |
|
|
|
|
|
#383 |
|
Registered User
![]() ![]() Join Date: Sep 2011
Location: Australia, Tasmania
Posts: 180
|
Since there is no opcode "001200AC" I'm guessing that might be some data you are looking at in the ROM, not an opcode...
|
|
|
|
|
|
#384 |
|
Registered User
Join Date: Feb 2009
Location: Italy
Posts: 27
|
Hi, in C# i need declare Registry array as ushort (unsigned 16bit) or short? |
|
|
|
|
|
#385 |
|
Sober coder
![]() ![]() ![]() Join Date: Aug 2010
Location: London, UK
Posts: 433
|
The registers are signed, so short should do. Remember the addresses are unsigned though, so you will have to convert sometimes.
__________________
|
|
|
|
|
|
#386 |
|
Registered User
Join Date: Feb 2009
Location: Italy
Posts: 27
|
Hi, i've written in C# this function for 0x21 opcode: private static void loadSP(byte[] opcode) { //21 00 LL HH LDI SP, HHLL Point SP to the specified address. Does not move existing values in memory to new location. int pos = 0; String strOpcode = BitConverter.ToString(opcode).Replace("-", string.Empty); String HHLL = strOpcode.Substring(6) + "" + strOpcode.Substring(4, 2); pos = FromHex(HHLL); SP = memory[pos]; } SP is an ushort variable (16 bit), memory is a byte array (8 bit). In SP variable i need point memory[pos] or also memory[pos+1] so i can let to SP a 16 bit value? |
|
|
|
|
|
#387 |
|
Registered User
![]() Join Date: Sep 2011
Location: Australia
Posts: 89
|
Your code doesn't make much sense. All you have to do for that opcode is to load immediate value to SP, i.e. SP = HHLL. Also, learn to use bitwise operators please, all those string manipulation looks ugly and takes more processing. |
|
|
|
|
|
#388 |
|
Registered User
Join Date: Aug 2010
Location: Russia, Moscow
Posts: 48
|
Hi all, Now i am working on prototype of CHIP16 debugger, because without it i can't write complex alghoritms or programs for CHIP16. c16debug.PNG |
|
|
|
|
|
#389 | |
|
Sober coder
![]() ![]() ![]() Join Date: Aug 2010
Location: London, UK
Posts: 433
|
Quote:
__________________
|
|
|
|
|
|
|
#390 | |
|
Registered User
![]() ![]() Join Date: Sep 2011
Location: Australia, Tasmania
Posts: 180
|
Quote:
|
|
|
|
|
|
|
#391 |
|
Sober coder
![]() ![]() ![]() Join Date: Aug 2010
Location: London, UK
Posts: 433
|
For those interested in writing chip16 assembly, and who use Notepad++, here is a custom syntax highlight file. Unzip it into %APPDATA%\Notepad++. It handles *.s and *.casm files. Enjoy
__________________
|
|
|
|
|
|
#392 |
|
Crazy GFX coder
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Nov 2002
Location: Dominican Republic/Austria
Posts: 8,094
|
Nice! i use Notepad++ quite a lot so i guess it may be very useful thanks!
__________________
![]() Current development tools: Visual C++.net, Visual C#.net Visual VB.net, Visual Webdeveloper.net Bloodshed Dev C++, Borland C++ Visual Basic 6 |
|
|
|
|
|
#393 | |
|
Sober coder
![]() ![]() ![]() Join Date: Aug 2010
Location: London, UK
Posts: 433
|
Quote:
![]() Also, I'll quickly say that a bug affecting hex DB's has been corrected in tchip16. EDIT: Made a quick little demo, a little bouncing ball with gravity and sound. Press START to restart. bounce.png Download attached!
__________________
Last edited by tykel; June 5th, 2012 at 01:48.. |
|
|
|
|
|
|
#394 | ||
|
Registered User
Join Date: Aug 2010
Location: Russia, Moscow
Posts: 48
|
Quote:
Quote:
|
||
|
|
|
|
|
#395 |
|
Sober coder
![]() ![]() ![]() Join Date: Aug 2010
Location: London, UK
Posts: 433
|
Yes, issue 10. Basically all hex digits > 9 were being converted wrong.
__________________
|
|
|
|
|
|
#396 |
|
Moderator
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Feb 2006
Location: Croatia
Posts: 4,544
|
@tronix286: Very neat looking debugger, I like it. @tykel: As always, good work. You should put it in the program pack
__________________
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. |
|
|
|
|
|
#397 |
|
Sober coder
![]() ![]() ![]() Join Date: Aug 2010
Location: London, UK
Posts: 433
|
@Shendo: Thanks, I have another little one in the works, nearly finished ![]() EDIT: Here it is, a demo called Water. It depicts a view on the sea, with a boat moving in the distance. You hear the waves crashing in, and on occasion, the boat sounding its horn. I did my best for the glitter on the sea. Feel free to make it better! Water.png Enjoy
__________________
Last edited by tykel; June 6th, 2012 at 12:26.. |
|
|
|
|
|
#398 |
|
Registered User
![]() Join Date: Sep 2011
Location: Australia
Posts: 89
|
So, I had some free time today (which I thought I would spend reading XBox documentation but blueshogun hasn't sent me documentation yet for some reason :P) and I decided to play around with the chip16 compiler code a little. I added an inbuilt function that lets you to write text on chip16 screen. Hello World demo: Code:
ConstString hello = "Hello World!!!";
void main() {
print(hello, 10, 10);
}
|
|
|
|
|
|
#399 | |
|
Registered User
Join Date: Aug 2010
Location: Russia, Moscow
Posts: 48
|
Quote:
|
|
|
|
|
|
|
#400 |
|
Registered User
Join Date: Aug 2010
Location: Russia, Moscow
Posts: 48
|
Some progress with my chip-16 debugger. It alpha, but it work's! KNOWN LIMITATION ver0.1 alpha: - All sound opcodes ignored (interpreted as NOP) - All FLIP opcodes ignored (interpreted as NOP) - All PAL opcodes ignored (interpreted as NOP) - Only one debugging mode: step by step (Trace) - One-pass dissasembler when ROM loaded into memory. No 'on the fly' dissasembler after each opcode execution. - No breakpoints - No code/memory/registers editor - Not working stack view panel. Maybe i should refactoring this Now at: http://code.google.com/p/chip16debugger/ Last edited by tronix286; June 14th, 2012 at 17:28.. |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|